GlIsEnabled: Difference between revisions

From QB64 Phoenix Edition Wiki
Jump to navigation Jump to search
(Created page with "'''_glIsEnabled, glIsEnabledi:''' test whether a capability is enabled {{PageSyntax}} FUNCTION _glIsEnabled~%% (BYVAL cap AS _UNSIGNED LONG) GLboolean '''_glIsEnabled'''(GLenum {{Parameter|cap}}); GLboolean '''_glIsEnabledi'''(GLenum {{Parameter|cap}}, GLuint {{Parameter|index}}); ; cap : Specifies a symbolic constant indicating a GL capability. ; index : Specifies the index of the capability. {{PageDescription}} '''_glIsEnabled''' returns {{KW|_GL_TRUE}} i...")
 
No edit summary
 
(7 intermediate revisions by the same user not shown)
Line 1: Line 1:
'''_glIsEnabled, glIsEnabledi:''' test whether a capability is enabled
{{DISPLAYTITLE:_glIsEnabled}}
The '''_glIsEnabled''' function tests whether a capability is enabled.




{{PageSyntax}}
{{PageSyntax}}
: GLboolean {{Parameter|result}} = [[_glIsEnabled]] (GLenum {{Parameter|cap}})


  FUNCTION _glIsEnabled~%% (BYVAL cap AS _UNSIGNED LONG)
  GLboolean '''_glIsEnabled'''(GLenum {{Parameter|cap}});


  GLboolean '''_glIsEnabledi'''(GLenum {{Parameter|cap}}, GLuint {{Parameter|index}});
{{PageParameters}}
 
* OpenGL is using its own set of variable types to describe its command parameters.
; cap
* Use the following table to find the respective QB64 [[Variable Types]].
: Specifies a symbolic constant indicating a GL capability.
{{OpenGLTypesPlugin}}
; index
: Specifies the index of the capability.




{{PageDescription}}
{{PageDescription}}
 
* OpenGL's documentation is available in several places, so we won't reproduce it here for another time.
'''_glIsEnabled''' returns {{KW|_GL_TRUE}} if {{Parameter|cap}} is an enabled capability and returns {{KW|_GL_FALSE}} otherwise. Boolean states that are indexed may be tested with '''_glIsEnabledi'''. For '''_glIsEnabledi''', {{Parameter|index}} specifies the index of the capability to test. {{Parameter|index}} must be between zero and the count of indexed capabilities for {{Parameter|cap}}. Initially all capabilities except {{KW|_GL_DITHER}} are disabled; {{KW|_GL_DITHER}} is initially enabled.
* The full description for this command can be found at [https://learn.microsoft.com/en-us/windows/win32/opengl/glisenabled Microsoft Docs] and is also valid for QB64 usage.
 
The following capabilities are accepted for {{Parameter|cap}}:
 
 
 
{|
|+
! '''Constant'''
! '''See'''
|+
| {{KW|_GL_BLEND}}
| {{KW|_glBlendFunc}}, {{KW|_glLogicOp}}
|+
| {{KW|_GL_CLIP_DISTANCE}}''i''
| {{KW|_glEnable}}
|+
| {{KW|_GL_COLOR_LOGIC_OP}}
| {{KW|_glLogicOp}}
|+
| {{KW|_GL_CULL_FACE}}
| {{KW|_glCullFace}}
|+
| {{KW|_GL_DEPTH_CLAMP}}
| {{KW|_glEnable}}
|+
| {{KW|_GL_DEBUG_OUTPUT}}
| {{KW|_glEnable}}
|+
| {{KW|_GL_DEBUG_OUTPUT_SYNCHRONOUS}}
| {{KW|_glEnable}}
|+
| {{KW|_GL_DEPTH_TEST}}
| {{KW|_glDepthFunc}}, {{KW|_glDepthRange}}
|+
| {{KW|_GL_DITHER}}
| {{KW|_glEnable}}
|+
| {{KW|_GL_FRAMEBUFFER_SRGB}}
| {{KW|_glEnable}}
|+
| {{KW|_GL_LINE_SMOOTH}}
| {{KW|_glLineWidth}}
|+
| {{KW|_GL_MULTISAMPLE}}
| {{KW|_glSampleCoverage}}
|+
| {{KW|_GL_POLYGON_SMOOTH}}
| {{KW|_glPolygonMode}}
|+
| {{KW|_GL_POLYGON_OFFSET_FILL}}
| {{KW|_glPolygonOffset}}
|+
| {{KW|_GL_POLYGON_OFFSET_LINE}}
| {{KW|_glPolygonOffset}}
|+
| {{KW|_GL_POLYGON_OFFSET_POINT}}
| {{KW|_glPolygonOffset}}
|+
| {{KW|_GL_PROGRAM_POINT_SIZE}}
| {{KW|_glEnable}}
|+
| {{KW|_GL_PRIMITIVE_RESTART}}
| {{KW|_glEnable}}, {{KW|_glPrimitiveRestartIndex}}
|+
| {{KW|_GL_SAMPLE_ALPHA_TO_COVERAGE}}
| {{KW|_glSampleCoverage}}
|+
| {{KW|_GL_SAMPLE_ALPHA_TO_ONE}}
| {{KW|_glSampleCoverage}}
|+
| {{KW|_GL_SAMPLE_COVERAGE}}
| {{KW|_glSampleCoverage}}
|+
| {{KW|_GL_SAMPLE_MASK}}
| {{KW|_glEnable}}
|+
| {{KW|_GL_SCISSOR_TEST}}
| {{KW|_glScissor}}
|+
| {{KW|_GL_STENCIL_TEST}}
| {{KW|_glStencilFunc}}, {{KW|_glStencilOp}}
|+
| {{KW|_GL_TEXTURE_CUBEMAP_SEAMLESS}}
| {{KW|_glEnable}}
|}
 
 
 
 
{{PageNotes}}
 
If an error is generated, '''_glIsEnabled''' and '''_glIsEnabledi''' return {{KW|_GL_FALSE}}.
 
{{KW|_GL_DEBUG_OUTPUT}} and {{KW|_GL_DEBUG_OUTPUT_SYNCHRONOUS}} are available only if the GL version is 4.3 or greater.
 
 
{{PageErrors}}
 
{{KW|_GL_INVALID_ENUM}} is generated if {{Parameter|cap}} is not an accepted value.
 
{{KW|_GL_INVALID_VALUE}} is generated by '''_glIsEnabledi''' if {{Parameter|index}} is outside the valid range for the indexed state {{Parameter|cap}}.




{{PageSeeAlso}}
{{PageSeeAlso}}
* [[_GL|SUB _GL]]
* [[_glBegin]], [[_glEnable]], [[_glEnd]]


[[_GL|SUB _GL]]
{{KW|_glEnable}}, {{KW|_glDisable}}, {{KW|_glGet}}
{{PageCopyright}}


Copyright 1991-2006 Silicon Graphics, Inc. Copyright 2010-2011 Khronos Group. This document is licensed under the SGI Free Software B License. For details, see [http://oss.sgi.com/projects/FreeB/ http://oss.sgi.com/projects/FreeB/].
{{PageNavigation}}

Latest revision as of 01:09, 28 January 2023

The _glIsEnabled function tests whether a capability is enabled.


Syntax

GLboolean result = _glIsEnabled (GLenum cap)


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.
   Table 2: Relations between the OpenGL variable types vs. C/C++ and QB64.
 ┌──────────────┬────────────────┬──────────────────────────────────────────┐
 │    OpenGLC/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   (1) │ void           │ _OFFSET(any fixed lenght string or _BYTE │
 │              │                │         array element)                   │
 └──────────────┴────────────────┴──────────────────────────────────────────┘
 Note: If a parameter has an asterisk (*) in front, then it's a pointer to
       the designated OpenGL variable type, rather than a value of that type.
       Those must be passed using the _OFFSET(...) notation.

 E.g.  GLuint *anyParam is actually the offset of a _UNSIGNED LONG (~&)
       variable or array, which must be passed as _OFFSET(anyVar~&) or
       _OFFSET(anyArr~&()) respectively.

  (1)  This type is regularly only used for pointers (with asterisk (*)) to
       any byte sized memory data, hence _BYTE or fixed length strings.


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