GlCullFace: Difference between revisions

From QB64 Phoenix Edition Wiki
Jump to navigation Jump to search
(Created page with "'''_glCullFace:''' specify whether front- or back-facing facets can be culled {{PageSyntax}} ::SUB '''_glCullFace''' (BYVAL mode AS _UNSIGNED LONG) :: void '''_glCullFace'''(GLenum {{Parameter|mode}}); ; mode : Specifies whether front- or back-facing facets are candidates for culling. Symbolic constants {{KW|_GL_FRONT}}, {{KW|_GL_BACK}}, and {{KW|_GL_FRONT_AND_BACK}} are accepted. The initial value is {{KW|_GL_BACK}}. {{PageDescription}} '''_glCullFace''' specifi...")
 
No edit summary
Line 1: Line 1:
'''_glCullFace:''' specify whether front- or back-facing facets can be culled
{{DISPLAYTITLE:_glCullFace}}
The '''_glCullFace''' statement specifies whether front-facing or back-facing facets can be culled.




{{PageSyntax}}
{{PageSyntax}}
: '''_glCullFace''' GLenum {{Parameter|mode}}


::SUB '''_glCullFace''' (BYVAL mode AS _UNSIGNED LONG)
:: void '''_glCullFace'''(GLenum {{Parameter|mode}});


 
{{PageParameters}}
; mode
* OpenGL is using its own set of variable types to describe its command parameters.
: Specifies whether front- or back-facing facets are candidates for culling. Symbolic constants {{KW|_GL_FRONT}}, {{KW|_GL_BACK}}, and {{KW|_GL_FRONT_AND_BACK}} are accepted. The initial value is {{KW|_GL_BACK}}.
* Use the following table to find the respective QB64 [[Variable Types]].
{{TextStart}}
  '''OpenGL'''    |    '''C/C++'''        |        '''QB64'''
------------+------------------+----------------------
GLenum      |  unsigned int    |  [[_UNSIGNED]] [[LONG]]
GLboolean  |  unsigned char  |  [[_UNSIGNED]] [[_BYTE]]
GLbitfield  |  unsigned int    |  [[_UNSIGNED]] [[LONG]]
GLbyte      |  signed char    |  [[_BYTE]]
GLshort    |  short          |  [[INTEGER]]
GLint      |  int            |  [[LONG]]
GLsizei    |  int            |  [[LONG]]
GLubyte    |  unsigned char  |  [[_UNSIGNED]] [[_BYTE]]
GLushort    |  unsigned short  |  [[_UNSIGNED]] [[INTEGER]]
GLuint      |  unsigned int    |  [[_UNSIGNED]] [[LONG]]
GLfloat    |  float          |  [[SINGLE]]
GLclampf    |  float          |  [[SINGLE]]
GLdouble    |  double          |  [[DOUBLE]]
GLclampd    |  double          |  [[DOUBLE]]
GLvoid      | void            | no parameters used
{{TextEnd}}




{{PageDescription}}
{{PageDescription}}
 
* OpenGL's documentation is available in several places, so we won't reproduce it here for another time.
'''_glCullFace''' specifies whether front- or back-facing facets are culled (as specified by ''mode'') when facet culling is enabled. Facet culling is initially disabled. To enable and disable facet culling, call the {{KW|_glEnable}} and {{KW|_glDisable}} commands with the argument {{KW|_GL_CULL_FACE}}. Facets include triangles, quadrilaterals, polygons, and rectangles.
* The full description for this command can be found at [https://docs.microsoft.com/en-us/windows/win32/opengl/glcullface Microsoft Docs] and is also valid for QB64 usage.
 
{{KW|_glFrontFace}} specifies which of the clockwise and counterclockwise facets are front-facing and back-facing. See {{KW|_glFrontFace}}.
 
 
{{PageNotes}}
 
If {{Parameter|mode}} is {{KW|_GL_FRONT_AND_BACK}}, no facets are drawn, but other primitives such as points and lines are drawn.
 
 
{{PageErrors}}
 
{{KW|_GL_INVALID_ENUM}} is generated if {{Parameter|mode}} is not an accepted value.
 
 
{{PageUseWith}}
 
{{KW|_glIsEnabled}} with argument {{KW|_GL_CULL_FACE}}
 
{{KW|_glGet}} with argument {{KW|_GL_CULL_FACE_MODE}}




{{PageSeeAlso}}
{{PageSeeAlso}}
* [[_GL|SUB _GL]]


[[_GL|SUB _GL]]
{{KW|_glEnable|(GL_CULL_FACE)}}, {{KW|_glFrontFace}}


{{PageNavigation}}


{{PageCopyright}}
[[Category:Final]]

Revision as of 15:26, 14 July 2022

The _glCullFace statement specifies whether front-facing or back-facing facets can be culled.


Syntax

_glCullFace GLenum mode


Parameters

  • OpenGL is using its own set of variable types to describe its command parameters.
  • Use the following table to find the respective QB64 Variable Types.
  OpenGL     |     C/C++        |        QB64
 ------------+------------------+----------------------
 GLenum      |  unsigned int    |  _UNSIGNED LONG
 GLboolean   |  unsigned char   |  _UNSIGNED _BYTE
 GLbitfield  |  unsigned int    |  _UNSIGNED LONG
 GLbyte      |  signed char     |  _BYTE
 GLshort     |  short           |  INTEGER
 GLint       |  int             |  LONG
 GLsizei     |  int             |  LONG
 GLubyte     |  unsigned char   |  _UNSIGNED _BYTE
 GLushort    |  unsigned short  |  _UNSIGNED INTEGER
 GLuint      |  unsigned int    |  _UNSIGNED LONG
 GLfloat     |  float           |  SINGLE
 GLclampf    |  float           |  SINGLE
 GLdouble    |  double          |  DOUBLE
 GLclampd    |  double          |  DOUBLE
 GLvoid      |  void            |  no parameters used


Description

  • OpenGL's documentation is available in several places, so we won't reproduce it here for another time.
  • The full description for this command can be found at Microsoft Docs and is also valid for QB64 usage.


See also



Navigation:
Main Page with Articles and Tutorials
Keyword Reference - Alphabetical
Keyword Reference - By usage
Report a broken link