GlEnable

From QB64 Phoenix Edition Wiki
Revision as of 18:53, 30 April 2022 by SMcNeill (talk | contribs) (Created page with "'''_glEnable:''' enable or disable server-side GL capabilities {{PageSyntax}} SUB _glEnable (BYVAL cap AS _UNSIGNED LONG) void '''_glEnable'''(GLenum {{Parameter|cap}}); SUB _glDisable (BYVAL cap AS _UNSIGNED LONG) void '''_glDisable'''(GLenum {{Parameter|cap}}); ; cap : Specifies a symbolic constant indicating a GL capability. {{PageSyntax}} | name = glEnablei, glDisablei | core = 3.0 }} void '''_glEnablei'''(GLenum {{Parameter|cap}}, GLuint {{Param...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

_glEnable: enable or disable server-side GL capabilities


Syntax

 SUB _glEnable (BYVAL cap AS _UNSIGNED LONG)
 void _glEnable(GLenum cap);
 SUB _glDisable (BYVAL cap AS _UNSIGNED LONG)
 void _glDisable(GLenum cap);


cap
Specifies a symbolic constant indicating a GL capability.


Syntax

| name = glEnablei, glDisablei | core = 3.0 }}

 void _glEnablei(GLenum cap, GLuint index);
 void _glDisablei(GLenum cap, GLuint index);
cap
Specifies a symbolic constant indicating a GL capability.
index
Specifies the index of the capability to enable/disable.


Description

_glEnable and Template:KW enable and disable various capabilities. Use Template:KW or Template:KW to determine the current setting of any capability. The initial value for each capability with the exception of Template:KW and Template:KW is Template:KW. The initial value for Template:KW and Template:KW is Template:KW.

Both _glEnable and Template:KW take a single argument, cap, which can assume one of the following values:

Template:KW
If enabled, blend the computed fragment color values with the values in the color buffers. See glBlendFunc. Sets the blend enable/disable flag for all color buffers.
Template:KWi
If enabled, clip geometry against user-defined half space i.
Template:KW
If enabled, apply the currently selected logical operation to the computed fragment color and color buffer values. See glLogicOp.
Template:KW
If enabled, cull polygons based on their winding in window coordinates. See glCullFace.
Template:KW
If enabled, debug messages are produced by a debug context. When disabled, the debug message log is silenced. Note that in a non-debug context, very few, if any messages might be produced, even when Template:KW is enabled.
Template:KW
If enabled, debug messages are produced synchronously by a debug context. If disabled, debug messages may be produced asynchronously. In particular, they may be delayed relative to the execution of GL commands, and the debug callback function may be called from a thread other than that in which the commands are executed. See Template:KW.
Template:KW
If enabled, the -w<sub>c</sub> &le; z<sub>c</sub> &le; w<sub>c</sub> plane equation is ignored by view volume clipping (effectively, there is no near or far plane clipping). See glDepthRange.
Template:KW
If enabled, do depth comparisons and update the depth buffer. Note that even if the depth buffer exists and the depth mask is non-zero, the depth buffer is not updated if the depth test is disabled. See glDepthFunc and glDepthRange.
Template:KW
If enabled, dither color components or indices before they are written to the color buffer.
Template:KW
If enabled and the value of Template:KW for the framebuffer attachment corresponding to the destination buffer is Template:KW, the R, G, and B destination color values (after conversion from fixed-point to floating-point) are considered to be encoded for the sRGB color space and hence are linearized prior to their use in blending.
Template:KW
If enabled, draw lines with correct filtering. Otherwise, draw aliased lines. See glLineWidth.
Template:KW
If enabled, use multiple fragment samples in computing the final color of a pixel. See glSampleCoverage.
Template:KW
If enabled, and if the polygon is rendered in Template:KW mode, an offset is added to depth values of a polygon's fragments before the depth comparison is performed. See glPolygonOffset.
Template:KW
If enabled, and if the polygon is rendered in Template:KW mode, an offset is added to depth values of a polygon's fragments before the depth comparison is performed. See glPolygonOffset.
Template:KW
If enabled, an offset is added to depth values of a polygon's fragments before the depth comparison is performed, if the polygon is rendered in Template:KW mode. See glPolygonOffset.
Template:KW
If enabled, draw polygons with proper filtering. Otherwise, draw aliased polygons. For correct antialiased polygons, an alpha buffer is needed and the polygons must be sorted front to back.
Template:KW
Enables primitive restarting. If enabled, any one of the draw commands which transfers a set of generic attribute array elements to the GL will restart the primitive when the index of the vertex is equal to the primitive restart index. See Template:KW.
Template:KW
Enables primitive restarting with a fixed index. If enabled, any one of the draw commands which transfers a set of generic attribute array elements to the GL will restart the primitive when the index of the vertex is equal to the fixed primitive index for the specified index type. The fixed index is equal to <math>2^n - 1</math> where n is equal to 8 for Template:KW, 16 for Template:KW and 32 for Template:KW.
Template:KW
If enabled, all primitives are discarded before rasterization, but after any optional transform feedback. Also causes Template:KW and Template:KW commands to be ignored.
Template:KW
If enabled, compute a temporary coverage value where each bit is determined by the alpha value at the corresponding sample location. The temporary coverage value is then ANDed with the fragment coverage value.
Template:KW
If enabled, each sample alpha value is replaced by the maximum representable alpha value.
Template:KW
If enabled, the fragment's coverage is ANDed with the temporary coverage value. If Template:KW is set to Template:KW, invert the coverage value. See glSampleCoverage.
Template:KW
If enabled, the active fragment shader is run once for each covered sample, or at fraction of this rate as determined by the current value of Template:KW. See glMinSampleShading.
Template:KW
If enabled, the sample coverage mask generated for a fragment during rasterization will be ANDed with the value of Template:KW before shading occurs. See glSampleMaski.
Template:KW
If enabled, discard fragments that are outside the scissor rectangle. See glScissor.
Template:KW
If enabled, do stencil testing and update the stencil buffer. See glStencilFunc and glStencilOp.
Template:KW
If enabled, cubemap textures are sampled such that when linearly sampling from the border between two adjacent faces, texels from both faces are used to generate the final sample value. When disabled, texels from only a single face are used to construct the final sample value.
Template:KW
If enabled and a vertex or geometry shader is active, then the derived point size is taken from the (potentially clipped) shader builtin Template:Code and clamped to the implementation-dependent point size range.

Indexed Capabilities

Some of the GL's capabilities are indexed. _glEnablei and _glDisablei enable and disable indexed capabilities. Only the following capabilities may be used with indices higher than zero:

Template:KW
If enabled, blend the computed fragment color values with the values in the specified color buffer. index must be less than Template:KW or Template:KW will result. See glBlendFunc.


Template:PageErrors

Template:KW is generated if cap is not one of the values listed previously.

Template:KW is generated by _glEnablei and _glDisablei if index is greater than or equal to the number of indexed capabilities for cap.


Template:PageNotes

Template:KW is available only if the GL version is 3.1 or greater.

Template:KW is available only if the GL version is 3.2 or greater.

Template:KW is available only if the GL version is 4.3 or greater.

Template:KW and Template:KW are available only if the GL version is 4.3 or greater.

Any token accepted by _glEnable or _glDisable is also accepted by _glEnablei and _glDisablei, but if the capability is not indexed, the maximum value that index may take is zero.

In general, passing an indexed capability to _glEnable or _glDisable will enable or disable that capability for all indices, resepectively.


Template:PageUseWith

Template:KW

Template:KW


See also

SUB _GL Template:KW, Template:KW, Template:KW, Template:KW, Template:KW, Template:KW, Template:KW, Template:KW, Template:KW, Template:KW, Template:KW, Template:KW, Template:KW, Template:KW, Template:KW, Template:KW, Template:KW, Template:KW, Template:KW


Template: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/.