1
1
Fork 0
mirror of https://github.com/DualBrain/QB64.git synced 2023-11-19 13:10:13 +00:00

removed all _gl files.

This commit is contained in:
Cory Smith 2022-12-26 14:10:21 -06:00
parent d52a2a745f
commit 1b1ad0fe7a
49 changed files with 0 additions and 3809 deletions

View file

@ -1,15 +0,0 @@
## Syntax
> **[_GLRENDER](_GLRENDER)** *mode*
## Parameters
Mode can be:
* _BEHIND - renders OpenGL context behind the software rendering
* _ONTOP - renders OpenGL context on the top of the software rendering [default]
* _ONLY - renders OpenGL context only
## See Also
* [Hardware images](Hardware-images)

View file

@ -1,46 +0,0 @@
In order to use OpenGL drawing commands, you must do so from inside a [SUB](SUB) procedure called **_GL**, which enables the commands to be rendered.
## Syntax
> [SUB](SUB) _GL
> *REM Your OpenGL code here
> [END](END) [SUB](SUB)
## Description
* OpenGL commands are valid outside of **SUB _GL**, as long as the sub procedure exists in your code.
* Attempting to use OpenGL commands without having **SUB _GL** in a program will result in a **Syntax error**, even if the syntax is valid.
* SUB **_GL** cannot be invoked manually. The code inside it will be called automatically at approximately 60 frames per second.
* Using [INPUT](INPUT) inside SUB **_GL** will crash your program.
* If your program needs to perform any operations before SUB _GL must be run, it is recommended to use a shared variable as a flag to allow SUB _GL's contents to be run. See example below.
## Example
```vb
DIM allowGL AS _BYTE
'perform startup routines like loading assets
allowGL = -1 'sets allowGL to true so SUB _GL can run
DO
_LIMIT 1 'runs the main loop at 1 cycle per second
'notice how the main loop doesn't do anything, as SUB _GL will be running
'continuously.
LOOP
SUB _GL
IF NOT allowGL THEN EXIT SUB 'used to bypass running the code below until
' startup routines are done in the main module
'OpenGL code starts here
'The code in this area will be run automatically at ~60fps
END SUB
```
## See Also
* [_GLRENDER](_GLRENDER)
* [SUB](SUB)

View file

@ -1,36 +0,0 @@
This will define the scissor box.
## Syntax
* QB64: SUB [_glScissor](_glScissor) (BYVAL x AS LONG, BYVAL y AS LONG, BYVAL width AS LONG, BYVAL height) AS LONG)
* C/C++: void [_glScissor](_glScissor)(GLint x, GLint y, GLsizei width, GLsizei height);
## Parameters
* x, y Specify the lower left corner of the scissor box. Initially (0, 0).
* width, height Specify the width and height of the scissor box. When a GL context is first attached to a window, width and height are set to the dimensions of that window.
## Description
**_glScissor** defines a rectangle, called the scissor box, in window coordinates. The first two arguments, x and y, specify the lower left corner of the box. width and height specify the width and height of the box.
To enable and disable the scissor test, call [_glEnable](_glEnable) and [_glDisable](_glDisable) with argument [_GL_SCISSOR_TEST](_GL_SCISSOR_TEST). The test is initially disabled. While the test is enabled, only pixels that lie within the scissor box can be modified by drawing commands. Window coordinates have integer values at the shared corners of frame buffer pixels. `_glScissor(0,0,1,1)` allows modification of only the lower left pixel in the window, and `_glScissor(0,0,0,0)` doesn't allow modification of any pixels in the window.
When the scissor test is disabled, it is as though the scissor box includes the entire window.
## Error(s)
* [_GL_INVALID_VALUE](_GL_INVALID_VALUE) is generated if either width or height is negative.
## Use With
* [_glGet](_glGet) with argument [_GL_SCISSOR_BOX](_GL_SCISSOR_BOX)
* [_glIsEnabled](_glIsEnabled) with argument [_GL_SCISSOR_TEST](_GL_SCISSOR_TEST)
## See Also
* [_GL](_GL)
* [_glEnable](_glEnable)
* [_glScissorArray](_glScissorArray)
* [_glScissorIndexed](_glScissorIndexed)
* [_glViewport](_glViewport)

View file

@ -1,53 +0,0 @@
**_glReadBuffer:** select a color buffer source for pixel read operations from the current read framebuffer.
## Syntax
SUB _glReadBuffer (BYVAL mode AS _UNSIGNED LONG)
void **_glReadBuffer**(GLenum mode);
; mode
> Specifies a color buffer. Accepted values are [_GL_FRONT_LEFT](_GL_FRONT_LEFT), [_GL_FRONT_RIGHT](_GL_FRONT_RIGHT), [_GL_BACK_LEFT](_GL_BACK_LEFT), [_GL_BACK_RIGHT](_GL_BACK_RIGHT), [_GL_FRONT](_GL_FRONT), [_GL_BACK](_GL_BACK), [_GL_LEFT](_GL_LEFT), [_GL_RIGHT](_GL_RIGHT), and the constants [_GL_COLOR_ATTACHMENT*i*](_GL_COLOR_ATTACHMENT*i*).
## Description
**_glReadBuffer** specifies which color buffer within the current bound [_GL_READ_FRAMEBUFFER](_GL_READ_FRAMEBUFFER) will be used as the source for pixel reading commands. These commands include: [_glBlitFramebuffer](_glBlitFramebuffer), [_glReadPixels](_glReadPixels), [_glCopyTexImage1D](_glCopyTexImage1D), [_glCopyTexImage2D](_glCopyTexImage2D), [_glCopyTexSubImage1D](_glCopyTexSubImage1D), [_glCopyTexSubImage2D](_glCopyTexSubImage2D), and [_glCopyTexSubImage3D](_glCopyTexSubImage3D).
mode accepts one of twelve or more predefined values. If the [default framebuffer](default framebuffer) (the zero [framebuffer object](framebuffer object))is bound to [_GL_READ_FRAMEBUFFER](_GL_READ_FRAMEBUFFER), then the following enumerators can be used: [_GL_FRONT](_GL_FRONT), [_GL_LEFT](_GL_LEFT), and [_GL_FRONT_LEFT](_GL_FRONT_LEFT) all name the front left buffer, [_GL_FRONT_RIGHT](_GL_FRONT_RIGHT) and [_GL_RIGHT](_GL_RIGHT) name the front right buffer, and [_GL_BACK_LEFT](_GL_BACK_LEFT) and [_GL_BACK](_GL_BACK) name the back left buffer. Nonstereo double-buffered configurations have only a front left and a back left buffer. Single-buffered configurations have a front left and a front right buffer if stereo, and only a front left buffer if nonstereo.
If a non-zero framebuffer object is bound, then the constants [_GL_COLOR_ATTACHMENT*i*](_GL_COLOR_ATTACHMENT*i*) may be used to indicate the *i*<sup>th</sup> color attachment, where *i* ranges from zero to the value of [_GL_MAX_COLOR_ATTACHMENTS](_GL_MAX_COLOR_ATTACHMENTS) minus one.
It is an error to specify a nonexistent buffer to **_glReadBuffer**.
For the default framebuffer, mode is initially [_GL_FRONT](_GL_FRONT) in single-buffered configurations and [_GL_BACK](_GL_BACK) in double-buffered configurations. For framebuffer objects, the default read buffer is [_GL_COLOR_ATTACHMENT0](_GL_COLOR_ATTACHMENT0).
## Error(s)
[_GL_INVALID_ENUM](_GL_INVALID_ENUM) is generated if mode is not one of the twelve (or more) accepted values.
[_GL_INVALID_OPERATION](_GL_INVALID_OPERATION) is generated if mode specifies a buffer that does not exist.
## Use With
[_glGet](_glGet) with argument [_GL_READ_BUFFER](_GL_READ_BUFFER)
## See Also
[_GL](_GL)
[_glBindFramebuffer](_glBindFramebuffer), [_glDrawBuffer](_glDrawBuffer), [_glDrawBuffers](_glDrawBuffers), [_glReadPixels](_glReadPixels)
Copyright 1991-2006 Silicon Graphics, Inc. Copyright 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/].

View file

@ -1,208 +0,0 @@
**_glReadPixels:** read a block of pixels from the frame buffer
## Syntax
SUB _glReadPixels (BYVAL x AS LONG, BYVAL y AS LONG, BYVAL width AS LONG, BYVAL height AS LONG, BYVAL format AS _UNSIGNED LONG, BYVAL type AS _UNSIGNED LONG, pixels AS _OFFSET)
void **_glReadPixels**(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid * data);
; x, y
> Specify the window coordinates of the first pixel that is read from the frame buffer. This location is the lower left corner of a rectangular block of pixels.
; width, height
> Specify the dimensions of the pixel rectangle. width and height of one correspond to a single pixel.
Glapi pixeltransferupparams|read=|
## Description
**_glReadPixels** returns pixel data from the frame buffer, starting with the pixel whose lower left corner is at location (x, y), into client memory starting at location data. Several parameters control the processing of the pixel data before it is placed into client memory. These parameters are set with [_glPixelStore](_glPixelStore). This reference page describes the effects on **_glReadPixels** of most, but not all of the parameters specified by these three commands.
If a non-zero named buffer object is bound to the [_GL_PIXEL_PACK_BUFFER](_GL_PIXEL_PACK_BUFFER) target (see [_glBindBuffer](_glBindBuffer)) while a block of pixels is requested, data is treated as a byte offset into the buffer object's data store rather than a pointer to client memory.
**_glReadPixels** returns values from each pixel with lower left corner at (*x* + *i*, *y* + *j*) for 0 <= *i* < *width* and 0 <= *j* < *height*. This pixel is said to be the *i*th pixel in the *j*th row. Pixels are returned in row order from the lowest to the highest row, left to right in each row.
format specifies the format for the returned pixel values; accepted values are:
; [_GL_STENCIL_INDEX](_GL_STENCIL_INDEX)
> Stencil values are read from the stencil buffer. Each index is converted to fixed point, shifted left or right depending on the value and sign of [_GL_INDEX_SHIFT](_GL_INDEX_SHIFT), and added to [_GL_INDEX_OFFSET](_GL_INDEX_OFFSET). If [_GL_MAP_STENCIL](_GL_MAP_STENCIL) is [_GL_TRUE](_GL_TRUE), indices are replaced by their mappings in the table [_GL_PIXEL_MAP_S_TO_S](_GL_PIXEL_MAP_S_TO_S).
; [_GL_DEPTH_COMPONENT](_GL_DEPTH_COMPONENT)
> Depth values are read from the depth buffer. Each component is converted to floating point such that the minimum depth value maps to 0 and the maximum value maps to 1. Each component is then multiplied by [_GL_DEPTH_SCALE](_GL_DEPTH_SCALE), added to [_GL_DEPTH_BIAS](_GL_DEPTH_BIAS), and finally clamped to the range [0, 1].
; [_GL_DEPTH_STENCIL](_GL_DEPTH_STENCIL)
> Values are taken from both the depth and stencil buffers. The type parameter must be [_GL_UNSIGNED_INT_24_8](_GL_UNSIGNED_INT_24_8) or [_GL_FLOAT_32_UNSIGNED_INT_24_8_REV](_GL_FLOAT_32_UNSIGNED_INT_24_8_REV).
; [_GL_RED](_GL_RED)
; [_GL_GREEN](_GL_GREEN)
; [_GL_BLUE](_GL_BLUE)
; [_GL_RGB](_GL_RGB)
; [_GL_BGR](_GL_BGR)
; [_GL_RGBA](_GL_RGBA)
; [_GL_BGRA](_GL_BGRA)
> Finally, the indices or components are converted to the proper format, as specified by type. If format is [_GL_STENCIL_INDEX](_GL_STENCIL_INDEX) and type is not [_GL_FLOAT](_GL_FLOAT), each index is masked with the mask value given in the following table. If type is [_GL_FLOAT](_GL_FLOAT), then each integer index is converted to single-precision floating-point format.
If format is [_GL_RED](_GL_RED), [_GL_GREEN](_GL_GREEN), [_GL_BLUE](_GL_BLUE), [_GL_RGB](_GL_RGB), [_GL_BGR](_GL_BGR), [_GL_RGBA](_GL_RGBA), or [_GL_BGRA](_GL_BGRA) and type is not [_GL_FLOAT](_GL_FLOAT), each component is multiplied by the multiplier shown in the following table. If type is [_GL_FLOAT](_GL_FLOAT), then each component is passed as is (or converted to the client's single-precision floating-point format if it is different from the one used by the GL).
{| class="wikitable"
|+
! type
! **Index Mask**
! **Component Conversion**
|+
| [_GL_UNSIGNED_BYTE](_GL_UNSIGNED_BYTE)
| 2<sup>8</sup> - 1
| <math>(2^8 - 1)c</math>
|+
| [_GL_BYTE](_GL_BYTE)
| 2<sup>7</sup> - 1
| <math>\tfrac{(2^8 - 1)c - 1}{2}</math>
|+
| [_GL_UNSIGNED_SHORT](_GL_UNSIGNED_SHORT)
| 2<sup>16</sup> - 1
| <math>(2^{16} - 1)c</math>
|+
| [_GL_SHORT](_GL_SHORT)
| 2<sup>15</sup> - 1
| <math>\tfrac{(2^{16} - 1)c - 1}{2}</math>
|+
| [_GL_UNSIGNED_INT](_GL_UNSIGNED_INT)
| 2<sup>32</sup> - 1
| <math>(2^{32} - 1)c</math>
|+
| [_GL_INT](_GL_INT)
| 2<sup>31</sup> - 1
| <math>\tfrac{(2^{32} - 1)c - 1}{2}</math>
|+
| [_GL_HALF_FLOAT](_GL_HALF_FLOAT)
| none
| *c*
|+
| [_GL_FLOAT](_GL_FLOAT)
| none
| *c*
|+
| [_GL_UNSIGNED_BYTE_3_3_2](_GL_UNSIGNED_BYTE_3_3_2)
| 2<sup>N</sup> - 1
| <math>(2^N - 1)c</math>
|+
| [_GL_UNSIGNED_BYTE_2_3_3_REV](_GL_UNSIGNED_BYTE_2_3_3_REV)
| 2<sup>N</sup> - 1
| <math>(2^N - 1)c</math>
|+
| [_GL_UNSIGNED_SHORT_5_6_5](_GL_UNSIGNED_SHORT_5_6_5)
| 2<sup>N</sup> - 1
| <math>(2^N - 1)c</math>
|+
| [_GL_UNSIGNED_SHORT_5_6_5_REV](_GL_UNSIGNED_SHORT_5_6_5_REV)
| 2<sup>N</sup> - 1
| <math>(2^N - 1)c</math>
|+
| [_GL_UNSIGNED_SHORT_4_4_4_4](_GL_UNSIGNED_SHORT_4_4_4_4)
| 2<sup>N</sup> - 1
| <math>(2^N - 1)c</math>
|+
| [_GL_UNSIGNED_SHORT_4_4_4_4_REV](_GL_UNSIGNED_SHORT_4_4_4_4_REV)
| 2<sup>N</sup> - 1
| <math>(2^N - 1)c</math>
|+
| [_GL_UNSIGNED_SHORT_5_5_5_1](_GL_UNSIGNED_SHORT_5_5_5_1)
| 2<sup>N</sup> - 1
| <math>(2^N - 1)c</math>
|+
| [_GL_UNSIGNED_SHORT_1_5_5_5_REV](_GL_UNSIGNED_SHORT_1_5_5_5_REV)
| 2<sup>N</sup> - 1
| <math>(2^N - 1)c</math>
|+
| [_GL_UNSIGNED_INT_8_8_8_8](_GL_UNSIGNED_INT_8_8_8_8)
| 2<sup>N</sup> - 1
| <math>(2^N - 1)c</math>
|+
| [_GL_UNSIGNED_INT_8_8_8_8_REV](_GL_UNSIGNED_INT_8_8_8_8_REV)
| 2<sup>N</sup> - 1
| <math>(2^N - 1)c</math>
|+
| [_GL_UNSIGNED_INT_10_10_10_2](_GL_UNSIGNED_INT_10_10_10_2)
| 2<sup>N</sup> - 1
| <math>(2^N - 1)c</math>
|+
| [_GL_UNSIGNED_INT_2_10_10_10_REV](_GL_UNSIGNED_INT_2_10_10_10_REV)
| 2<sup>N</sup> - 1
| <math>(2^N - 1)c</math>
|+
| [_GL_UNSIGNED_INT_24_8](_GL_UNSIGNED_INT_24_8)
| 2<sup>N</sup> - 1
| <math>(2^N - 1)c</math>
|+
| [_GL_UNSIGNED_INT_10F_11F_11F_REV](_GL_UNSIGNED_INT_10F_11F_11F_REV)
| --
| Special
|+
| [_GL_UNSIGNED_INT_5_9_9_9_REV](_GL_UNSIGNED_INT_5_9_9_9_REV)
| --
| Special
|+
| [_GL_FLOAT_32_UNSIGNED_INT_24_8_REV](_GL_FLOAT_32_UNSIGNED_INT_24_8_REV)
| none
| *c* (Depth Only)
|}
Return values are placed in memory as follows. If format is [_GL_STENCIL_INDEX](_GL_STENCIL_INDEX), [_GL_DEPTH_COMPONENT](_GL_DEPTH_COMPONENT), [_GL_RED](_GL_RED), [_GL_GREEN](_GL_GREEN), or [_GL_BLUE](_GL_BLUE), a single value is returned and the data for the *i*th pixel in the *j*th row is placed in location *j* * *width* + *i*. [_GL_RGB](_GL_RGB) and [_GL_BGR](_GL_BGR) return three values, [_GL_RGBA](_GL_RGBA) and [_GL_BGRA](_GL_BGRA) return four values for each pixel, with all values corresponding to a single pixel occupying contiguous space in data. Storage parameters set by [_glPixelStore](_glPixelStore), such as [_GL_PACK_LSB_FIRST](_GL_PACK_LSB_FIRST) and [_GL_PACK_SWAP_BYTES](_GL_PACK_SWAP_BYTES), affect the way that data is written into memory. See [_glPixelStore](_glPixelStore) for a description.
## Notes
Values for pixels that lie outside the window connected to the current GL context are undefined.
If an error is generated, no change is made to the contents of data.
## Error(s)
[_GL_INVALID_ENUM](_GL_INVALID_ENUM) is generated if format or type is not an accepted value.
[_GL_INVALID_VALUE](_GL_INVALID_VALUE) is generated if either width or height is negative.
[_GL_INVALID_OPERATION](_GL_INVALID_OPERATION) is generated if format is [_GL_STENCIL_INDEX](_GL_STENCIL_INDEX) and there is no stencil buffer.
[_GL_INVALID_OPERATION](_GL_INVALID_OPERATION) is generated if format is [_GL_DEPTH_COMPONENT](_GL_DEPTH_COMPONENT) and there is no depth buffer.
[_GL_INVALID_OPERATION](_GL_INVALID_OPERATION) is generated if format is [_GL_DEPTH_STENCIL](_GL_DEPTH_STENCIL) and there is no depth buffer or if there is no stencil buffer.
[_GL_INVALID_ENUM](_GL_INVALID_ENUM) is generated if format is [_GL_DEPTH_STENCIL](_GL_DEPTH_STENCIL) and type is not [_GL_UNSIGNED_INT_24_8](_GL_UNSIGNED_INT_24_8) or [_GL_FLOAT_32_UNSIGNED_INT_24_8_REV](_GL_FLOAT_32_UNSIGNED_INT_24_8_REV).
[_GL_INVALID_OPERATION](_GL_INVALID_OPERATION) is generated if type is one of [_GL_UNSIGNED_BYTE_3_3_2](_GL_UNSIGNED_BYTE_3_3_2), [_GL_UNSIGNED_BYTE_2_3_3_REV](_GL_UNSIGNED_BYTE_2_3_3_REV), [_GL_UNSIGNED_SHORT_5_6_5](_GL_UNSIGNED_SHORT_5_6_5), or [_GL_UNSIGNED_SHORT_5_6_5_REV](_GL_UNSIGNED_SHORT_5_6_5_REV) and format is not [_GL_RGB](_GL_RGB).
[_GL_INVALID_OPERATION](_GL_INVALID_OPERATION) is generated if type is one of [_GL_UNSIGNED_SHORT_4_4_4_4](_GL_UNSIGNED_SHORT_4_4_4_4), [_GL_UNSIGNED_SHORT_4_4_4_4_REV](_GL_UNSIGNED_SHORT_4_4_4_4_REV), [_GL_UNSIGNED_SHORT_5_5_5_1](_GL_UNSIGNED_SHORT_5_5_5_1), [_GL_UNSIGNED_SHORT_1_5_5_5_REV](_GL_UNSIGNED_SHORT_1_5_5_5_REV), [_GL_UNSIGNED_INT_8_8_8_8](_GL_UNSIGNED_INT_8_8_8_8), [_GL_UNSIGNED_INT_8_8_8_8_REV](_GL_UNSIGNED_INT_8_8_8_8_REV), [_GL_UNSIGNED_INT_10_10_10_2](_GL_UNSIGNED_INT_10_10_10_2), or [_GL_UNSIGNED_INT_2_10_10_10_REV](_GL_UNSIGNED_INT_2_10_10_10_REV) and format is neither [_GL_RGBA](_GL_RGBA) nor [_GL_BGRA](_GL_BGRA).
[_GL_INVALID_OPERATION](_GL_INVALID_OPERATION) is generated if a non-zero buffer object name is bound to the [_GL_PIXEL_PACK_BUFFER](_GL_PIXEL_PACK_BUFFER) target and the buffer object's data store is currently mapped.
[_GL_INVALID_OPERATION](_GL_INVALID_OPERATION) is generated if a non-zero buffer object name is bound to the [_GL_PIXEL_PACK_BUFFER](_GL_PIXEL_PACK_BUFFER) target and the data would be packed to the buffer object such that the memory writes required would exceed the data store size.
[_GL_INVALID_OPERATION](_GL_INVALID_OPERATION) is generated if a non-zero buffer object name is bound to the [_GL_PIXEL_PACK_BUFFER](_GL_PIXEL_PACK_BUFFER) target and data is not evenly divisible into the number of bytes needed to store in memory a datum indicated by type.
[_GL_INVALID_OPERATION](_GL_INVALID_OPERATION) is generated if [_GL_READ_FRAMEBUFFER_BINDING](_GL_READ_FRAMEBUFFER_BINDING) is non-zero, the read framebuffer is complete, and the value of [_GL_SAMPLE_BUFFERS](_GL_SAMPLE_BUFFERS) for the read framebuffer is greater than zero.
## Use With
[_glGet](_glGet) with argument [_GL_INDEX_MODE](_GL_INDEX_MODE)
[_glGet](_glGet) with argument [_GL_PIXEL_PACK_BUFFER_BINDING](_GL_PIXEL_PACK_BUFFER_BINDING)
## See Also
[_GL](_GL)
[_glBindFramebuffer](_glBindFramebuffer), [_glClampColor](_glClampColor), [_glDrawBuffers](_glDrawBuffers), [_glDrawBuffers](_glDrawBuffers), [_glPixelStore](_glPixelStore)
[Pixel Transfer](Pixel Transfer), [Pixel Buffer Object](Pixel Buffer Object)
Copyright 1991-2006 Silicon Graphics, Inc. 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/].

View file

@ -1 +0,0 @@

View file

@ -1,46 +0,0 @@
**_glDeleteTextures:** delete named textures
## Syntax
> SUB _glDeleteTextures (BYVAL n AS LONG, textures AS _UNSIGNED LONG)
> void **_glDeleteTextures**(GLsizei n, const GLuint * textures);
; n
> Specifies the number of textures to be deleted.
; textures
> Specifies an array of textures to be deleted.
## Description
**_glDeleteTextures** deletes n textures named by the elements of the array textures. After a texture is deleted, it has no contents or dimensionality, and its name is free for reuse (for example by [_glGenTextures](_glGenTextures)). If a texture that is currently bound is deleted, the binding reverts to 0 (the default texture).
**_glDeleteTextures** silently ignores 0's and names that do not correspond to existing textures.
## Error(s)
[_GL_INVALID_VALUE](_GL_INVALID_VALUE) is generated if n is negative.
## Use With
[_glIsTexture](_glIsTexture)
## See Also
[_GL](_GL)
[_glBindTexture](_glBindTexture), [_glGenTextures](_glGenTextures), [_glIsTexture](_glIsTexture)

View file

@ -1,49 +0,0 @@
**_glGenTextures:** generate texture names
## Syntax
SUB _glGenTextures (BYVAL n AS LONG, textures AS _UNSIGNED LONG)
void **_glGenTextures**(GLsizei n, GLuint * textures);
; n
> Specifies the number of texture names to be generated.
; textures
> Specifies an array in which the generated texture names are stored.
## Description
**_glGenTextures** returns n texture names in textures. There is no guarantee that the names form a contiguous set of integers; however, it is guaranteed that none of the returned names was in use immediately before the call to **_glGenTextures**.
The generated textures have no dimensionality; they assume the dimensionality of the texture target to which they are first bound (see [_glBindTexture](_glBindTexture)).
Texture names returned by a call to **_glGenTextures** are not returned by subsequent calls, unless they are first deleted with [_glDeleteTextures](_glDeleteTextures).
## Error(s)
[_GL_INVALID_VALUE](_GL_INVALID_VALUE) is generated if n is negative.
## Use With
[_glIsTexture](_glIsTexture)
## See Also
[_GL](_GL)
[_glBindTexture](_glBindTexture), [_glDeleteTextures](_glDeleteTextures), [_glIsTexture](_glIsTexture)
Copyright 1991-2006 Silicon Graphics, Inc. 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/].

View file

@ -1,69 +0,0 @@
**_glDepthFunc:** specify the value used for depth buffer comparisons
## Syntax
> : SUB _glDepthFunc (BYVAL func AS _UNSIGNED LONG)
> : void **_glDepthFunc**(GLenum func);
; func
> Specifies the depth comparison function. Symbolic constants [_GL_NEVER](_GL_NEVER), [_GL_LESS](_GL_LESS), [_GL_EQUAL](_GL_EQUAL), [_GL_LEQUAL](_GL_LEQUAL), [_GL_GREATER](_GL_GREATER), [_GL_NOTEQUAL](_GL_NOTEQUAL), [_GL_GEQUAL](_GL_GEQUAL), and [_GL_ALWAYS](_GL_ALWAYS) are accepted. The initial value is [_GL_LESS](_GL_LESS).
## Description
**_glDepthFunc** specifies the function used to compare each incoming pixel depth value with the depth value present in the depth buffer. The comparison is performed only if depth testing is enabled. (See [_glEnable](_glEnable) and [_glDisable](_glDisable) of [_GL_DEPTH_TEST](_GL_DEPTH_TEST).)
func specifies the conditions under which the pixel will be drawn. The comparison functions are as follows:
; [_GL_NEVER](_GL_NEVER)
> Never passes.
; [_GL_LESS](_GL_LESS)
> Passes if the incoming depth value is less than the stored depth value.
; [_GL_EQUAL](_GL_EQUAL)
> Passes if the incoming depth value is equal to the stored depth value.
; [_GL_LEQUAL](_GL_LEQUAL)
> Passes if the incoming depth value is less than or equal to the stored depth value.
; [_GL_GREATER](_GL_GREATER)
> Passes if the incoming depth value is greater than the stored depth value.
; [_GL_NOTEQUAL](_GL_NOTEQUAL)
> Passes if the incoming depth value is not equal to the stored depth value.
; [_GL_GEQUAL](_GL_GEQUAL)
> Passes if the incoming depth value is greater than or equal to the stored depth value.
; [_GL_ALWAYS](_GL_ALWAYS)
> Always passes.
The initial value of func is [_GL_LESS](_GL_LESS). Initially, depth testing is disabled. If depth testing is disabled or if no depth buffer exists, it is as if the depth test always passes.
## Notes
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. In order to unconditionally write to the depth buffer, the depth test should be enabled and set to [_GL_ALWAYS](_GL_ALWAYS).
## Error(s)
[_GL_INVALID_ENUM](_GL_INVALID_ENUM) is generated if func is not an accepted value.
## Use With
[_glGet](_glGet) with argument [_GL_DEPTH_FUNC](_GL_DEPTH_FUNC)
[_glIsEnabled](_glIsEnabled) with argument [_GL_DEPTH_TEST](_GL_DEPTH_TEST)
## See Also
[_GL](_GL)
[_glEnable](_glEnable), [_glDepthRange](_glDepthRange), [_glPolygonOffset](_glPolygonOffset)

View file

@ -1,41 +0,0 @@
**_glDepthMask:** enable or disable writing into the depth buffer
## Syntax
> : SUB _glDepthMask (BYVAL flag AS _UNSIGNED _BYTE)
> : void **_glDepthMask**(GLboolean flag);
; flag
> Specifies whether the depth buffer is enabled for writing. If flag is [_GL_FALSE](_GL_FALSE), depth buffer writing is disabled. Otherwise, it is enabled. Initially, depth buffer writing is enabled.
## Description
**_glDepthMask** specifies whether the depth buffer is enabled for writing. If flag is [_GL_FALSE](_GL_FALSE), depth buffer writing is disabled. Otherwise, it is enabled. Initially, depth buffer writing is enabled.
## Use With
[_glGet](_glGet) with argument [_GL_DEPTH_WRITEMASK](_GL_DEPTH_WRITEMASK)
## Notes
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. In order to unconditionally write to the depth buffer, the depth test should be enabled and set to [_GL_ALWAYS](_GL_ALWAYS) (see [_glDepthFunc](_glDepthFunc)).
## See Also
[_GL](_GL)
[_glColorMask](_glColorMask), [_glClearBuffer](_glClearBuffer), [_glDepthFunc](_glDepthFunc), [_glDepthRange](_glDepthRange), [_glStencilMask](_glStencilMask)

View file

@ -1,48 +0,0 @@
**_glDepthRange:** specify mapping of depth values from normalized device coordinates to window coordinates
## Syntax
> : SUB _glDepthRange (BYVAL zNear AS DOUBLE, BYVAL zFar AS DOUBLE)
> : void **_glDepthRange**(GLdouble nearVal, GLdouble farVal);
> : void **_glDepthRangef**(GLfloat nearVal, GLfloat farVal);
; nearVal
> Specifies the mapping of the near clipping plane to window coordinates. The initial value is 0.
; farVal
> Specifies the mapping of the far clipping plane to window coordinates. The initial value is 1.
## Description
After clipping and division by *w*, depth coordinates range from -1 to 1, corresponding to the near and far clipping planes. **_glDepthRange** specifies a linear mapping of the normalized depth coordinates in this range to window depth coordinates. Regardless of the actual depth buffer implementation, window coordinate depth values are treated as though they range from 0 through 1 (like color components). Thus, the values accepted by **_glDepthRange** are both clamped to this range before they are accepted.
The setting of (0,1) maps the near plane to 0 and the far plane to 1. With this mapping, the depth buffer range is fully utilized.
## Notes
It is not necessary that nearVal be less than farVal. Reverse mappings such as *nearVal* = 1, and *farVal* = 0 are acceptable.
The type of the nearVal and farVal parameters was changed from GLclampf to GLfloat for **_glDepthRangef** and from GLclampd to GLdouble for **_glDepthRange**. This change is transparent to user code.
## Use With
[_glGet](_glGet) with argument [_GL_DEPTH_RANGE](_GL_DEPTH_RANGE)
## See Also
[_GL](_GL)
[_glDepthFunc](_glDepthFunc), [_glDepthRangeArray](_glDepthRangeArray), [_glDepthRangeIndexed](_glDepthRangeIndexed), [_glPolygonOffset](_glPolygonOffset), [_glViewport](_glViewport)

View file

@ -1,553 +0,0 @@
**_glGet:** return the value or values of a selected parameter
## Syntax
SUB _glGetBooleanv (BYVAL pname AS _UNSIGNED LONG, params AS _UNSIGNED _BYTE)
void **_glGetBooleanv**(GLenum *pname*, GLboolean * *params*);
SUB _glGetDoublev (BYVAL pname AS _UNSIGNED LONG, params AS DOUBLE)
void **_glGetDoublev**(GLenum *pname*, GLdouble * *params*);
SUB _glGetFloatv (BYVAL pname AS _UNSIGNED LONG, params AS SINGLE)
void **_glGetFloatv**(GLenum *pname*, GLfloat * *params*);
SUB _glGetIntegerv (BYVAL pname AS _UNSIGNED LONG, params AS LONG)
void **_glGetIntegerv**(GLenum *pname*, GLint * *params*);
void **_glGetInteger64v**(GLenum *pname*, GLint64 * *params*);
; pname
> Specifies the parameter value to be returned. The symbolic constants in the list below are accepted.
; params
> Returns the value or values of the specified parameter.
## Syntax
void **_glGetBooleani_v**(GLenum *pname*, GLuint *index*, GLboolean * *data*);
void **_glGetIntegeri_v**(GLenum *pname*, GLuint *index*, GLint * *data*);
void **_glGetFloati_v**(GLenum *pname*, GLuint *index*, GLfloat * *data*);
void **_glGetDoublei_v**(GLenum *pname*, GLuint *index*, GLdouble * *data*);
void **_glGetInteger64i_v**(GLenum *pname*, GLuint *index*, GLint64 * *data*);
; pname
> Specifies the parameter value to be returned. The symbolic constants in the list below are accepted.
; index
> Specifies the index of the particular element being queried.
; data
> Returns the value or values of the specified parameter.
## Description
These four commands return values for simple state variables in GL. pname is a symbolic constant indicating the state variable to be returned, and params is a pointer to an array of the indicated type in which to place the returned data.
Type conversion is performed if params has a different type than the state variable value being requested. If **_glGetBooleanv** is called, a floating-point (or integer) value is converted to [_GL_FALSE](_GL_FALSE) if and only if it is 0.0 (or 0). Otherwise, it is converted to [_GL_TRUE](_GL_TRUE). If **_glGetIntegerv** is called, boolean values are returned as [_GL_TRUE](_GL_TRUE) or [_GL_FALSE](_GL_FALSE), and most floating-point values are rounded to the nearest integer value. Floating-point colors and normals, however, are returned with a linear mapping that maps 1.0 to the most positive representable integer value and <!--Missing Equation--> to the most negative representable integer value. If **_glGetFloatv** or **_glGetDoublev** is called, boolean values are returned as [_GL_TRUE](_GL_TRUE) or [_GL_FALSE](_GL_FALSE), and integer values are converted to floating-point values.
The following symbolic constants are accepted by pname:
; [_GL_ACTIVE_TEXTURE](_GL_ACTIVE_TEXTURE)
> params returns a single value indicating the active multitexture unit. The initial value is [_GL_TEXTURE0](_GL_TEXTURE0). See [_glActiveTexture](_glActiveTexture).
; [_GL_ALIASED_LINE_WIDTH_RANGE](_GL_ALIASED_LINE_WIDTH_RANGE)
> params returns a pair of values indicating the range of widths supported for aliased lines. See [_glLineWidth](_glLineWidth).
; [_GL_ARRAY_BUFFER_BINDING](_GL_ARRAY_BUFFER_BINDING)
> params returns a single value, the name of the buffer object currently bound to the target [_GL_ARRAY_BUFFER](_GL_ARRAY_BUFFER). If no buffer object is bound to this target, 0 is returned. The initial value is 0. See [_glBindBuffer](_glBindBuffer).
; [_GL_BLEND](_GL_BLEND)
> params returns a single boolean value indicating whether blending is enabled. The initial value is [_GL_FALSE](_GL_FALSE). See [_glBlendFunc](_glBlendFunc).
; [_GL_BLEND_COLOR](_GL_BLEND_COLOR)
> params returns four values, the red, green, blue, and alpha values which are the components of the blend color. See [_glBlendColor](_glBlendColor).
; [_GL_BLEND_DST_ALPHA](_GL_BLEND_DST_ALPHA)
> params returns one value, the symbolic constant identifying the alpha destination blend function. The initial value is [_GL_ZERO](_GL_ZERO). See [_glBlendFunc](_glBlendFunc) and [_glBlendFuncSeparate](_glBlendFuncSeparate).
; [_GL_BLEND_DST_RGB](_GL_BLEND_DST_RGB)
> params returns one value, the symbolic constant identifying the RGB destination blend function. The initial value is [_GL_ZERO](_GL_ZERO). See [_glBlendFunc](_glBlendFunc) and [_glBlendFuncSeparate](_glBlendFuncSeparate).
; [_GL_BLEND_EQUATION_RGB](_GL_BLEND_EQUATION_RGB)
> params returns one value, a symbolic constant indicating whether the RGB blend equation is [_GL_FUNC_ADD](_GL_FUNC_ADD), [_GL_FUNC_SUBTRACT](_GL_FUNC_SUBTRACT), [_GL_FUNC_REVERSE_SUBTRACT](_GL_FUNC_REVERSE_SUBTRACT), [_GL_MIN](_GL_MIN) or [_GL_MAX](_GL_MAX). See [_glBlendEquationSeparate](_glBlendEquationSeparate).
; [_GL_BLEND_EQUATION_ALPHA](_GL_BLEND_EQUATION_ALPHA)
> params returns one value, a symbolic constant indicating whether the Alpha blend equation is [_GL_FUNC_ADD](_GL_FUNC_ADD), [_GL_FUNC_SUBTRACT](_GL_FUNC_SUBTRACT), [_GL_FUNC_REVERSE_SUBTRACT](_GL_FUNC_REVERSE_SUBTRACT), [_GL_MIN](_GL_MIN) or [_GL_MAX](_GL_MAX). See [_glBlendEquationSeparate](_glBlendEquationSeparate).
; [_GL_BLEND_SRC_ALPHA](_GL_BLEND_SRC_ALPHA)
> params returns one value, the symbolic constant identifying the alpha source blend function. The initial value is [_GL_ONE](_GL_ONE). See [_glBlendFunc](_glBlendFunc) and [_glBlendFuncSeparate](_glBlendFuncSeparate).
; [_GL_BLEND_SRC_RGB](_GL_BLEND_SRC_RGB)
> params returns one value, the symbolic constant identifying the RGB source blend function. The initial value is [_GL_ONE](_GL_ONE). See [_glBlendFunc](_glBlendFunc) and [_glBlendFuncSeparate](_glBlendFuncSeparate).
; [_GL_COLOR_CLEAR_VALUE](_GL_COLOR_CLEAR_VALUE)
> params returns four values: the red, green, blue, and alpha values used to clear the color buffers. Integer values, if requested, are linearly mapped from the internal floating-point representation such that 1.0 returns the most positive representable integer value, and <!--Missing Equation--> returns the most negative representable integer value. The initial value is (0, 0, 0, 0). See [_glClearColor](_glClearColor).
; [_GL_COLOR_LOGIC_OP](_GL_COLOR_LOGIC_OP)
> params returns a single boolean value indicating whether a fragment's RGBA color values are merged into the framebuffer using a logical operation. The initial value is [_GL_FALSE](_GL_FALSE). See [_glLogicOp](_glLogicOp).
; [_GL_COLOR_WRITEMASK](_GL_COLOR_WRITEMASK)
> params returns four boolean values: the red, green, blue, and alpha write enables for the color buffers. The initial value is ([_GL_TRUE](_GL_TRUE), [_GL_TRUE](_GL_TRUE), [_GL_TRUE](_GL_TRUE), [_GL_TRUE](_GL_TRUE)). See [_glColorMask](_glColorMask).
; [_GL_COMPRESSED_TEXTURE_FORMATS](_GL_COMPRESSED_TEXTURE_FORMATS)
> params returns a list of symbolic constants of length [_GL_NUM_COMPRESSED_TEXTURE_FORMATS](_GL_NUM_COMPRESSED_TEXTURE_FORMATS) indicating which compressed texture formats are available. See [_glCompressedTexImage2D](_glCompressedTexImage2D).
; [_GL_MAX_COMPUTE_SHADER_STORAGE_BLOCKS](_GL_MAX_COMPUTE_SHADER_STORAGE_BLOCKS)
> params returns one value, the maximum number of active shader storage blocks that may be accessed by a compute shader.
; [_GL_MAX_COMBINED_SHADER_STORAGE_BLOCKS](_GL_MAX_COMBINED_SHADER_STORAGE_BLOCKS)
> params returns one value, the maximum total number of active shader storage blocks that may be accessed by all active shaders.
; [_GL_MAX_COMPUTE_UNIFORM_BLOCKS](_GL_MAX_COMPUTE_UNIFORM_BLOCKS)
> params returns one value, the maximum number of uniform blocks per compute shader. The value must be at least 14. See [_glUniformBlockBinding](_glUniformBlockBinding).
; [_GL_MAX_COMPUTE_TEXTURE_IMAGE_UNITS](_GL_MAX_COMPUTE_TEXTURE_IMAGE_UNITS)
> params returns one value, the maximum supported texture image units that can be used to access texture maps from the compute shader. The value may be at least 16. See [_glActiveTexture](_glActiveTexture).
; [_GL_MAX_COMPUTE_UNIFORM_COMPONENTS](_GL_MAX_COMPUTE_UNIFORM_COMPONENTS)
> params returns one value, the maximum number of individual floating-point, integer, or boolean values that can be held in uniform variable storage for a compute shader. The value must be at least 1024. See [_glUniform](_glUniform).
; [_GL_MAX_COMPUTE_ATOMIC_COUNTERS](_GL_MAX_COMPUTE_ATOMIC_COUNTERS)
> params returns a single value, the maximum number of atomic counters available to compute shaders.
; [_GL_MAX_COMPUTE_ATOMIC_COUNTER_BUFFERS](_GL_MAX_COMPUTE_ATOMIC_COUNTER_BUFFERS)
> params returns a single value, the maximum number of atomic counter buffers that may be accessed by a compute shader.
; [_GL_MAX_COMBINED_COMPUTE_UNIFORM_COMPONENTS](_GL_MAX_COMBINED_COMPUTE_UNIFORM_COMPONENTS)
> params returns one value, the number of words for compute shader uniform variables in all uniform blocks (including default). The value must be at least 1. See [_glUniform](_glUniform).
; [_GL_MAX_COMPUTE_WORK_GROUP_INVOCATIONS](_GL_MAX_COMPUTE_WORK_GROUP_INVOCATIONS)
> params returns one value, the number of invocations in a single local work group (i.e., the product of the three dimensions) that may be dispatched to a compute shader.
; [_GL_MAX_COMPUTE_WORK_GROUP_COUNT](_GL_MAX_COMPUTE_WORK_GROUP_COUNT)
> Accepted by the indexed versions of **_glGet**. params the maximum number of work groups that may be dispatched to a compute shader. Indices 0, 1, and 2 correspond to the X, Y and Z dimensions, respectively.
; [_GL_MAX_COMPUTE_WORK_GROUP_SIZE](_GL_MAX_COMPUTE_WORK_GROUP_SIZE)
> Accepted by the indexed versions of **_glGet**. params the maximum size of a work groups that may be used during compilation of a compute shader. Indices 0, 1, and 2 correspond to the X, Y and Z dimensions, respectively.
; [_GL_DISPATCH_INDIRECT_BUFFER_BINDING](_GL_DISPATCH_INDIRECT_BUFFER_BINDING)
> params returns a single value, the name of the buffer object currently bound to the target [_GL_DISPATCH_INDIRECT_BUFFER](_GL_DISPATCH_INDIRECT_BUFFER). If no buffer object is bound to this target, 0 is returned. The initial value is 0. See [_glBindBuffer](_glBindBuffer).
; [_GL_MAX_DEBUG_GROUP_STACK_DEPTH](_GL_MAX_DEBUG_GROUP_STACK_DEPTH)
> params returns a single value, the maximum depth of the debug message group stack.
; [_GL_DEBUG_GROUP_STACK_DEPTH](_GL_DEBUG_GROUP_STACK_DEPTH)
> params returns a single value, the current depth of the debug message group stack.
; [_GL_CONTEXT_FLAGS](_GL_CONTEXT_FLAGS)
> params returns one value, the flags with which the context was created (such as debugging functionality).
; [_GL_CULL_FACE](_GL_CULL_FACE)
> params returns a single boolean value indicating whether polygon culling is enabled. The initial value is [_GL_FALSE](_GL_FALSE). See [_glCullFace](_glCullFace).
; [_GL_CURRENT_PROGRAM](_GL_CURRENT_PROGRAM)
> params returns one value, the name of the program object that is currently active, or 0 if no program object is active. See [_glUseProgram](_glUseProgram).
; [_GL_DEPTH_CLEAR_VALUE](_GL_DEPTH_CLEAR_VALUE)
> params returns one value, the value that is used to clear the depth buffer. Integer values, if requested, are linearly mapped from the internal floating-point representation such that 1.0 returns the most positive representable integer value, and <!--Missing Equation--> returns the most negative representable integer value. The initial value is 1. See [_glClearDepth](_glClearDepth).
; [_GL_DEPTH_FUNC](_GL_DEPTH_FUNC)
> params returns one value, the symbolic constant that indicates the depth comparison function. The initial value is [_GL_LESS](_GL_LESS). See [_glDepthFunc](_glDepthFunc).
; [_GL_DEPTH_RANGE](_GL_DEPTH_RANGE)
> params returns two values: the near and far mapping limits for the depth buffer. Integer values, if requested, are linearly mapped from the internal floating-point representation such that 1.0 returns the most positive representable integer value, and <!--Missing Equation--> returns the most negative representable integer value. The initial value is (0, 1). See [_glDepthRange](_glDepthRange).
; [_GL_DEPTH_TEST](_GL_DEPTH_TEST)
> params returns a single boolean value indicating whether depth testing of fragments is enabled. The initial value is [_GL_FALSE](_GL_FALSE). See [_glDepthFunc](_glDepthFunc) and [_glDepthRange](_glDepthRange).
; [_GL_DEPTH_WRITEMASK](_GL_DEPTH_WRITEMASK)
> params returns a single boolean value indicating if the depth buffer is enabled for writing. The initial value is [_GL_TRUE](_GL_TRUE). See [_glDepthMask](_glDepthMask).
; [_GL_DITHER](_GL_DITHER)
> params returns a single boolean value indicating whether dithering of fragment colors and indices is enabled. The initial value is [_GL_TRUE](_GL_TRUE).
; [_GL_DOUBLEBUFFER](_GL_DOUBLEBUFFER)
> params returns a single boolean value indicating whether double buffering is supported.
; [_GL_DRAW_BUFFER](_GL_DRAW_BUFFER)
> params returns one value, a symbolic constant indicating which buffers are being drawn to. See [_glDrawBuffer](_glDrawBuffer). The initial value is [_GL_BACK](_GL_BACK) if there are back buffers, otherwise it is [_GL_FRONT](_GL_FRONT).
; [_GL_DRAW_BUFFER](_GL_DRAW_BUFFER)*i*
> params returns one value, a symbolic constant indicating which buffers are being drawn to by the corresponding output color. See [_glDrawBuffers](_glDrawBuffers). The initial value of [_GL_DRAW_BUFFER0](_GL_DRAW_BUFFER0) is [_GL_BACK](_GL_BACK) if there are back buffers, otherwise it is [_GL_FRONT](_GL_FRONT). The initial values of draw buffers for all other output colors is [_GL_NONE](_GL_NONE).
; [_GL_DRAW_FRAMEBUFFER_BINDING](_GL_DRAW_FRAMEBUFFER_BINDING)
> params returns one value, the name of the framebuffer object currently bound to the [_GL_DRAW_FRAMEBUFFER](_GL_DRAW_FRAMEBUFFER) target. If the default framebuffer is bound, this value will be zero. The initial value is zero. See [_glBindFramebuffer](_glBindFramebuffer).
; [_GL_READ_FRAMEBUFFER_BINDING](_GL_READ_FRAMEBUFFER_BINDING)
> params returns one value, the name of the framebuffer object currently bound to the [_GL_READ_FRAMEBUFFER](_GL_READ_FRAMEBUFFER) target. If the default framebuffer is bound, this value will be zero. The initial value is zero. See [_glBindFramebuffer](_glBindFramebuffer).
; [_GL_ELEMENT_ARRAY_BUFFER_BINDING](_GL_ELEMENT_ARRAY_BUFFER_BINDING)
> params returns a single value, the name of the buffer object currently bound to the target [_GL_ELEMENT_ARRAY_BUFFER](_GL_ELEMENT_ARRAY_BUFFER). If no buffer object is bound to this target, 0 is returned. The initial value is 0. See [_glBindBuffer](_glBindBuffer).
; [_GL_FRAGMENT_SHADER_DERIVATIVE_HINT](_GL_FRAGMENT_SHADER_DERIVATIVE_HINT)
> params returns one value, a symbolic constant indicating the mode of the derivative accuracy hint for fragment shaders. The initial value is [_GL_DONT_CARE](_GL_DONT_CARE). See [_glHint](_glHint).
; [_GL_IMPLEMENTATION_COLOR_READ_FORMAT](_GL_IMPLEMENTATION_COLOR_READ_FORMAT)
> params returns a single GLenum value indicating the implementation's preferred pixel data format. See [_glReadPixels](_glReadPixels).
; [_GL_IMPLEMENTATION_COLOR_READ_TYPE](_GL_IMPLEMENTATION_COLOR_READ_TYPE)
> params returns a single GLenum value indicating the implementation's preferred pixel data type. See [_glReadPixels](_glReadPixels).
; [_GL_LINE_SMOOTH](_GL_LINE_SMOOTH)
> params returns a single boolean value indicating whether antialiasing of lines is enabled. The initial value is [_GL_FALSE](_GL_FALSE). See [_glLineWidth](_glLineWidth).
; [_GL_LINE_SMOOTH_HINT](_GL_LINE_SMOOTH_HINT)
> params returns one value, a symbolic constant indicating the mode of the line antialiasing hint. The initial value is [_GL_DONT_CARE](_GL_DONT_CARE). See [_glHint](_glHint).
; [_GL_LINE_WIDTH](_GL_LINE_WIDTH)
> params returns one value, the line width as specified with [_glLineWidth](_glLineWidth). The initial value is 1.
; [_GL_LAYER_PROVOKING_VERTEX](_GL_LAYER_PROVOKING_VERTEX)
> params returns one value, the implementation dependent specifc vertex of a primitive that is used to select the rendering layer. If the value returned is equivalent to [_GL_PROVOKING_VERTEX](_GL_PROVOKING_VERTEX), then the vertex selection follows the convention specified by [_glProvokingVertex](_glProvokingVertex). If the value returned is equivalent to [_GL_FIRST_VERTEX_CONVENTION](_GL_FIRST_VERTEX_CONVENTION), then the selection is always taken from the first vertex in the primitive. If the value returned is equivalent to [_GL_LAST_VERTEX_CONVENTION](_GL_LAST_VERTEX_CONVENTION), then the selection is always taken from the last vertex in the primitive. If the value returned is equivalent to [_GL_UNDEFINED_VERTEX](_GL_UNDEFINED_VERTEX), then the selection is not guaranteed to be taken from any specific vertex in the primitive.
; [_GL_LINE_WIDTH_GRANULARITY](_GL_LINE_WIDTH_GRANULARITY)
> params returns one value, the width difference between adjacent supported widths for antialiased lines. See [_glLineWidth](_glLineWidth).
; [_GL_LINE_WIDTH_RANGE](_GL_LINE_WIDTH_RANGE)
> params returns two values: the smallest and largest supported widths for antialiased lines. See [_glLineWidth](_glLineWidth).
; [_GL_LOGIC_OP_MODE](_GL_LOGIC_OP_MODE)
> params returns one value, a symbolic constant indicating the selected logic operation mode. The initial value is [_GL_COPY](_GL_COPY). See [_glLogicOp](_glLogicOp).
; [_GL_MAJOR_VERSION](_GL_MAJOR_VERSION)
> params returns one value, the major version number of the OpenGL API supported by the current context.
; [_GL_MAX_3D_TEXTURE_SIZE](_GL_MAX_3D_TEXTURE_SIZE)
> params returns one value, a rough estimate of the largest 3D texture that the GL can handle. The value must be at least 64. Use [_GL_PROXY_TEXTURE_3D](_GL_PROXY_TEXTURE_3D) to determine if a texture is too large. See [_glTexImage3D](_glTexImage3D).
; [_GL_MAX_ARRAY_TEXTURE_LAYERS](_GL_MAX_ARRAY_TEXTURE_LAYERS)
> params returns one value. The value indicates the maximum number of layers allowed in an array texture, and must be at least 256. See [_glTexImage2D](_glTexImage2D).
; [_GL_MAX_CLIP_DISTANCES](_GL_MAX_CLIP_DISTANCES)
> params returns one value, the maximum number of application-defined clipping distances. The value must be at least 8.
; [_GL_MAX_COLOR_TEXTURE_SAMPLES](_GL_MAX_COLOR_TEXTURE_SAMPLES)
> params returns one value, the maximum number of samples in a color multisample texture.
; [_GL_MAX_COMBINED_ATOMIC_COUNTERS](_GL_MAX_COMBINED_ATOMIC_COUNTERS)
> params returns a single value, the maximum number of atomic counters available to all active shaders.
; [_GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS](_GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS)
> params returns one value, the number of words for fragment shader uniform variables in all uniform blocks (including default). The value must be at least 1. See [_glUniform](_glUniform).
; [_GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS](_GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS)
> params returns one value, the number of words for geometry shader uniform variables in all uniform blocks (including default). The value must be at least 1. See [_glUniform](_glUniform).
; [_GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS](_GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS)
> params returns one value, the maximum supported texture image units that can be used to access texture maps from the vertex shader and the fragment processor combined. If both the vertex shader and the fragment processing stage access the same texture image unit, then that counts as using two texture image units against this limit. The value must be at least 48. See [_glActiveTexture](_glActiveTexture).
; [_GL_MAX_COMBINED_UNIFORM_BLOCKS](_GL_MAX_COMBINED_UNIFORM_BLOCKS)
> params returns one value, the maximum number of uniform blocks per program. The value must be at least 36. See [_glUniformBlockBinding](_glUniformBlockBinding).
; [_GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS](_GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS)
> params returns one value, the number of words for vertex shader uniform variables in all uniform blocks (including default). The value must be at least 1. See [_glUniform](_glUniform).
; [_GL_MAX_CUBE_MAP_TEXTURE_SIZE](_GL_MAX_CUBE_MAP_TEXTURE_SIZE)
> params returns one value. The value gives a rough estimate of the largest cube-map texture that the GL can handle. The value must be at least 1024. Use [_GL_PROXY_TEXTURE_CUBE_MAP](_GL_PROXY_TEXTURE_CUBE_MAP) to determine if a texture is too large. See [_glTexImage2D](_glTexImage2D).
; [_GL_MAX_DEPTH_TEXTURE_SAMPLES](_GL_MAX_DEPTH_TEXTURE_SAMPLES)
> params returns one value, the maximum number of samples in a multisample depth or depth-stencil texture.
; [_GL_MAX_DRAW_BUFFERS](_GL_MAX_DRAW_BUFFERS)
> params returns one value, the maximum number of simultaneous outputs that may be written in a fragment shader. The value must be at least 8. See [_glDrawBuffers](_glDrawBuffers).
; [_GL_MAX_DUALSOURCE_DRAW_BUFFERS](_GL_MAX_DUALSOURCE_DRAW_BUFFERS)
> params returns one value, the maximum number of active draw buffers when using dual-source blending. The value must be at least 1. See [_glBlendFunc](_glBlendFunc) and [_glBlendFuncSeparate](_glBlendFuncSeparate).
; [_GL_MAX_ELEMENTS_INDICES](_GL_MAX_ELEMENTS_INDICES)
> params returns one value, the recommended maximum number of vertex array indices. See [_glDrawRangeElements](_glDrawRangeElements).
; [_GL_MAX_ELEMENTS_VERTICES](_GL_MAX_ELEMENTS_VERTICES)
> params returns one value, the recommended maximum number of vertex array vertices. See [_glDrawRangeElements](_glDrawRangeElements).
; [_GL_MAX_FRAGMENT_ATOMIC_COUNTERS](_GL_MAX_FRAGMENT_ATOMIC_COUNTERS)
> params returns a single value, the maximum number of atomic counters available to fragment shaders.
; [_GL_MAX_FRAGMENT_SHADER_STORAGE_BLOCKS](_GL_MAX_FRAGMENT_SHADER_STORAGE_BLOCKS)
> params returns one value, the maximum number of active shader storage blocks that may be accessed by a fragment shader.
; [_GL_MAX_FRAGMENT_INPUT_COMPONENTS](_GL_MAX_FRAGMENT_INPUT_COMPONENTS)
> params returns one value, the maximum number of components of the inputs read by the fragment shader, which must be at least 128.
; [_GL_MAX_FRAGMENT_UNIFORM_COMPONENTS](_GL_MAX_FRAGMENT_UNIFORM_COMPONENTS)
> params returns one value, the maximum number of individual floating-point, integer, or boolean values that can be held in uniform variable storage for a fragment shader. The value must be at least 1024. See [_glUniform](_glUniform).
; [_GL_MAX_FRAGMENT_UNIFORM_VECTORS](_GL_MAX_FRAGMENT_UNIFORM_VECTORS)
> params returns one value, the maximum number of individual 4-vectors of floating-point, integer, or boolean values that can be held in uniform variable storage for a fragment shader. The value is equal to the value of [_GL_MAX_FRAGMENT_UNIFORM_COMPONENTS](_GL_MAX_FRAGMENT_UNIFORM_COMPONENTS) divided by 4 and must be at least 256. See [_glUniform](_glUniform).
; [_GL_MAX_FRAGMENT_UNIFORM_BLOCKS](_GL_MAX_FRAGMENT_UNIFORM_BLOCKS)
> params returns one value, the maximum number of uniform blocks per fragment shader. The value must be at least 12. See [_glUniformBlockBinding](_glUniformBlockBinding).
; [_GL_MAX_FRAMEBUFFER_WIDTH](_GL_MAX_FRAMEBUFFER_WIDTH)
> params returns one value, the maximum width for a framebuffer that has no attachments, which must be at least 16384. See [_glFramebufferParameter](_glFramebufferParameter).
; [_GL_MAX_FRAMEBUFFER_HEIGHT](_GL_MAX_FRAMEBUFFER_HEIGHT)
> params returns one value, the maximum height for a framebuffer that has no attachments, which must be at least 16384. See [_glFramebufferParameter](_glFramebufferParameter).
; [_GL_MAX_FRAMEBUFFER_LAYERS](_GL_MAX_FRAMEBUFFER_LAYERS)
> params returns one value, the maximum number of layers for a framebuffer that has no attachments, which must be at least 2048. See [_glFramebufferParameter](_glFramebufferParameter).
; [_GL_MAX_FRAMEBUFFER_SAMPLES](_GL_MAX_FRAMEBUFFER_SAMPLES)
> params returns one value, the maximum samples in a framebuffer that has no attachments, which must be at least 4. See [_glFramebufferParameter](_glFramebufferParameter).
; [_GL_MAX_GEOMETRY_ATOMIC_COUNTERS](_GL_MAX_GEOMETRY_ATOMIC_COUNTERS)
> params returns a single value, the maximum number of atomic counters available to geometry shaders.
; [_GL_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS](_GL_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS)
> params returns one value, the maximum number of active shader storage blocks that may be accessed by a geometry shader.
; [_GL_MAX_GEOMETRY_INPUT_COMPONENTS](_GL_MAX_GEOMETRY_INPUT_COMPONENTS)
> params returns one value, the maximum number of components of inputs read by a geometry shader, which must be at least 64.
; [_GL_MAX_GEOMETRY_OUTPUT_COMPONENTS](_GL_MAX_GEOMETRY_OUTPUT_COMPONENTS)
> params returns one value, the maximum number of components of outputs written by a geometry shader, which must be at least 128.
; [_GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS](_GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS)
> params returns one value, the maximum supported texture image units that can be used to access texture maps from the geometry shader. The value must be at least 16. See [_glActiveTexture](_glActiveTexture).
; [_GL_MAX_GEOMETRY_UNIFORM_BLOCKS](_GL_MAX_GEOMETRY_UNIFORM_BLOCKS)
> params returns one value, the maximum number of uniform blocks per geometry shader. The value must be at least 12. See [_glUniformBlockBinding](_glUniformBlockBinding).
; [_GL_MAX_GEOMETRY_UNIFORM_COMPONENTS](_GL_MAX_GEOMETRY_UNIFORM_COMPONENTS)
> params returns one value, the maximum number of individual floating-point, integer, or boolean values that can be held in uniform variable storage for a geometry shader. The value must be at least 1024. See [_glUniform](_glUniform).
; [_GL_MAX_INTEGER_SAMPLES](_GL_MAX_INTEGER_SAMPLES)
> params returns one value, the maximum number of samples supported in integer format multisample buffers.
; [_GL_MIN_MAP_BUFFER_ALIGNMENT](_GL_MIN_MAP_BUFFER_ALIGNMENT)
> params returns one value, the minimum alignment in basic machine units of pointers returned from[_glMapBuffer](_glMapBuffer) and [_glMapBufferRange](_glMapBufferRange). This value must be a power of two and must be at least 64.
; [_GL_MAX_LABEL_LENGTH](_GL_MAX_LABEL_LENGTH)
> params returns one value, the maximum length of a label that may be assigned to an object. See [_glObjectLabel](_glObjectLabel) and [_glObjectPtrLabel](_glObjectPtrLabel).
; [_GL_MAX_PROGRAM_TEXEL_OFFSET](_GL_MAX_PROGRAM_TEXEL_OFFSET)
> params returns one value, the maximum texel offset allowed in a texture lookup, which must be at least 7.
; [_GL_MIN_PROGRAM_TEXEL_OFFSET](_GL_MIN_PROGRAM_TEXEL_OFFSET)
> params returns one value, the minimum texel offset allowed in a texture lookup, which must be at most -8.
; [_GL_MAX_RECTANGLE_TEXTURE_SIZE](_GL_MAX_RECTANGLE_TEXTURE_SIZE)
> params returns one value. The value gives a rough estimate of the largest rectangular texture that the GL can handle. The value must be at least 1024. Use [_GL_PROXY_RECTANGLE_TEXTURE](_GL_PROXY_RECTANGLE_TEXTURE) to determine if a texture is too large. See [_glTexImage2D](_glTexImage2D).
; [_GL_MAX_RENDERBUFFER_SIZE](_GL_MAX_RENDERBUFFER_SIZE)
> params returns one value. The value indicates the maximum supported size for renderbuffers. See [_glFramebufferRenderbuffer](_glFramebufferRenderbuffer).
; [_GL_MAX_SAMPLE_MASK_WORDS](_GL_MAX_SAMPLE_MASK_WORDS)
> params returns one value, the maximum number of sample mask words.
; [_GL_MAX_SERVER_WAIT_TIMEOUT](_GL_MAX_SERVER_WAIT_TIMEOUT)
> params returns one value, the maximum [_glWaitSync](_glWaitSync) timeout interval.
; [_GL_MAX_SHADER_STORAGE_BUFFER_BINDINGS](_GL_MAX_SHADER_STORAGE_BUFFER_BINDINGS)
> params returns one value, the maximum number of shader storage buffer binding points on the context, which must be at least 8.
; [_GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS](_GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS)
> params returns a single value, the maximum number of atomic counters available to tessellation control shaders.
; [_GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS](_GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS)
> params returns a single value, the maximum number of atomic counters available to tessellation evaluation shaders.
; [_GL_MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS](_GL_MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS)
> params returns one value, the maximum number of active shader storage blocks that may be accessed by a tessellation control shader.
; [_GL_MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS](_GL_MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS)
> params returns one value, the maximum number of active shader storage blocks that may be accessed by a tessellation evaluation shader.
; [_GL_MAX_TEXTURE_BUFFER_SIZE](_GL_MAX_TEXTURE_BUFFER_SIZE)
> params returns one value. The value gives the maximum number of texels allowed in the texel array of a texture buffer object. Value must be at least 65536.
; [_GL_MAX_TEXTURE_IMAGE_UNITS](_GL_MAX_TEXTURE_IMAGE_UNITS)
> params returns one value, the maximum supported texture image units that can be used to access texture maps from the fragment shader. The value must be at least 16. See [_glActiveTexture](_glActiveTexture).
; [_GL_MAX_TEXTURE_LOD_BIAS](_GL_MAX_TEXTURE_LOD_BIAS)
> params returns one value, the maximum, absolute value of the texture level-of-detail bias. The value must be at least 2.0.
; [_GL_MAX_TEXTURE_SIZE](_GL_MAX_TEXTURE_SIZE)
> params returns one value. The value gives a rough estimate of the largest texture that the GL can handle. The value must be at least 1024. Use a proxy texture target such as [_GL_PROXY_TEXTURE_1D](_GL_PROXY_TEXTURE_1D) or [_GL_PROXY_TEXTURE_2D](_GL_PROXY_TEXTURE_2D) to determine if a texture is too large. See [_glTexImage1D](_glTexImage1D) and [_glTexImage2D](_glTexImage2D).
; [_GL_MAX_UNIFORM_BUFFER_BINDINGS](_GL_MAX_UNIFORM_BUFFER_BINDINGS)
> params returns one value, the maximum number of uniform buffer binding points on the context, which must be at least 36.
; [_GL_MAX_UNIFORM_BLOCK_SIZE](_GL_MAX_UNIFORM_BLOCK_SIZE)
> params returns one value, the maximum size in basic machine units of a uniform block, which must be at least 16384.
; [_GL_MAX_UNIFORM_LOCATIONS](_GL_MAX_UNIFORM_LOCATIONS)
> params returns one value, the maximum number of explicitly assignable uniform locations, which must be at least 1024.
; [_GL_MAX_VARYING_COMPONENTS](_GL_MAX_VARYING_COMPONENTS)
> params returns one value, the number components for varying variables, which must be at least 60.
; [_GL_MAX_VARYING_VECTORS](_GL_MAX_VARYING_VECTORS)
> params returns one value, the number 4-vectors for varying variables, which is equal to the value of [_GL_MAX_VARYING_COMPONENTS](_GL_MAX_VARYING_COMPONENTS) and must be at least 15.
; [_GL_MAX_VARYING_FLOATS](_GL_MAX_VARYING_FLOATS)
> params returns one value, the maximum number of interpolators available for processing varying variables used by vertex and fragment shaders. This value represents the number of individual floating-point values that can be interpolated; varying variables declared as vectors, matrices, and arrays will all consume multiple interpolators. The value must be at least 32.
; [_GL_MAX_VERTEX_ATOMIC_COUNTERS](_GL_MAX_VERTEX_ATOMIC_COUNTERS)
> params returns a single value, the maximum number of atomic counters available to vertex shaders.
; [_GL_MAX_VERTEX_ATTRIBS](_GL_MAX_VERTEX_ATTRIBS)
> params returns one value, the maximum number of 4-component generic vertex attributes accessible to a vertex shader. The value must be at least 16. See [_glVertexAttrib](_glVertexAttrib).
; [_GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS](_GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS)
> params returns one value, the maximum number of active shader storage blocks that may be accessed by a vertex shader.
; [_GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS](_GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS)
> params returns one value, the maximum supported texture image units that can be used to access texture maps from the vertex shader. The value may be at least 16. See [_glActiveTexture](_glActiveTexture).
; [_GL_MAX_VERTEX_UNIFORM_COMPONENTS](_GL_MAX_VERTEX_UNIFORM_COMPONENTS)
> params returns one value, the maximum number of individual floating-point, integer, or boolean values that can be held in uniform variable storage for a vertex shader. The value must be at least 1024. See [_glUniform](_glUniform).
; [_GL_MAX_VERTEX_UNIFORM_VECTORS](_GL_MAX_VERTEX_UNIFORM_VECTORS)
> params returns one value, the maximum number of 4-vectors that may be held in uniform variable storage for the vertex shader. The value of [_GL_MAX_VERTEX_UNIFORM_VECTORS](_GL_MAX_VERTEX_UNIFORM_VECTORS) is equal to the value of [_GL_MAX_VERTEX_UNIFORM_COMPONENTS](_GL_MAX_VERTEX_UNIFORM_COMPONENTS) and must be at least 256.
; [_GL_MAX_VERTEX_OUTPUT_COMPONENTS](_GL_MAX_VERTEX_OUTPUT_COMPONENTS)
> params returns one value, the maximum number of components of output written by a vertex shader, which must be at least 64.
; [_GL_MAX_VERTEX_UNIFORM_BLOCKS](_GL_MAX_VERTEX_UNIFORM_BLOCKS)
> params returns one value, the maximum number of uniform blocks per vertex shader. The value must be at least 12. See [_glUniformBlockBinding](_glUniformBlockBinding).
; [_GL_MAX_VIEWPORT_DIMS](_GL_MAX_VIEWPORT_DIMS)
> params returns two values: the maximum supported width and height of the viewport. These must be at least as large as the visible dimensions of the display being rendered to. See [_glViewport](_glViewport).
; [_GL_MAX_VIEWPORTS](_GL_MAX_VIEWPORTS)
> params returns one value, the maximum number of simultaneous viewports that are supported. The value must be at least 16. See [_glViewportIndexed](_glViewportIndexed).
; [_GL_MINOR_VERSION](_GL_MINOR_VERSION)
> params returns one value, the minor version number of the OpenGL API supported by the current context.
; [_GL_NUM_COMPRESSED_TEXTURE_FORMATS](_GL_NUM_COMPRESSED_TEXTURE_FORMATS)
> params returns a single integer value indicating the number of available compressed texture formats. The minimum value is 4. See [_glCompressedTexImage2D](_glCompressedTexImage2D).
; [_GL_NUM_EXTENSIONS](_GL_NUM_EXTENSIONS)
> params returns one value, the number of extensions supported by the GL implementation for the current context. See [_glGetString](_glGetString).
; [_GL_NUM_PROGRAM_BINARY_FORMATS](_GL_NUM_PROGRAM_BINARY_FORMATS)
> params returns one value, the number of program binary formats supported by the implementation.
; [_GL_NUM_SHADER_BINARY_FORMATS](_GL_NUM_SHADER_BINARY_FORMATS)
> params returns one value, the number of binary shader formats supported by the implementation. If this value is greater than zero, then the implementation supports loading binary shaders. If it is zero, then the loading of binary shaders by the implementation is not supported.
; [_GL_PACK_ALIGNMENT](_GL_PACK_ALIGNMENT)
> params returns one value, the byte alignment used for writing pixel data to memory. The initial value is 4. See [_glPixelStore](_glPixelStore).
; [_GL_PACK_IMAGE_HEIGHT](_GL_PACK_IMAGE_HEIGHT)
> params returns one value, the image height used for writing pixel data to memory. The initial value is 0. See [_glPixelStore](_glPixelStore).
; [_GL_PACK_LSB_FIRST](_GL_PACK_LSB_FIRST)
> params returns a single boolean value indicating whether single-bit pixels being written to memory are written first to the least significant bit of each unsigned byte. The initial value is [_GL_FALSE](_GL_FALSE). See [_glPixelStore](_glPixelStore).
; [_GL_PACK_ROW_LENGTH](_GL_PACK_ROW_LENGTH)
> params returns one value, the row length used for writing pixel data to memory. The initial value is 0. See [_glPixelStore](_glPixelStore).
; [_GL_PACK_SKIP_IMAGES](_GL_PACK_SKIP_IMAGES)
> params returns one value, the number of pixel images skipped before the first pixel is written into memory. The initial value is 0. See [_glPixelStore](_glPixelStore).
; [_GL_PACK_SKIP_PIXELS](_GL_PACK_SKIP_PIXELS)
> params returns one value, the number of pixel locations skipped before the first pixel is written into memory. The initial value is 0. See [_glPixelStore](_glPixelStore).
; [_GL_PACK_SKIP_ROWS](_GL_PACK_SKIP_ROWS)
> params returns one value, the number of rows of pixel locations skipped before the first pixel is written into memory. The initial value is 0. See [_glPixelStore](_glPixelStore).
; [_GL_PACK_SWAP_BYTES](_GL_PACK_SWAP_BYTES)
> params returns a single boolean value indicating whether the bytes of two-byte and four-byte pixel indices and components are swapped before being written to memory. The initial value is [_GL_FALSE](_GL_FALSE). See [_glPixelStore](_glPixelStore).
; [_GL_PIXEL_PACK_BUFFER_BINDING](_GL_PIXEL_PACK_BUFFER_BINDING)
> params returns a single value, the name of the buffer object currently bound to the target [_GL_PIXEL_PACK_BUFFER](_GL_PIXEL_PACK_BUFFER). If no buffer object is bound to this target, 0 is returned. The initial value is 0. See [_glBindBuffer](_glBindBuffer).
; [_GL_PIXEL_UNPACK_BUFFER_BINDING](_GL_PIXEL_UNPACK_BUFFER_BINDING)
> params returns a single value, the name of the buffer object currently bound to the target [_GL_PIXEL_UNPACK_BUFFER](_GL_PIXEL_UNPACK_BUFFER). If no buffer object is bound to this target, 0 is returned. The initial value is 0. See [_glBindBuffer](_glBindBuffer).
; [_GL_POINT_FADE_THRESHOLD_SIZE](_GL_POINT_FADE_THRESHOLD_SIZE)
> params returns one value, the point size threshold for determining the point size. See [_glPointParameter](_glPointParameter).
; [_GL_PRIMITIVE_RESTART_INDEX](_GL_PRIMITIVE_RESTART_INDEX)
> params returns one value, the current primitive restart index. The initial value is 0. See [_glPrimitiveRestartIndex](_glPrimitiveRestartIndex).
; [_GL_PROGRAM_BINARY_FORMATS](_GL_PROGRAM_BINARY_FORMATS)
> params an array of [_GL_NUM_PROGRAM_BINARY_FORMATS](_GL_NUM_PROGRAM_BINARY_FORMATS) values, indicating the proram binary formats supported by the implementation.
; [_GL_PROGRAM_PIPELINE_BINDING](_GL_PROGRAM_PIPELINE_BINDING)
> params a single value, the name of the currently bound program pipeline object, or zero if no program pipeline object is bound. See [_glBindProgramPipeline](_glBindProgramPipeline).
; [_GL_PROVOKING_VERTEX](_GL_PROVOKING_VERTEX)
> params returns one value, the currently selected provoking vertex convention. The initial value is [_GL_LAST_VERTEX_CONVENTION](_GL_LAST_VERTEX_CONVENTION). See [_glProvokingVertex](_glProvokingVertex).
; [_GL_POINT_SIZE](_GL_POINT_SIZE)
> params returns one value, the point size as specified by [_glPointSize](_glPointSize). The initial value is 1.
; [_GL_POINT_SIZE_GRANULARITY](_GL_POINT_SIZE_GRANULARITY)
> params returns one value, the size difference between adjacent supported sizes for antialiased points. See [_glPointSize](_glPointSize).
; [_GL_POINT_SIZE_RANGE](_GL_POINT_SIZE_RANGE)
> params returns two values: the smallest and largest supported sizes for antialiased points. The smallest size must be at most 1, and the largest size must be at least 1. See [_glPointSize](_glPointSize).
; [_GL_POLYGON_OFFSET_FACTOR](_GL_POLYGON_OFFSET_FACTOR)
> params returns one value, the scaling factor used to determine the variable offset that is added to the depth value of each fragment generated when a polygon is rasterized. The initial value is 0. See [_glPolygonOffset](_glPolygonOffset).
; [_GL_POLYGON_OFFSET_UNITS](_GL_POLYGON_OFFSET_UNITS)
> params returns one value. This value is multiplied by an implementation-specific value and then added to the depth value of each fragment generated when a polygon is rasterized. The initial value is 0. See [_glPolygonOffset](_glPolygonOffset).
; [_GL_POLYGON_OFFSET_FILL](_GL_POLYGON_OFFSET_FILL)
> params returns a single boolean value indicating whether polygon offset is enabled for polygons in fill mode. The initial value is [_GL_FALSE](_GL_FALSE). See [_glPolygonOffset](_glPolygonOffset).
; [_GL_POLYGON_OFFSET_LINE](_GL_POLYGON_OFFSET_LINE)
> params returns a single boolean value indicating whether polygon offset is enabled for polygons in line mode. The initial value is [_GL_FALSE](_GL_FALSE). See [_glPolygonOffset](_glPolygonOffset).
; [_GL_POLYGON_OFFSET_POINT](_GL_POLYGON_OFFSET_POINT)
> params returns a single boolean value indicating whether polygon offset is enabled for polygons in point mode. The initial value is [_GL_FALSE](_GL_FALSE). See [_glPolygonOffset](_glPolygonOffset).
; [_GL_POLYGON_SMOOTH](_GL_POLYGON_SMOOTH)
> params returns a single boolean value indicating whether antialiasing of polygons is enabled. The initial value is [_GL_FALSE](_GL_FALSE). See [_glPolygonMode](_glPolygonMode).
; [_GL_POLYGON_SMOOTH_HINT](_GL_POLYGON_SMOOTH_HINT)
> params returns one value, a symbolic constant indicating the mode of the polygon antialiasing hint. The initial value is [_GL_DONT_CARE](_GL_DONT_CARE). See [_glHint](_glHint).
; [_GL_READ_BUFFER](_GL_READ_BUFFER)
> params returns one value, a symbolic constant indicating which color buffer is selected for reading. The initial value is [_GL_BACK](_GL_BACK) if there is a back buffer, otherwise it is [_GL_FRONT](_GL_FRONT). See [_glReadPixels](_glReadPixels).
; [_GL_RENDERBUFFER_BINDING](_GL_RENDERBUFFER_BINDING)
> params returns a single value, the name of the renderbuffer object currently bound to the target [_GL_RENDERBUFFER](_GL_RENDERBUFFER). If no renderbuffer object is bound to this target, 0 is returned. The initial value is 0. See [_glBindRenderbuffer](_glBindRenderbuffer).
; [_GL_SAMPLE_BUFFERS](_GL_SAMPLE_BUFFERS)
> params returns a single integer value indicating the number of sample buffers associated with the framebuffer. See [_glSampleCoverage](_glSampleCoverage).
; [_GL_SAMPLE_COVERAGE_VALUE](_GL_SAMPLE_COVERAGE_VALUE)
> params returns a single positive floating-point value indicating the current sample coverage value. See [_glSampleCoverage](_glSampleCoverage).
; [_GL_SAMPLE_COVERAGE_INVERT](_GL_SAMPLE_COVERAGE_INVERT)
> params returns a single boolean value indicating if the temporary coverage value should be inverted. See [_glSampleCoverage](_glSampleCoverage).
; [_GL_SAMPLER_BINDING](_GL_SAMPLER_BINDING)
> params returns a single value, the name of the sampler object currently bound to the active texture unit. The initial value is 0. See [_glBindSampler](_glBindSampler).
; [_GL_SAMPLES](_GL_SAMPLES)
> params returns a single integer value indicating the coverage mask size. See [_glSampleCoverage](_glSampleCoverage).
; [_GL_SCISSOR_BOX](_GL_SCISSOR_BOX)
> params returns four values: the <!--Missing Equation--> and <!--Missing Equation--> window coordinates of the scissor box, followed by its width and height. Initially the <!--Missing Equation--> and <!--Missing Equation--> window coordinates are both 0 and the width and height are set to the size of the window. See [_glScissor](_glScissor).
; [_GL_SCISSOR_TEST](_GL_SCISSOR_TEST)
> params returns a single boolean value indicating whether scissoring is enabled. The initial value is [_GL_FALSE](_GL_FALSE). See [_glScissor](_glScissor).
; [_GL_SHADER_COMPILER](_GL_SHADER_COMPILER)
> params returns a single boolean value indicating whether an online shader compiler is present in the implementation. All desktop OpenGL implementations must support online shader compilations, and therefore the value of [_GL_SHADER_COMPILER](_GL_SHADER_COMPILER) will always be [_GL_TRUE](_GL_TRUE).
; [_GL_SHADER_STORAGE_BUFFER_BINDING](_GL_SHADER_STORAGE_BUFFER_BINDING)
> When used with non-indexed variants of **_glGet** (such as **_glGetIntegerv**), params returns a single value, the name of the buffer object currently bound to the target [_GL_SHADER_STORAGE_BUFFER](_GL_SHADER_STORAGE_BUFFER). If no buffer object is bound to this target, 0 is returned. When used with indexed variants of **_glGet** (such as **_glGetIntegeri_v**), params returns a single value, the name of the buffer object bound to the indexed shader storage buffer binding points. The initial value is 0 for all targets. See [_glBindBuffer](_glBindBuffer), [_glBindBufferBase](_glBindBufferBase), and [_glBindBufferRange](_glBindBufferRange).
; [_GL_SHADER_STORAGE_BUFFER_OFFSET_ALIGNMENT](_GL_SHADER_STORAGE_BUFFER_OFFSET_ALIGNMENT)
> params returns a single value, the minimum required alignment for shader storage buffer sizes and offset. The initial value is 1. See [_glShaderStorageBlockBinding](_glShaderStorageBlockBinding).
; [_GL_SHADER_STORAGE_BUFFER_START](_GL_SHADER_STORAGE_BUFFER_START)
> When used with indexed variants of **_glGet** (such as **_glGetInteger64i_v**), params returns a single value, the start offset of the binding range for each indexed shader storage buffer binding. The initial value is 0 for all bindings. See [_glBindBufferRange](_glBindBufferRange).
; [_GL_SHADER_STORAGE_BUFFER_SIZE](_GL_SHADER_STORAGE_BUFFER_SIZE)
> When used with indexed variants of **_glGet** (such as **_glGetInteger64i_v**), params returns a single value, the size of the binding range for each indexed shader storage buffer binding. The initial value is 0 for all bindings. See [_glBindBufferRange](_glBindBufferRange).
; [_GL_SMOOTH_LINE_WIDTH_RANGE](_GL_SMOOTH_LINE_WIDTH_RANGE)
> params returns a pair of values indicating the range of widths supported for smooth (antialiased) lines. See [_glLineWidth](_glLineWidth).
; [_GL_SMOOTH_LINE_WIDTH_GRANULARITY](_GL_SMOOTH_LINE_WIDTH_GRANULARITY)
> params returns a single value indicating the level of quantization applied to smooth line width parameters.
; [_GL_STENCIL_BACK_FAIL](_GL_STENCIL_BACK_FAIL)
> params returns one value, a symbolic constant indicating what action is taken for back-facing polygons when the stencil test fails. The initial value is [_GL_KEEP](_GL_KEEP). See [_glStencilOpSeparate](_glStencilOpSeparate).
; [_GL_STENCIL_BACK_FUNC](_GL_STENCIL_BACK_FUNC)
> params returns one value, a symbolic constant indicating what function is used for back-facing polygons to compare the stencil reference value with the stencil buffer value. The initial value is [_GL_ALWAYS](_GL_ALWAYS). See [_glStencilFuncSeparate](_glStencilFuncSeparate).
; [_GL_STENCIL_BACK_PASS_DEPTH_FAIL](_GL_STENCIL_BACK_PASS_DEPTH_FAIL)
> params returns one value, a symbolic constant indicating what action is taken for back-facing polygons when the stencil test passes, but the depth test fails. The initial value is [_GL_KEEP](_GL_KEEP). See [_glStencilOpSeparate](_glStencilOpSeparate).
; [_GL_STENCIL_BACK_PASS_DEPTH_PASS](_GL_STENCIL_BACK_PASS_DEPTH_PASS)
> params returns one value, a symbolic constant indicating what action is taken for back-facing polygons when the stencil test passes and the depth test passes. The initial value is [_GL_KEEP](_GL_KEEP). See [_glStencilOpSeparate](_glStencilOpSeparate).
; [_GL_STENCIL_BACK_REF](_GL_STENCIL_BACK_REF)
> params returns one value, the reference value that is compared with the contents of the stencil buffer for back-facing polygons. The initial value is 0. See [_glStencilFuncSeparate](_glStencilFuncSeparate).
; [_GL_STENCIL_BACK_VALUE_MASK](_GL_STENCIL_BACK_VALUE_MASK)
> params returns one value, the mask that is used for back-facing polygons to mask both the stencil reference value and the stencil buffer value before they are compared. The initial value is all 1's. See [_glStencilFuncSeparate](_glStencilFuncSeparate).
; [_GL_STENCIL_BACK_WRITEMASK](_GL_STENCIL_BACK_WRITEMASK)
> params returns one value, the mask that controls writing of the stencil bitplanes for back-facing polygons. The initial value is all 1's. See [_glStencilMaskSeparate](_glStencilMaskSeparate).
; [_GL_STENCIL_CLEAR_VALUE](_GL_STENCIL_CLEAR_VALUE)
> params returns one value, the index to which the stencil bitplanes are cleared. The initial value is 0. See [_glClearStencil](_glClearStencil).
; [_GL_STENCIL_FAIL](_GL_STENCIL_FAIL)
> params returns one value, a symbolic constant indicating what action is taken when the stencil test fails. The initial value is [_GL_KEEP](_GL_KEEP). See [_glStencilOp](_glStencilOp). This stencil state only affects non-polygons and front-facing polygons. Back-facing polygons use separate stencil state. See [_glStencilOpSeparate](_glStencilOpSeparate).
; [_GL_STENCIL_FUNC](_GL_STENCIL_FUNC)
> params returns one value, a symbolic constant indicating what function is used to compare the stencil reference value with the stencil buffer value. The initial value is [_GL_ALWAYS](_GL_ALWAYS). See [_glStencilFunc](_glStencilFunc). This stencil state only affects non-polygons and front-facing polygons. Back-facing polygons use separate stencil state. See [_glStencilFuncSeparate](_glStencilFuncSeparate).
; [_GL_STENCIL_PASS_DEPTH_FAIL](_GL_STENCIL_PASS_DEPTH_FAIL)
> params returns one value, a symbolic constant indicating what action is taken when the stencil test passes, but the depth test fails. The initial value is [_GL_KEEP](_GL_KEEP). See [_glStencilOp](_glStencilOp). This stencil state only affects non-polygons and front-facing polygons. Back-facing polygons use separate stencil state. See [_glStencilOpSeparate](_glStencilOpSeparate).
; [_GL_STENCIL_PASS_DEPTH_PASS](_GL_STENCIL_PASS_DEPTH_PASS)
> params returns one value, a symbolic constant indicating what action is taken when the stencil test passes and the depth test passes. The initial value is [_GL_KEEP](_GL_KEEP). See [_glStencilOp](_glStencilOp). This stencil state only affects non-polygons and front-facing polygons. Back-facing polygons use separate stencil state. See [_glStencilOpSeparate](_glStencilOpSeparate).
; [_GL_STENCIL_REF](_GL_STENCIL_REF)
> params returns one value, the reference value that is compared with the contents of the stencil buffer. The initial value is 0. See [_glStencilFunc](_glStencilFunc). This stencil state only affects non-polygons and front-facing polygons. Back-facing polygons use separate stencil state. See [_glStencilFuncSeparate](_glStencilFuncSeparate).
; [_GL_STENCIL_TEST](_GL_STENCIL_TEST)
> params returns a single boolean value indicating whether stencil testing of fragments is enabled. The initial value is [_GL_FALSE](_GL_FALSE). See [_glStencilFunc](_glStencilFunc) and [_glStencilOp](_glStencilOp).
; [_GL_STENCIL_VALUE_MASK](_GL_STENCIL_VALUE_MASK)
> params returns one value, the mask that is used to mask both the stencil reference value and the stencil buffer value before they are compared. The initial value is all 1's. See [_glStencilFunc](_glStencilFunc). This stencil state only affects non-polygons and front-facing polygons. Back-facing polygons use separate stencil state. See [_glStencilFuncSeparate](_glStencilFuncSeparate).
; [_GL_STENCIL_WRITEMASK](_GL_STENCIL_WRITEMASK)
> params returns one value, the mask that controls writing of the stencil bitplanes. The initial value is all 1's. See [_glStencilMask](_glStencilMask). This stencil state only affects non-polygons and front-facing polygons. Back-facing polygons use separate stencil state. See [_glStencilMaskSeparate](_glStencilMaskSeparate).
; [_GL_STEREO](_GL_STEREO)
> params returns a single boolean value indicating whether stereo buffers (left and right) are supported.
; [_GL_SUBPIXEL_BITS](_GL_SUBPIXEL_BITS)
> params returns one value, an estimate of the number of bits of subpixel resolution that are used to position rasterized geometry in window coordinates. The value must be at least 4.
; [_GL_TEXTURE_BINDING_1D](_GL_TEXTURE_BINDING_1D)
> params returns a single value, the name of the texture currently bound to the target [_GL_TEXTURE_1D](_GL_TEXTURE_1D). The initial value is 0. See [_glBindTexture](_glBindTexture).
; [_GL_TEXTURE_BINDING_1D_ARRAY](_GL_TEXTURE_BINDING_1D_ARRAY)
> params returns a single value, the name of the texture currently bound to the target [_GL_TEXTURE_1D_ARRAY](_GL_TEXTURE_1D_ARRAY). The initial value is 0. See [_glBindTexture](_glBindTexture).
; [_GL_TEXTURE_BINDING_2D](_GL_TEXTURE_BINDING_2D)
> params returns a single value, the name of the texture currently bound to the target [_GL_TEXTURE_2D](_GL_TEXTURE_2D). The initial value is 0. See [_glBindTexture](_glBindTexture).
; [_GL_TEXTURE_BINDING_2D_ARRAY](_GL_TEXTURE_BINDING_2D_ARRAY)
> params returns a single value, the name of the texture currently bound to the target [_GL_TEXTURE_2D_ARRAY](_GL_TEXTURE_2D_ARRAY). The initial value is 0. See [_glBindTexture](_glBindTexture).
; [_GL_TEXTURE_BINDING_2D_MULTISAMPLE](_GL_TEXTURE_BINDING_2D_MULTISAMPLE)
> params returns a single value, the name of the texture currently bound to the target [_GL_TEXTURE_2D_MULTISAMPLE](_GL_TEXTURE_2D_MULTISAMPLE). The initial value is 0. See [_glBindTexture](_glBindTexture).
; [_GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY](_GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY)
> params returns a single value, the name of the texture currently bound to the target [_GL_TEXTURE_2D_MULTISAMPLE_ARRAY](_GL_TEXTURE_2D_MULTISAMPLE_ARRAY). The initial value is 0. See [_glBindTexture](_glBindTexture).
; [_GL_TEXTURE_BINDING_3D](_GL_TEXTURE_BINDING_3D)
> params returns a single value, the name of the texture currently bound to the target [_GL_TEXTURE_3D](_GL_TEXTURE_3D). The initial value is 0. See [_glBindTexture](_glBindTexture).
; [_GL_TEXTURE_BINDING_BUFFER](_GL_TEXTURE_BINDING_BUFFER)
> params returns a single value, the name of the texture currently bound to the target [_GL_TEXTURE_BUFFER](_GL_TEXTURE_BUFFER). The initial value is 0. See [_glBindTexture](_glBindTexture).
; [_GL_TEXTURE_BINDING_CUBE_MAP](_GL_TEXTURE_BINDING_CUBE_MAP)
> params returns a single value, the name of the texture currently bound to the target [_GL_TEXTURE_CUBE_MAP](_GL_TEXTURE_CUBE_MAP). The initial value is 0. See [_glBindTexture](_glBindTexture).
; [_GL_TEXTURE_BINDING_RECTANGLE](_GL_TEXTURE_BINDING_RECTANGLE)
> params returns a single value, the name of the texture currently bound to the target [_GL_TEXTURE_RECTANGLE](_GL_TEXTURE_RECTANGLE). The initial value is 0. See [_glBindTexture](_glBindTexture).
; [_GL_TEXTURE_COMPRESSION_HINT](_GL_TEXTURE_COMPRESSION_HINT)
> params returns a single value indicating the mode of the texture compression hint. The initial value is [_GL_DONT_CARE](_GL_DONT_CARE).
; [_GL_TEXTURE_BUFFER_BINDING](_GL_TEXTURE_BUFFER_BINDING)
> params returns a single value, the name of the texture buffer object currently bound. The initial value is 0. See [_glBindBuffer](_glBindBuffer).
; [_GL_TEXTURE_BUFFER_OFFSET_ALIGNMENT](_GL_TEXTURE_BUFFER_OFFSET_ALIGNMENT)
> params returns a single value, the minimum required alignment for texture buffer sizes and offset. The initial value is 1. See [_glUniformBlockBinding](_glUniformBlockBinding).
;; [_GL_TIMESTAMP](_GL_TIMESTAMP)
> params returns a single value, the 64-bit value of the current GL time. See [_glQueryCounter](_glQueryCounter).
; [_GL_TRANSFORM_FEEDBACK_BUFFER_BINDING](_GL_TRANSFORM_FEEDBACK_BUFFER_BINDING)
> When used with non-indexed variants of **_glGet** (such as **_glGetIntegerv**), params returns a single value, the name of the buffer object currently bound to the target [_GL_TRANSFORM_FEEDBACK_BUFFER](_GL_TRANSFORM_FEEDBACK_BUFFER). If no buffer object is bound to this target, 0 is returned. When used with indexed variants of **_glGet** (such as **_glGetIntegeri_v**), params returns a single value, the name of the buffer object bound to the indexed transform feedback attribute stream. The initial value is 0 for all targets. See [_glBindBuffer](_glBindBuffer), [_glBindBufferBase](_glBindBufferBase), and [_glBindBufferRange](_glBindBufferRange).
; [_GL_TRANSFORM_FEEDBACK_BUFFER_START](_GL_TRANSFORM_FEEDBACK_BUFFER_START)
> When used with indexed variants of **_glGet** (such as **_glGetInteger64i_v**), params returns a single value, the start offset of the binding range for each transform feedback attribute stream. The initial value is 0 for all streams. See [_glBindBufferRange](_glBindBufferRange).
; [_GL_TRANSFORM_FEEDBACK_BUFFER_SIZE](_GL_TRANSFORM_FEEDBACK_BUFFER_SIZE)
> When used with indexed variants of **_glGet** (such as **_glGetInteger64i_v**), params returns a single value, the size of the binding range for each transform feedback attribute stream. The initial value is 0 for all streams. See [_glBindBufferRange](_glBindBufferRange).
; [_GL_UNIFORM_BUFFER_BINDING](_GL_UNIFORM_BUFFER_BINDING)
> When used with non-indexed variants of **_glGet** (such as **_glGetIntegerv**), params returns a single value, the name of the buffer object currently bound to the target [_GL_UNIFORM_BUFFER](_GL_UNIFORM_BUFFER). If no buffer object is bound to this target, 0 is returned. When used with indexed variants of **_glGet** (such as **_glGetIntegeri_v**), params returns a single value, the name of the buffer object bound to the indexed uniform buffer binding point. The initial value is 0 for all targets. See [_glBindBuffer](_glBindBuffer), [_glBindBufferBase](_glBindBufferBase), and [_glBindBufferRange](_glBindBufferRange).
; [_GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT](_GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT)
> params returns a single value, the minimum required alignment for uniform buffer sizes and offset. The initial value is 1. See [_glUniformBlockBinding](_glUniformBlockBinding).
; [_GL_UNIFORM_BUFFER_SIZE](_GL_UNIFORM_BUFFER_SIZE)
> When used with indexed variants of **_glGet** (such as **_glGetInteger64i_v**), params returns a single value, the size of the binding range for each indexed uniform buffer binding. The initial value is 0 for all bindings. See [_glBindBufferRange](_glBindBufferRange).
; [_GL_UNIFORM_BUFFER_START](_GL_UNIFORM_BUFFER_START)
> When used with indexed variants of **_glGet** (such as **_glGetInteger64i_v**), params returns a single value, the start offset of the binding range for each indexed uniform buffer binding. The initial value is 0 for all bindings. See [_glBindBufferRange](_glBindBufferRange).
; [_GL_UNPACK_ALIGNMENT](_GL_UNPACK_ALIGNMENT)
> params returns one value, the byte alignment used for reading pixel data from memory. The initial value is 4. See [_glPixelStore](_glPixelStore).
; [_GL_UNPACK_IMAGE_HEIGHT](_GL_UNPACK_IMAGE_HEIGHT)
> params returns one value, the image height used for reading pixel data from memory. The initial is 0. See [_glPixelStore](_glPixelStore).
; [_GL_UNPACK_LSB_FIRST](_GL_UNPACK_LSB_FIRST)
> params returns a single boolean value indicating whether single-bit pixels being read from memory are read first from the least significant bit of each unsigned byte. The initial value is [_GL_FALSE](_GL_FALSE). See [_glPixelStore](_glPixelStore).
; [_GL_UNPACK_ROW_LENGTH](_GL_UNPACK_ROW_LENGTH)
> params returns one value, the row length used for reading pixel data from memory. The initial value is 0. See [_glPixelStore](_glPixelStore).
; [_GL_UNPACK_SKIP_IMAGES](_GL_UNPACK_SKIP_IMAGES)
> params returns one value, the number of pixel images skipped before the first pixel is read from memory. The initial value is 0. See [_glPixelStore](_glPixelStore).
; [_GL_UNPACK_SKIP_PIXELS](_GL_UNPACK_SKIP_PIXELS)
> params returns one value, the number of pixel locations skipped before the first pixel is read from memory. The initial value is 0. See [_glPixelStore](_glPixelStore).
; [_GL_UNPACK_SKIP_ROWS](_GL_UNPACK_SKIP_ROWS)
> params returns one value, the number of rows of pixel locations skipped before the first pixel is read from memory. The initial value is 0. See [_glPixelStore](_glPixelStore).
; [_GL_UNPACK_SWAP_BYTES](_GL_UNPACK_SWAP_BYTES)
> params returns a single boolean value indicating whether the bytes of two-byte and four-byte pixel indices and components are swapped after being read from memory. The initial value is [_GL_FALSE](_GL_FALSE). See [_glPixelStore](_glPixelStore).
; [_GL_VERTEX_PROGRAM_POINT_SIZE](_GL_VERTEX_PROGRAM_POINT_SIZE)
> params returns a single boolean value indicating whether vertex program point size mode is enabled. If enabled, and a vertex shader is active, then the point size is taken from the shader built-in gl_PointSize. If disabled, and a vertex shader is active, then the point size is taken from the point state as specified by [_glPointSize](_glPointSize). The initial value is [_GL_FALSE](_GL_FALSE).
; [_GL_VERTEX_BINDING_DIVISOR](_GL_VERTEX_BINDING_DIVISOR)
> Accepted by the indexed forms. params returns a single integer value representing the instance step divisor of the first element in the bound buffer's data store for vertex attribute bound to index.
; [_GL_VERTEX_BINDING_OFFSET](_GL_VERTEX_BINDING_OFFSET)
> Accepted by the indexed forms. params returns a single integer value representing the byte offset of the first element in the bound buffer's data store for vertex attribute bound to index.
; [_GL_VERTEX_BINDING_STRIDE](_GL_VERTEX_BINDING_STRIDE)
> Accepted by the indexed forms. params returns a single integer value representing the byte offset between the start of each element in the bound buffer's data store for vertex attribute bound to index.
; [_GL_MAX_VERTEX_ATTRIB_RELATIVE_OFFSET](_GL_MAX_VERTEX_ATTRIB_RELATIVE_OFFSET)
> params returns a single integer value containing the maximum offset that may be added to a vertex binding offset.
; [_GL_MAX_VERTEX_ATTRIB_BINDINGS](_GL_MAX_VERTEX_ATTRIB_BINDINGS)
> params returns a single integer value containing the maximum number of vertex buffers that may be bound.
; [_GL_VIEWPORT](_GL_VIEWPORT)
> When used with non-indexed variants of **_glGet** (such as **_glGetIntegerv**), params returns four values: the <!--Missing Equation--> and <!--Missing Equation--> window coordinates of the viewport, followed by its width and height. Initially the <!--Missing Equation--> and <!--Missing Equation--> window coordinates are both set to 0, and the width and height are set to the width and height of the window into which the GL will do its rendering. See [_glViewport](_glViewport). When used with indexed variants of **_glGet** (such as **_glGetIntegeri_v**), params returns four values: the <!--Missing Equation--> and <!--Missing Equation--> window coordinates of the indexed viewport, followed by its width and height. Initially the <!--Missing Equation--> and <!--Missing Equation--> window coordinates are both set to 0, and the width and height are set to the width and height of the window into which the GL will do its rendering. See [_glViewportIndexed](_glViewportIndexed).
; [_GL_VIEWPORT_BOUNDS_RANGE](_GL_VIEWPORT_BOUNDS_RANGE)
> params returns two values, the minimum and maximum viewport bounds range. The minimum range should be at least [-32768, 32767].
; [_GL_VIEWPORT_INDEX_PROVOKING_VERTEX](_GL_VIEWPORT_INDEX_PROVOKING_VERTEX)
> params returns one value, the implementation dependent specifc vertex of a primitive that is used to select the viewport index. If the value returned is equivalent to [_GL_PROVOKING_VERTEX](_GL_PROVOKING_VERTEX), then the vertex selection follows the convention specified by [_glProvokingVertex](_glProvokingVertex). If the value returned is equivalent to [_GL_FIRST_VERTEX_CONVENTION](_GL_FIRST_VERTEX_CONVENTION), then the selection is always taken from the first vertex in the primitive. If the value returned is equivalent to [_GL_LAST_VERTEX_CONVENTION](_GL_LAST_VERTEX_CONVENTION), then the selection is always taken from the last vertex in the primitive. If the value returned is equivalent to [_GL_UNDEFINED_VERTEX](_GL_UNDEFINED_VERTEX), then the selection is not guaranteed to be taken from any specific vertex in the primitive.
; [_GL_VIEWPORT_SUBPIXEL_BITS](_GL_VIEWPORT_SUBPIXEL_BITS)
> params returns a single value, the number of bits of sub-pixel precision which the GL uses to interpret the floating point viewport bounds. The minimum value is 0.
; [_GL_MAX_ELEMENT_INDEX](_GL_MAX_ELEMENT_INDEX)
> params returns a single value, the maximum index that may be specified during the transfer of generic vertex attributes to the GL.
Many of the boolean parameters can also be queried more easily using [_glIsEnabled](_glIsEnabled).
## Notes
The following parameters return the associated value for the active texture unit: [_GL_TEXTURE_1D](_GL_TEXTURE_1D), [_GL_TEXTURE_BINDING_1D](_GL_TEXTURE_BINDING_1D), [_GL_TEXTURE_2D](_GL_TEXTURE_2D), [_GL_TEXTURE_BINDING_2D](_GL_TEXTURE_BINDING_2D), [_GL_TEXTURE_3D](_GL_TEXTURE_3D) and [_GL_TEXTURE_BINDING_3D](_GL_TEXTURE_BINDING_3D).
[_GL_MAX_VIEWPORTS](_GL_MAX_VIEWPORTS), [_GL_VIEWPORT_SUBPIXEL_BITS](_GL_VIEWPORT_SUBPIXEL_BITS), [_GL_VIEWPORT_BOUNDS_RANGE](_GL_VIEWPORT_BOUNDS_RANGE), [_GL_LAYER_PROVOKING_VERTEX](_GL_LAYER_PROVOKING_VERTEX), and [_GL_VIEWPORT_INDEX_PROVOKING_VERTEX](_GL_VIEWPORT_INDEX_PROVOKING_VERTEX) are available only if the GL version is 4.1 or greater.
[_GL_MAX_VERTEX_ATOMIC_COUNTERS](_GL_MAX_VERTEX_ATOMIC_COUNTERS), [_GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS](_GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS), [_GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS](_GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS), [_GL_MAX_GEOMETRY_ATOMIC_COUNTERS](_GL_MAX_GEOMETRY_ATOMIC_COUNTERS), [_GL_MAX_FRAMGENT_ATOMIC_COUNTERS](_GL_MAX_FRAMGENT_ATOMIC_COUNTERS), and [_GL_MIN_MAP_BUFFER_ALIGNMENT](_GL_MIN_MAP_BUFFER_ALIGNMENT) are accepted by pname only if the GL version is 4.2 or greater.
[_GL_MAX_ELEMENT_INDEX](_GL_MAX_ELEMENT_INDEX) is accepted by pname only if the GL version is 4.3 or greater.
[_GL_MAX_COMPUTE_UNIFORM_BLOCKS](_GL_MAX_COMPUTE_UNIFORM_BLOCKS), [_GL_MAX_COMPUTE_TEXTURE_IMAGE_UNITS](_GL_MAX_COMPUTE_TEXTURE_IMAGE_UNITS), [_GL_MAX_COMPUTE_UNIFORM_COMPONENTS](_GL_MAX_COMPUTE_UNIFORM_COMPONENTS), [_GL_MAX_COMPUTE_ATOMIC_COUNTERS](_GL_MAX_COMPUTE_ATOMIC_COUNTERS), [_GL_MAX_COMPUTE_ATOMIC_COUNTER_BUFFERS](_GL_MAX_COMPUTE_ATOMIC_COUNTER_BUFFERS), [_GL_MAX_COMBINED_COMPUTE_UNIFORM_COMPONENTS](_GL_MAX_COMBINED_COMPUTE_UNIFORM_COMPONENTS), [_GL_MAX_COMPUTE_WORK_GROUP_INVOCATIONS](_GL_MAX_COMPUTE_WORK_GROUP_INVOCATIONS), [_GL_MAX_COMPUTE_WORK_GROUP_COUNT](_GL_MAX_COMPUTE_WORK_GROUP_COUNT), and [_GL_MAX_COMPUTE_WORK_GROUP_SIZE](_GL_MAX_COMPUTE_WORK_GROUP_SIZE) and [_GL_DISPATCH_INDIRECT_BUFFER_BINDING](_GL_DISPATCH_INDIRECT_BUFFER_BINDING) are available only if the GL version is 4.3 or greater.
[_GL_MAX_DEBUG_GROUP_STACK_DEPTH](_GL_MAX_DEBUG_GROUP_STACK_DEPTH), [_GL_DEBUG_GROUP_STACK_DEPTH](_GL_DEBUG_GROUP_STACK_DEPTH) and [_GL_MAX_LABEL_LENGTH](_GL_MAX_LABEL_LENGTH) are accepted only if the GL version is 4.3 or greater.
[_GL_MAX_UNIFORM_LOCATIONS](_GL_MAX_UNIFORM_LOCATIONS) is accepted only if the GL version is 4.3 or greater.
[_GL_MAX_FRAMEBUFFER_WIDTH](_GL_MAX_FRAMEBUFFER_WIDTH), [_GL_MAX_FRAMEBUFFER_HEIGHT](_GL_MAX_FRAMEBUFFER_HEIGHT), [_GL_MAX_FRAMEBUFFER_LAYERS](_GL_MAX_FRAMEBUFFER_LAYERS), and [_GL_MAX_FRAMEBUFFER_SAMPLES](_GL_MAX_FRAMEBUFFER_SAMPLES) are available only if the GL version is 4.3 or greater.
[_GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS](_GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS), [_GL_MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS](_GL_MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS), [_GL_MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS](_GL_MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS), [_GL_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS](_GL_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS), [_GL_MAX_FRAGMENT_SHADER_STORAGE_BLOCKS](_GL_MAX_FRAGMENT_SHADER_STORAGE_BLOCKS), and [_GL_MAX_COMPUTE_SHADER_STORAGE_BLOCKS](_GL_MAX_COMPUTE_SHADER_STORAGE_BLOCKS) are available only if the GL version is 4.3 or higher.
[_GL_TEXTURE_BUFFER_OFFSET_ALIGNMENT](_GL_TEXTURE_BUFFER_OFFSET_ALIGNMENT) is available only if the GL version is 4.3 or greater.
[_GL_VERTEX_BINDING_DIVISOR](_GL_VERTEX_BINDING_DIVISOR), [_GL_VERTEX_BINDING_OFFSET](_GL_VERTEX_BINDING_OFFSET), [_GL_VERTEX_BINDING_STRIDE](_GL_VERTEX_BINDING_STRIDE), [_GL_MAX_VERTEX_ATTRIB_RELATIVE_OFFSET](_GL_MAX_VERTEX_ATTRIB_RELATIVE_OFFSET) and [_GL_MAX_VERTEX_ATTRIB_BINDINGS](_GL_MAX_VERTEX_ATTRIB_BINDINGS) are available only if the GL version is 4.3 or greater.
## Error(s)
[_GL_INVALID_ENUM](_GL_INVALID_ENUM) is generated if pname is not an accepted value.
[_GL_INVALID_VALUE](_GL_INVALID_VALUE) is generated on any of **_glGetBooleani_v**, **_glGetIntegeri_v**, **_glGetFloati_v**, **_glGetDoublei_v**, or **_glGetInteger64i_v** if index is outside of the valid range for the indexed state target.
## See Also
[_GL](_GL)
[_glGetActiveUniform](_glGetActiveUniform), [_glGetAttachedShaders](_glGetAttachedShaders), [_glGetAttribLocation](_glGetAttribLocation), [_glGetBufferParameter](_glGetBufferParameter), [_glGetBufferPointerv](_glGetBufferPointerv), [_glGetBufferSubData](_glGetBufferSubData), [_glGetCompressedTexImage](_glGetCompressedTexImage), [_glGetError](_glGetError), [_glGetProgram](_glGetProgram), [_glGetProgramInfoLog](_glGetProgramInfoLog), [_glGetQueryiv](_glGetQueryiv), [_glGetQueryObject](_glGetQueryObject), [_glGetShader](_glGetShader), [_glGetShaderInfoLog](_glGetShaderInfoLog), [_glGetShaderSource](_glGetShaderSource), [_glGetString](_glGetString), [_glGetTexImage](_glGetTexImage), [_glGetTexLevelParameter](_glGetTexLevelParameter), [_glGetTexParameter](_glGetTexParameter), [_glGetUniform](_glGetUniform), [_glGetUniformLocation](_glGetUniformLocation), [_glGetVertexAttrib](_glGetVertexAttrib), [_glGetVertexAttribPointerv](_glGetVertexAttribPointerv), [_glIsEnabled](_glIsEnabled)
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/].

View file

@ -1,45 +0,0 @@
**_glGetError:** return error information
## Syntax
FUNCTION _glGetError~&
GLenum **_glGetError**(void);
## Description
**_glGetError** returns the value of the error flag. Each detectable error is assigned a numeric code and symbolic name. When an error occurs, the error flag is set to the appropriate error code value. No other errors are recorded until **_glGetError** is called, the error code is returned, and the flag is reset to [_GL_NO_ERROR](_GL_NO_ERROR). If a call to **_glGetError** returns [_GL_NO_ERROR](_GL_NO_ERROR), there has been no detectable error since the last call to **_glGetError**, or since the GL was initialized.
To allow for distributed implementations, there may be several error flags. If any single error flag has recorded an error, the value of that flag is returned and that flag is reset to [_GL_NO_ERROR](_GL_NO_ERROR) when **_glGetError** is called. If more than one flag has recorded an error, **_glGetError** returns and clears an arbitrary error flag value. Thus, **_glGetError** should always be called in a loop, until it returns [_GL_NO_ERROR](_GL_NO_ERROR), if all error flags are to be reset.
Initially, all error flags are set to [_GL_NO_ERROR](_GL_NO_ERROR).
The following errors are currently defined:
; [_GL_NO_ERROR](_GL_NO_ERROR)
> No error has been recorded. The value of this symbolic constant is guaranteed to be 0.
; [_GL_INVALID_ENUM](_GL_INVALID_ENUM)
> An unacceptable value is specified for an enumerated argument. The offending command is ignored and has no other side effect than to set the error flag.
; [_GL_INVALID_VALUE](_GL_INVALID_VALUE)
> A numeric argument is out of range. The offending command is ignored and has no other side effect than to set the error flag.
; [_GL_INVALID_OPERATION](_GL_INVALID_OPERATION)
> The specified operation is not allowed in the current state. The offending command is ignored and has no other side effect than to set the error flag.
; [_GL_INVALID_FRAMEBUFFER_OPERATION](_GL_INVALID_FRAMEBUFFER_OPERATION)
> The framebuffer object is not complete. The offending command is ignored and has no other side effect than to set the error flag.
; [_GL_OUT_OF_MEMORY](_GL_OUT_OF_MEMORY)
> There is not enough memory left to execute the command. The state of the GL is undefined, except for the state of the error flags, after this error is recorded.
; [_GL_STACK_UNDERFLOW](_GL_STACK_UNDERFLOW)
> An attempt has been made to perform an operation that would cause an internal stack to underflow.
; [_GL_STACK_OVERFLOW](_GL_STACK_OVERFLOW)
> An attempt has been made to perform an operation that would cause an internal stack to overflow.
When an error flag is set, results of a GL operation are undefined only if [_GL_OUT_OF_MEMORY](_GL_OUT_OF_MEMORY) has occurred. In all other cases, the command generating the error is ignored and has no effect on the GL state or frame buffer contents. If the generating command returns a value, it returns 0. If **_glGetError** itself generates an error, it returns 0.
Copyright 1991-2006 Silicon Graphics, Inc. Copyright 2012 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/].

View file

@ -1,77 +0,0 @@
**_glGetString:** return a string describing the current GL connection
## Syntax
FUNCTION _glGetString&& (BYVAL name AS _UNSIGNED LONG)
const GLubyte* **_glGetString**(GLenum name);
const GLubyte* **_glGetStringi**(GLenum name, GLuint index);
; name
> Specifies a symbolic constant, one of [_GL_VENDOR](_GL_VENDOR), [_GL_RENDERER](_GL_RENDERER), [_GL_VERSION](_GL_VERSION), or [_GL_SHADING_LANGUAGE_VERSION](_GL_SHADING_LANGUAGE_VERSION). Additionally, **_glGetStringi** accepts the [_GL_EXTENSIONS](_GL_EXTENSIONS) token.
; index
> For **_glGetStringi**, specifies the index of the string to return.
## Description
**_glGetString** returns a pointer to a static string describing some aspect of the current GL connection. name can be one of the following:
; [_GL_VENDOR](_GL_VENDOR)
>
Returns the company responsible for this GL implementation. This name does not change from release to release.
; [_GL_RENDERER](_GL_RENDERER)
>
Returns the name of the renderer. This name is typically specific to a particular configuration of a hardware platform. It does not change from release to release.
; [_GL_VERSION](_GL_VERSION)
>
Returns a version or release number.
; [_GL_SHADING_LANGUAGE_VERSION](_GL_SHADING_LANGUAGE_VERSION)
>
Returns a version or release number for the shading language.
Strings [_GL_VENDOR](_GL_VENDOR) and [_GL_RENDERER](_GL_RENDERER) together uniquely specify a platform. They do not change from release to release and should be used by platform-recognition algorithms.
**_glGetStringi** returns a pointer to a static string indexed by index. name can be one of the following:
; [_GL_EXTENSIONS](_GL_EXTENSIONS)
> For **_glGetStringi** only, returns the extension string supported by the implementation at index. The index index is on the range [0 to [_glGet](_glGet) - 1].
; [_GL_SHADING_LANGUAGE_VERSION](_GL_SHADING_LANGUAGE_VERSION)
> Returns one of the versions of [GLSL](GLSL) supported by this implementation. index is on the range [0 to [_glGet](_glGet) - 1].
The [_GL_VERSION](_GL_VERSION) and [_GL_SHADING_LANGUAGE_VERSION](_GL_SHADING_LANGUAGE_VERSION) strings begin with a version number. The version number uses one of these forms:
*major_number.minor_number*
or
*major_number.minor_number.release_number*
Vendor-specific information may follow the version number. Its format depends on the implementation, but a space always separates the version number and the vendor-specific information.
All strings are null-terminated.
## Notes
If an error is generated, **_glGetString** returns 0.
The client and server may support different versions. **_glGetString** always returns a compatible version number. The release number always describes the server.
## Error(s)
[_GL_INVALID_ENUM](_GL_INVALID_ENUM) is generated if name is not an accepted value.
[_GL_INVALID_VALUE](_GL_INVALID_VALUE) is generated by **_glGetStringi** if index is outside the valid range for indexed state name.
Copyright 1991-2006 Silicon Graphics, Inc. Copyright 2010 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/].

View file

@ -1,89 +0,0 @@
**_glGetTexImage:** return a texture image
## Syntax
SUB _glGetTexImage (BYVAL target AS _UNSIGNED LONG, BYVAL level AS LONG, BYVAL format AS _UNSIGNED LONG, BYVAL type AS _UNSIGNED LONG, pixels AS _OFFSET)
void **_glGetTexImage**(GLenum target, GLint level, GLenum format, GLenum type, GLvoid * img);
; target
> Specifies which texture is to be obtained. [_GL_TEXTURE_1D](_GL_TEXTURE_1D), [_GL_TEXTURE_2D](_GL_TEXTURE_2D), [_GL_TEXTURE_3D](_GL_TEXTURE_3D), [_GL_TEXTURE_1D_ARRAY](_GL_TEXTURE_1D_ARRAY), [_GL_TEXTURE_2D_ARRAY](_GL_TEXTURE_2D_ARRAY), [_GL_TEXTURE_RECTANGLE](_GL_TEXTURE_RECTANGLE), [_GL_TEXTURE_CUBE_MAP_POSITIVE_X](_GL_TEXTURE_CUBE_MAP_POSITIVE_X), [_GL_TEXTURE_CUBE_MAP_NEGATIVE_X](_GL_TEXTURE_CUBE_MAP_NEGATIVE_X), [_GL_TEXTURE_CUBE_MAP_POSITIVE_Y](_GL_TEXTURE_CUBE_MAP_POSITIVE_Y), [_GL_TEXTURE_CUBE_MAP_NEGATIVE_Y](_GL_TEXTURE_CUBE_MAP_NEGATIVE_Y), [_GL_TEXTURE_CUBE_MAP_POSITIVE_Z](_GL_TEXTURE_CUBE_MAP_POSITIVE_Z), and [_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z](_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z) are accepted.
; level
> Specifies the level-of-detail number of the desired image. Level 0 is the base image level. Level *n* is the *n*th mipmap reduction image.
; format
> Specifies a pixel format for the returned data. The supported formats are [_GL_STENCIL_INDEX](_GL_STENCIL_INDEX), [_GL_DEPTH_COMPONENT](_GL_DEPTH_COMPONENT), [_GL_DEPTH_STENCIL](_GL_DEPTH_STENCIL), [_GL_RED](_GL_RED), [_GL_GREEN](_GL_GREEN), [_GL_BLUE](_GL_BLUE), [_GL_RG](_GL_RG), [_GL_RGB](_GL_RGB), [_GL_RGBA](_GL_RGBA), [_GL_BGR](_GL_BGR), [_GL_BGRA](_GL_BGRA), [_GL_RED_INTEGER](_GL_RED_INTEGER), [_GL_GREEN_INTEGER](_GL_GREEN_INTEGER), [_GL_BLUE_INTEGER](_GL_BLUE_INTEGER), [_GL_RG_INTEGER](_GL_RG_INTEGER), [_GL_RGB_INTEGER](_GL_RGB_INTEGER), [_GL_RGBA_INTEGER](_GL_RGBA_INTEGER), [_GL_BGR_INTEGER](_GL_BGR_INTEGER), [_GL_BGRA_INTEGER](_GL_BGRA_INTEGER).
; type
> Specifies a pixel type for the returned data. The supported types are [_GL_UNSIGNED_BYTE](_GL_UNSIGNED_BYTE), [_GL_BYTE](_GL_BYTE), [_GL_UNSIGNED_SHORT](_GL_UNSIGNED_SHORT), [_GL_SHORT](_GL_SHORT), [_GL_UNSIGNED_INT](_GL_UNSIGNED_INT), [_GL_INT](_GL_INT), [_GL_HALF_FLOAT](_GL_HALF_FLOAT), [_GL_FLOAT](_GL_FLOAT), [_GL_UNSIGNED_BYTE_3_3_2](_GL_UNSIGNED_BYTE_3_3_2), [_GL_UNSIGNED_BYTE_2_3_3_REV](_GL_UNSIGNED_BYTE_2_3_3_REV), [_GL_UNSIGNED_SHORT_5_6_5](_GL_UNSIGNED_SHORT_5_6_5), [_GL_UNSIGNED_SHORT_5_6_5_REV](_GL_UNSIGNED_SHORT_5_6_5_REV), [_GL_UNSIGNED_SHORT_4_4_4_4](_GL_UNSIGNED_SHORT_4_4_4_4), [_GL_UNSIGNED_SHORT_4_4_4_4_REV](_GL_UNSIGNED_SHORT_4_4_4_4_REV), [_GL_UNSIGNED_SHORT_5_5_5_1](_GL_UNSIGNED_SHORT_5_5_5_1), [_GL_UNSIGNED_SHORT_1_5_5_5_REV](_GL_UNSIGNED_SHORT_1_5_5_5_REV), [_GL_UNSIGNED_INT_8_8_8_8](_GL_UNSIGNED_INT_8_8_8_8), [_GL_UNSIGNED_INT_8_8_8_8_REV](_GL_UNSIGNED_INT_8_8_8_8_REV), [_GL_UNSIGNED_INT_10_10_10_2](_GL_UNSIGNED_INT_10_10_10_2), [_GL_UNSIGNED_INT_2_10_10_10_REV](_GL_UNSIGNED_INT_2_10_10_10_REV), [_GL_UNSIGNED_INT_24_8](_GL_UNSIGNED_INT_24_8), [_GL_UNSIGNED_INT_10F_11F_11F_REV](_GL_UNSIGNED_INT_10F_11F_11F_REV), [_GL_UNSIGNED_INT_5_9_9_9_REV](_GL_UNSIGNED_INT_5_9_9_9_REV), and [_GL_FLOAT_32_UNSIGNED_INT_24_8_REV](_GL_FLOAT_32_UNSIGNED_INT_24_8_REV).
; img
> Returns the texture image. Should be a pointer to an array of the type specified by type.
## Description
**_glGetTexImage** returns a texture image into img. target specifies whether the desired texture image is one specified by [_glTexImage1D](_glTexImage1D) ([_GL_TEXTURE_1D](_GL_TEXTURE_1D)), [_glTexImage2D](_glTexImage2D) ([_GL_TEXTURE_1D_ARRAY](_GL_TEXTURE_1D_ARRAY), [_GL_TEXTURE_RECTANGLE](_GL_TEXTURE_RECTANGLE), [_GL_TEXTURE_2D](_GL_TEXTURE_2D) or any of [_GL_TEXTURE_CUBE_MAP_*](_GL_TEXTURE_CUBE_MAP_*)), or [_glTexImage3D](_glTexImage3D) ([_GL_TEXTURE_2D_ARRAY](_GL_TEXTURE_2D_ARRAY), [_GL_TEXTURE_3D](_GL_TEXTURE_3D)). level specifies the level-of-detail number of the desired image. format and type specify the format and type of the desired image array. See the reference page for [_glTexImage1D](_glTexImage1D) for a description of the acceptable values for the format and type parameters, respectively.
If a non-zero named buffer object is bound to the [_GL_PIXEL_PACK_BUFFER](_GL_PIXEL_PACK_BUFFER) target (see [_glBindBuffer](_glBindBuffer)) while a texture image is requested, img is treated as a byte offset into the buffer object's data store.
To understand the operation of **_glGetTexImage**, consider the selected internal four-component texture image to be an RGBA color buffer the size of the image. The semantics of **_glGetTexImage** are then identical to those of [_glReadPixels](_glReadPixels), with the exception that no pixel transfer operations are performed, when called with the same format and type, with *x* and *y* set to 0, *width* set to the width of the texture image and *height* set to 1 for 1D images, or to the height of the texture image for 2D images.
If the selected texture image does not contain four components, the following mappings are applied. Single-component textures are treated as RGBA buffers with red set to the single-component value, green set to 0, blue set to 0, and alpha set to 1. Two-component textures are treated as RGBA buffers with red set to the value of component zero, alpha set to the value of component one, and green and blue set to 0. Finally, three-component textures are treated as RGBA buffers with red set to component zero, green set to component one, blue set to component two, and alpha set to 1.
To determine the required size of img, use [_glGetTexLevelParameter](_glGetTexLevelParameter) to determine the dimensions of the internal texture image, then scale the required number of pixels by the storage required for each pixel, based on format and type. Be sure to take the pixel storage parameters into account, especially [_GL_PACK_ALIGNMENT](_GL_PACK_ALIGNMENT).
## Notes
If an error is generated, no change is made to the contents of img.
**_glGetTexImage** returns the texture image for the active texture unit.
## Error(s)
[_GL_INVALID_ENUM](_GL_INVALID_ENUM) is generated if target, format, or type is not an accepted value.
[_GL_INVALID_VALUE](_GL_INVALID_VALUE) is generated if level is less than 0.
[_GL_INVALID_VALUE](_GL_INVALID_VALUE) may be generated if level is greater than log<sub>2</sub>(*max*), where *max* is the returned value of [_GL_MAX_TEXTURE_SIZE](_GL_MAX_TEXTURE_SIZE).
[_GL_INVALID_OPERATION](_GL_INVALID_OPERATION) is returned if type is one of [_GL_UNSIGNED_BYTE_3_3_2](_GL_UNSIGNED_BYTE_3_3_2), [_GL_UNSIGNED_BYTE_2_3_3_REV](_GL_UNSIGNED_BYTE_2_3_3_REV), [_GL_UNSIGNED_SHORT_5_6_5](_GL_UNSIGNED_SHORT_5_6_5), [_GL_UNSIGNED_SHORT_5_6_5_REV](_GL_UNSIGNED_SHORT_5_6_5_REV), or [_GL_UNSIGNED_INT_10F_11F_11F_REV](_GL_UNSIGNED_INT_10F_11F_11F_REV) and format is not [_GL_RGB](_GL_RGB).
[_GL_INVALID_OPERATION](_GL_INVALID_OPERATION) is returned if type is one of [_GL_UNSIGNED_SHORT_4_4_4_4](_GL_UNSIGNED_SHORT_4_4_4_4), [_GL_UNSIGNED_SHORT_4_4_4_4_REV](_GL_UNSIGNED_SHORT_4_4_4_4_REV), [_GL_UNSIGNED_SHORT_5_5_5_1](_GL_UNSIGNED_SHORT_5_5_5_1), [_GL_UNSIGNED_SHORT_1_5_5_5_REV](_GL_UNSIGNED_SHORT_1_5_5_5_REV), [_GL_UNSIGNED_INT_8_8_8_8](_GL_UNSIGNED_INT_8_8_8_8), [_GL_UNSIGNED_INT_8_8_8_8_REV](_GL_UNSIGNED_INT_8_8_8_8_REV), [_GL_UNSIGNED_INT_10_10_10_2](_GL_UNSIGNED_INT_10_10_10_2), [_GL_UNSIGNED_INT_2_10_10_10_REV](_GL_UNSIGNED_INT_2_10_10_10_REV), or [_GL_UNSIGNED_INT_5_9_9_9_REV](_GL_UNSIGNED_INT_5_9_9_9_REV) and format is neither [_GL_RGBA](_GL_RGBA) or [_GL_BGRA](_GL_BGRA).
[_GL_INVALID_OPERATION](_GL_INVALID_OPERATION) is generated if a non-zero buffer object name is bound to the [_GL_PIXEL_PACK_BUFFER](_GL_PIXEL_PACK_BUFFER) target and the buffer object's data store is currently mapped.
[_GL_INVALID_OPERATION](_GL_INVALID_OPERATION) is generated if a non-zero buffer object name is bound to the [_GL_PIXEL_PACK_BUFFER](_GL_PIXEL_PACK_BUFFER) target and the data would be packed to the buffer object such that the memory writes required would exceed the data store size.
[_GL_INVALID_OPERATION](_GL_INVALID_OPERATION) is generated if a non-zero buffer object name is bound to the [_GL_PIXEL_PACK_BUFFER](_GL_PIXEL_PACK_BUFFER) target and img is not evenly divisible into the number of bytes needed to store in memory a datum indicated by type.
## Use With
[_glGetTexLevelParameter](_glGetTexLevelParameter) with argument [_GL_TEXTURE_WIDTH](_GL_TEXTURE_WIDTH)
[_glGetTexLevelParameter](_glGetTexLevelParameter) with argument [_GL_TEXTURE_HEIGHT](_GL_TEXTURE_HEIGHT)
[_glGetTexLevelParameter](_glGetTexLevelParameter) with argument [_GL_TEXTURE_INTERNAL_FORMAT](_GL_TEXTURE_INTERNAL_FORMAT)
[_glGet](_glGet) with arguments [_GL_PACK_ALIGNMENT](_GL_PACK_ALIGNMENT) and others
[_glGet](_glGet) with argument [_GL_PIXEL_PACK_BUFFER_BINDING](_GL_PIXEL_PACK_BUFFER_BINDING)
## See Also
[_GL](_GL)
[_glActiveTexture](_glActiveTexture), [_glBindTexture](_glBindTexture), [_glPixelStore](_glPixelStore), [_glReadPixels](_glReadPixels), [_glTexSubImage1D](_glTexSubImage1D), [_glTexSubImage2D](_glTexSubImage2D), [_glTexSubImage3D](_glTexSubImage3D)
Copyright 1991-2006 Silicon Graphics, Inc. Copyright 2010 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/].

View file

@ -1,143 +0,0 @@
**_glTexImage1D:** specify a one-dimensional texture image
## Syntax
SUB _glTexImage1D (BYVAL target AS _UNSIGNED LONG, BYVAL level AS LONG, BYVAL internalformat AS LONG, BYVAL width AS LONG, BYVAL border AS LONG, BYVAL format AS _UNSIGNED LONG, BYVAL type AS _UNSIGNED LONG, pixels AS _OFFSET)
void **_glTexImage1D**(GLenum target, GLint level, GLint internalFormat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid * data);
; target
> Specifies the target texture. Must be [_GL_TEXTURE_1D](_GL_TEXTURE_1D) or [_GL_PROXY_TEXTURE_1D](_GL_PROXY_TEXTURE_1D).
; level
> Specifies the level-of-detail number. Level 0 is the base image level. Level *n* is the *n*th mipmap reduction image.
; internalFormat
> Specifies the number of color components in the texture. Must be one of base internal formats given in Table 1, one of the sized internal formats given in Table 2, or one of the compressed internal formats given in Table 3, below.
; width
> Specifies the width of the texture image. All implementations support texture images that are at least 1024 texels wide. The height of the 1D texture image is 1.
; border
> This value must be 0.
glapi pixeltransferupparams|
## Description
Texturing maps a portion of a specified texture image onto each graphical primitive for which texturing is enabled. To enable and disable one-dimensional texturing, call [_glEnable](_glEnable) and [_glDisable](_glDisable) with argument [_GL_TEXTURE_1D](_GL_TEXTURE_1D).
Texture images are defined with **_glTexImage1D**. The arguments describe the parameters of the texture image, such as width, width of the border, level-of-detail number (see [_glTexParameter](_glTexParameter)), and the internal resolution and format used to store the image. The last three arguments describe how the image is represented in memory.
If target is [_GL_PROXY_TEXTURE_1D](_GL_PROXY_TEXTURE_1D), no data is read from data, but all of the texture image state is recalculated, checked for consistency, and checked against the implementation's capabilities. If the implementation cannot handle a texture of the requested texture size, it sets all of the image state to 0, but does not generate an error (see [_glGetError](_glGetError)). To query for an entire mipmap array, use an image array level greater than or equal to 1.
If target is [_GL_TEXTURE_1D](_GL_TEXTURE_1D), data is read from data as a sequence of signed or unsigned bytes, shorts, or longs, or single-precision floating-point values, depending on type. These values are grouped into sets of one, two, three, or four values, depending on format, to form elements. Each data byte is treated as eight 1-bit elements, with bit ordering determined by [_GL_UNPACK_LSB_FIRST](_GL_UNPACK_LSB_FIRST) (see [_glPixelStore](_glPixelStore)).
If a non-zero named buffer object is bound to the [_GL_PIXEL_UNPACK_BUFFER](_GL_PIXEL_UNPACK_BUFFER) target (see [_glBindBuffer](_glBindBuffer)) while a texture image is specified, data is treated as a byte offset into the buffer object's data store.
The first element corresponds to the left end of the texture array. Subsequent elements progress left-to-right through the remaining texels in the texture array. The final element corresponds to the right end of the texture array.
format determines the composition of each element in data. It can assume one of these symbolic values:
; [_GL_RED](_GL_RED)
> Each element is a single red component. The GL converts it to floating point and assembles it into an RGBA element by attaching 0 for green and blue, and 1 for alpha. Each component is then multiplied by the signed scale factor [_GL_c_SCALE](_GL_c_SCALE), added to the signed bias [_GL_c_BIAS](_GL_c_BIAS), and clamped to the range [0,1].
; [_GL_RG](_GL_RG)
> Each element is a red/green pair. The GL converts it to floating point and assembles it into an RGBA element by attaching 0 for blue, and 1 for alpha. Each component is then multiplied by the signed scale factor [_GL_c_SCALE](_GL_c_SCALE), added to the signed bias [_GL_c_BIAS](_GL_c_BIAS), and clamped to the range [0,1].
; [_GL_RGB](_GL_RGB) or [_GL_BGR](_GL_BGR)
> Each element is an RGB triple. The GL converts it to floating point and assembles it into an RGBA element by attaching 1 for alpha. Each component is then multiplied by the signed scale factor [_GL_c_SCALE](_GL_c_SCALE), added to the signed bias [_GL_c_BIAS](_GL_c_BIAS), and clamped to the range [0,1].
; [_GL_RGBA](_GL_RGBA) or [_GL_BGRA](_GL_BGRA)
> Each element contains all four components. Each component is multiplied by the signed scale factor [_GL_c_SCALE](_GL_c_SCALE), added to the signed bias [_GL_c_BIAS](_GL_c_BIAS), and clamped to the range [0,1].
; [_GL_DEPTH_COMPONENT](_GL_DEPTH_COMPONENT)
> Each element is a single depth value. The GL converts it to floating point, multiplies by the signed scale factor [_GL_DEPTH_SCALE](_GL_DEPTH_SCALE), adds the signed bias [_GL_DEPTH_BIAS](_GL_DEPTH_BIAS), and clamps to the range [0,1].
If an application wants to store the texture at a certain resolution or in a certain format, it can request the resolution and format with internalFormat. The GL will choose an internal representation that closely approximates that requested by internalFormat, but it may not match exactly. (The representations specified by [_GL_RED](_GL_RED), [_GL_RG](_GL_RG), [_GL_RGB](_GL_RGB) and [_GL_RGBA](_GL_RGBA) must match exactly.)
internalFormat may be one of the base internal formats shown in Table 1, below
glapi baseformattable
internalFormat may also be one of the sized internal formats shown in Table 2, below
glapi internalformattable
Finally, internalFormat may also be one of the generic or compressed compressed texture formats shown in Table 3 below
glapi compressedformattable
If the internalFormat parameter is one of the generic compressed formats, [_GL_COMPRESSED_RED](_GL_COMPRESSED_RED), [_GL_COMPRESSED_RG](_GL_COMPRESSED_RG), [_GL_COMPRESSED_RGB](_GL_COMPRESSED_RGB), or [_GL_COMPRESSED_RGBA](_GL_COMPRESSED_RGBA), the GL will replace the internal format with the symbolic constant for a specific internal format and compress the texture before storage. If no corresponding internal format is available, or the GL can not compress that image for any reason, the internal format is instead replaced with a corresponding base internal format.
If the internalFormat parameter is [_GL_SRGB](_GL_SRGB), [_GL_SRGB8](_GL_SRGB8), [_GL_SRGB_ALPHA](_GL_SRGB_ALPHA)or [_GL_SRGB8_ALPHA8](_GL_SRGB8_ALPHA8), the texture is treated as if the red, green, or blue components are encoded in the sRGB color space. Any alpha component is left unchanged. The conversion from the sRGB encoded component c<sub>s</sub> to a linear component c<sub>l</sub> is:
glapi srgb equation
Assume c<sub>s</sub> is the sRGB component in the range [0,1].
Use the [_GL_PROXY_TEXTURE_1D](_GL_PROXY_TEXTURE_1D) target to try out a resolution and format. The implementation will update and recompute its best match for the requested storage resolution and format. To then query this state, call [_glGetTexLevelParameter](_glGetTexLevelParameter). If the texture cannot be accommodated, texture state is set to 0.
A one-component texture image uses only the red component of the RGBA color from data. A two-component image uses the R and A values. A three-component image uses the R, G, and B values. A four-component image uses all of the RGBA components.
Image-based shadowing can be enabled by comparing texture r coordinates to depth texture values to generate a boolean result. See [_glTexParameter](_glTexParameter) for details on texture comparison.
## Notes
[_glPixelStore](_glPixelStore) modes affect texture images.
data may be a null pointer. In this case texture memory is allocated to accommodate a texture of width width. You can then download subtextures to initialize the texture memory. The image is undefined if the program tries to apply an uninitialized portion of the texture image to a primitive.
**_glTexImage1D** specifies the one-dimensional texture for the current texture unit, specified with [_glActiveTexture](_glActiveTexture).
## Error(s)
[_GL_INVALID_ENUM](_GL_INVALID_ENUM) is generated if target is not [_GL_TEXTURE_1D](_GL_TEXTURE_1D) or [_GL_PROXY_TEXTURE_1D](_GL_PROXY_TEXTURE_1D).
[_GL_INVALID_ENUM](_GL_INVALID_ENUM) is generated if format is not an accepted format constant. Format constants other than [_GL_STENCIL_INDEX](_GL_STENCIL_INDEX) are accepted.
[_GL_INVALID_ENUM](_GL_INVALID_ENUM) is generated if type is not a type constant.
[_GL_INVALID_VALUE](_GL_INVALID_VALUE) is generated if level is less than 0.
[_GL_INVALID_VALUE](_GL_INVALID_VALUE) may be generated if level is greater than log<sub>2</sub>(*max*), where *max* is the returned value of [_GL_MAX_TEXTURE_SIZE](_GL_MAX_TEXTURE_SIZE).
[_GL_INVALID_VALUE](_GL_INVALID_VALUE) is generated if internalFormat is not one of the accepted resolution and format symbolic constants.
[_GL_INVALID_VALUE](_GL_INVALID_VALUE) is generated if width is less than 0 or greater than [_GL_MAX_TEXTURE_SIZE](_GL_MAX_TEXTURE_SIZE).
[_GL_INVALID_VALUE](_GL_INVALID_VALUE) is generated if border is not 0.
[_GL_INVALID_OPERATION](_GL_INVALID_OPERATION) is generated if type is one of [_GL_UNSIGNED_BYTE_3_3_2](_GL_UNSIGNED_BYTE_3_3_2), [_GL_UNSIGNED_BYTE_2_3_3_REV](_GL_UNSIGNED_BYTE_2_3_3_REV), [_GL_UNSIGNED_SHORT_5_6_5](_GL_UNSIGNED_SHORT_5_6_5), or [_GL_UNSIGNED_SHORT_5_6_5_REV](_GL_UNSIGNED_SHORT_5_6_5_REV) and format is not [_GL_RGB](_GL_RGB).
[_GL_INVALID_OPERATION](_GL_INVALID_OPERATION) is generated if type is one of [_GL_UNSIGNED_SHORT_4_4_4_4](_GL_UNSIGNED_SHORT_4_4_4_4), [_GL_UNSIGNED_SHORT_4_4_4_4_REV](_GL_UNSIGNED_SHORT_4_4_4_4_REV), [_GL_UNSIGNED_SHORT_5_5_5_1](_GL_UNSIGNED_SHORT_5_5_5_1), [_GL_UNSIGNED_SHORT_1_5_5_5_REV](_GL_UNSIGNED_SHORT_1_5_5_5_REV), [_GL_UNSIGNED_INT_8_8_8_8](_GL_UNSIGNED_INT_8_8_8_8), [_GL_UNSIGNED_INT_8_8_8_8_REV](_GL_UNSIGNED_INT_8_8_8_8_REV), [_GL_UNSIGNED_INT_10_10_10_2](_GL_UNSIGNED_INT_10_10_10_2), or [_GL_UNSIGNED_INT_2_10_10_10_REV](_GL_UNSIGNED_INT_2_10_10_10_REV) and format is neither [_GL_RGBA](_GL_RGBA) nor [_GL_BGRA](_GL_BGRA).
[_GL_INVALID_OPERATION](_GL_INVALID_OPERATION) is generated if format is [_GL_DEPTH_COMPONENT](_GL_DEPTH_COMPONENT) and internalFormat is not [_GL_DEPTH_COMPONENT](_GL_DEPTH_COMPONENT), [_GL_DEPTH_COMPONENT16](_GL_DEPTH_COMPONENT16), [_GL_DEPTH_COMPONENT24](_GL_DEPTH_COMPONENT24), or [_GL_DEPTH_COMPONENT32](_GL_DEPTH_COMPONENT32).
[_GL_INVALID_OPERATION](_GL_INVALID_OPERATION) is generated if internalFormat is [_GL_DEPTH_COMPONENT](_GL_DEPTH_COMPONENT), [_GL_DEPTH_COMPONENT16](_GL_DEPTH_COMPONENT16), [_GL_DEPTH_COMPONENT24](_GL_DEPTH_COMPONENT24), or [_GL_DEPTH_COMPONENT32](_GL_DEPTH_COMPONENT32), and format is not [_GL_DEPTH_COMPONENT](_GL_DEPTH_COMPONENT).
[_GL_INVALID_OPERATION](_GL_INVALID_OPERATION) is generated if a non-zero buffer object name is bound to the [_GL_PIXEL_UNPACK_BUFFER](_GL_PIXEL_UNPACK_BUFFER) target and the buffer object's data store is currently mapped.
[_GL_INVALID_OPERATION](_GL_INVALID_OPERATION) is generated if a non-zero buffer object name is bound to the [_GL_PIXEL_UNPACK_BUFFER](_GL_PIXEL_UNPACK_BUFFER) target and the data would be unpacked from the buffer object such that the memory reads required would exceed the data store size.
[_GL_INVALID_OPERATION](_GL_INVALID_OPERATION) is generated if a non-zero buffer object name is bound to the [_GL_PIXEL_UNPACK_BUFFER](_GL_PIXEL_UNPACK_BUFFER) target and data is not evenly divisible into the number of bytes needed to store in memory a datum indicated by type.
## Use With
[_glGetTexImage](_glGetTexImage)
[_glGet](_glGet) with argument [_GL_PIXEL_UNPACK_BUFFER_BINDING](_GL_PIXEL_UNPACK_BUFFER_BINDING)
## See Also
[_GL](_GL)
[_glActiveTexture](_glActiveTexture), [_glBindTexture](_glBindTexture), [_glTexBuffer](_glTexBuffer), [_glTexBufferRange](_glTexBufferRange), [_glTexImage2D](_glTexImage2D), [_glTexImage2DMultisample](_glTexImage2DMultisample), [_glTexImage3D](_glTexImage3D), [_glTexImage3DMultisample](_glTexImage3DMultisample), [_glTexSubImage1D](_glTexSubImage1D), [_glPixelStore](_glPixelStore)

View file

@ -1,161 +0,0 @@
**_glTexImage2D:** specify a two-dimensional texture image
## Syntax
SUB _glTexImage2D (BYVAL target AS _UNSIGNED LONG, BYVAL level AS LONG, BYVAL internalformat AS LONG, BYVAL width AS LONG, BYVAL height AS LONG, BYVAL border AS LONG, BYVAL format AS _UNSIGNED LONG, BYVAL type AS _UNSIGNED LONG, pixels AS _OFFSET)
void **_glTexImage2D**(GLenum target, GLint level, GLint internalFormat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid * data);
; target
> Specifies the target texture. Must be [_GL_TEXTURE_2D](_GL_TEXTURE_2D), [_GL_PROXY_TEXTURE_2D](_GL_PROXY_TEXTURE_2D), [_GL_TEXTURE_1D_ARRAY](_GL_TEXTURE_1D_ARRAY), [_GL_PROXY_TEXTURE_1D_ARRAY](_GL_PROXY_TEXTURE_1D_ARRAY), [_GL_TEXTURE_RECTANGLE](_GL_TEXTURE_RECTANGLE), [_GL_PROXY_TEXTURE_RECTANGLE](_GL_PROXY_TEXTURE_RECTANGLE), [_GL_TEXTURE_CUBE_MAP_POSITIVE_X](_GL_TEXTURE_CUBE_MAP_POSITIVE_X), [_GL_TEXTURE_CUBE_MAP_NEGATIVE_X](_GL_TEXTURE_CUBE_MAP_NEGATIVE_X), [_GL_TEXTURE_CUBE_MAP_POSITIVE_Y](_GL_TEXTURE_CUBE_MAP_POSITIVE_Y), [_GL_TEXTURE_CUBE_MAP_NEGATIVE_Y](_GL_TEXTURE_CUBE_MAP_NEGATIVE_Y), [_GL_TEXTURE_CUBE_MAP_POSITIVE_Z](_GL_TEXTURE_CUBE_MAP_POSITIVE_Z), [_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z](_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z), or [_GL_PROXY_TEXTURE_CUBE_MAP](_GL_PROXY_TEXTURE_CUBE_MAP).
; level
> Specifies the level-of-detail number. Level 0 is the base image level. Level *n* is the *n*th mipmap reduction image. If target is [_GL_TEXTURE_RECTANGLE](_GL_TEXTURE_RECTANGLE) or [_GL_PROXY_TEXTURE_RECTANGLE](_GL_PROXY_TEXTURE_RECTANGLE), level must be 0.
; internalFormat
> Specifies the number of color components in the texture. Must be one of base internal formats given in Table 1, one of the sized internal formats given in Table 2, or one of the compressed internal formats given in Table 3, below.
; width
> Specifies the width of the texture image. All implementations support texture images that are at least 1024 texels wide.
; height
> Specifies the height of the texture image, or the number of layers in a texture array, in the case of the [_GL_TEXTURE_1D_ARRAY](_GL_TEXTURE_1D_ARRAY) and [_GL_PROXY_TEXTURE_1D_ARRAY](_GL_PROXY_TEXTURE_1D_ARRAY) targets. All implementations support 2D texture images that are at least 1024 texels high, and texture arrays that are at least 256 layers deep.
; border
> This value must be 0.
glapi pixeltransferupparams
## Description
Texturing allows elements of an image array to be read by shaders.
To define texture images, call **_glTexImage2D**. The arguments describe the parameters of the texture image, such as height, width, width of the border, level-of-detail number (see [_glTexParameter](_glTexParameter)), and number of color components provided. The last three arguments describe how the image is represented in memory.
If target is [_GL_PROXY_TEXTURE_2D](_GL_PROXY_TEXTURE_2D), [_GL_PROXY_TEXTURE_1D_ARRAY](_GL_PROXY_TEXTURE_1D_ARRAY), [_GL_PROXY_TEXTURE_CUBE_MAP](_GL_PROXY_TEXTURE_CUBE_MAP), or [_GL_PROXY_TEXTURE_RECTANGLE](_GL_PROXY_TEXTURE_RECTANGLE), no data is read from data, but all of the texture image state is recalculated, checked for consistency, and checked against the implementation's capabilities. If the implementation cannot handle a texture of the requested texture size, it sets all of the image state to 0, but does not generate an error (see [_glGetError](_glGetError)). To query for an entire mipmap array, use an image array level greater than or equal to 1.
If target is [_GL_TEXTURE_2D](_GL_TEXTURE_2D), [_GL_TEXTURE_RECTANGLE](_GL_TEXTURE_RECTANGLE) or one of the [_GL_TEXTURE_CUBE_MAP](_GL_TEXTURE_CUBE_MAP) targets, data is read from data as a sequence of signed or unsigned bytes, shorts, or longs, or single-precision floating-point values, depending on type. These values are grouped into sets of one, two, three, or four values, depending on format, to form elements. Each data byte is treated as eight 1-bit elements, with bit ordering determined by [_GL_UNPACK_LSB_FIRST](_GL_UNPACK_LSB_FIRST) (see [_glPixelStore](_glPixelStore)).
If target is [_GL_TEXTURE_1D_ARRAY](_GL_TEXTURE_1D_ARRAY), data is interpreted as an array of one-dimensional images.
If a non-zero named buffer object is bound to the [_GL_PIXEL_UNPACK_BUFFER](_GL_PIXEL_UNPACK_BUFFER) target (see [_glBindBuffer](_glBindBuffer)) while a texture image is specified, data is treated as a byte offset into the buffer object's data store.
The first element corresponds to the lower left corner of the texture image. Subsequent elements progress left-to-right through the remaining texels in the lowest row of the texture image, and then in successively higher rows of the texture image. The final element corresponds to the upper right corner of the texture image.
format determines the composition of each element in data. It can assume one of these symbolic values:
; [_GL_RED](_GL_RED)
> Each element is a single red component. The GL converts it to floating point and assembles it into an RGBA element by attaching 0 for green and blue, and 1 for alpha. Each component is then multiplied by the signed scale factor [_GL_c_SCALE](_GL_c_SCALE), added to the signed bias [_GL_c_BIAS](_GL_c_BIAS), and clamped to the range [0,1].
; [_GL_RG](_GL_RG)
> Each element is a red/green double. The GL converts it to floating point and assembles it into an RGBA element by attaching 0 for blue, and 1 for alpha. Each component is then multiplied by the signed scale factor [_GL_c_SCALE](_GL_c_SCALE), added to the signed bias [_GL_c_BIAS](_GL_c_BIAS), and clamped to the range [0,1].
; [_GL_RGB](_GL_RGB)
> ; [_GL_BGR](_GL_BGR)
> Each element is an RGB triple. The GL converts it to floating point and assembles it into an RGBA element by attaching 1 for alpha. Each component is then multiplied by the signed scale factor [_GL_c_SCALE](_GL_c_SCALE), added to the signed bias [_GL_c_BIAS](_GL_c_BIAS), and clamped to the range [0,1].
; [_GL_RGBA](_GL_RGBA)
> ; [_GL_BGRA](_GL_BGRA)
> Each element contains all four components. Each component is multiplied by the signed scale factor [_GL_c_SCALE](_GL_c_SCALE), added to the signed bias [_GL_c_BIAS](_GL_c_BIAS), and clamped to the range [0,1].
; [_GL_DEPTH_COMPONENT](_GL_DEPTH_COMPONENT)
> Each element is a single depth value. The GL converts it to floating point, multiplies by the signed scale factor [_GL_DEPTH_SCALE](_GL_DEPTH_SCALE), adds the signed bias [_GL_DEPTH_BIAS](_GL_DEPTH_BIAS), and clamps to the range [0,1].
; [_GL_DEPTH_STENCIL](_GL_DEPTH_STENCIL)
> Each element is a pair of depth and stencil values. The depth component of the pair is interpreted as in [_GL_DEPTH_COMPONENT](_GL_DEPTH_COMPONENT). The stencil component is interpreted based on specified the depth + stencil internal format.
If an application wants to store the texture at a certain resolution or in a certain format, it can request the resolution and format with internalFormat. The GL will choose an internal representation that closely approximates that requested by internalFormat, but it may not match exactly. (The representations specified by [_GL_RED](_GL_RED), [_GL_RG](_GL_RG), [_GL_RGB](_GL_RGB), and [_GL_RGBA](_GL_RGBA) must match exactly.)
internalFormat may be one of the base internal formats shown in Table 1, below
glapi baseformattable
internalFormat may also be one of the sized internal formats shown in Table 2, below
glapi internalformattable
Finally, internalFormat may also be one of the generic or compressed compressed texture formats shown in Table 3 below
glapi compressedformattable
If the internalFormat parameter is one of the generic compressed formats, [_GL_COMPRESSED_RED](_GL_COMPRESSED_RED), [_GL_COMPRESSED_RG](_GL_COMPRESSED_RG), [_GL_COMPRESSED_RGB](_GL_COMPRESSED_RGB), or [_GL_COMPRESSED_RGBA](_GL_COMPRESSED_RGBA), the GL will replace the internal format with the symbolic constant for a specific internal format and compress the texture before storage. If no corresponding internal format is available, or the GL can not compress that image for any reason, the internal format is instead replaced with a corresponding base internal format.
If the internalFormat parameter is [_GL_SRGB](_GL_SRGB), [_GL_SRGB8](_GL_SRGB8), [_GL_SRGB_ALPHA](_GL_SRGB_ALPHA), or [_GL_SRGB8_ALPHA8](_GL_SRGB8_ALPHA8), the texture is treated as if the red, green, or blue components are encoded in the sRGB color space. Any alpha component is left unchanged. The conversion from the sRGB encoded component c<sub>s</sub> to a linear component c<sub>l</sub> is:
glapi srgb equation
Assume c<sub>s</sub> is the sRGB component in the range [0,1].
Use the [_GL_PROXY_TEXTURE_2D](_GL_PROXY_TEXTURE_2D), [_GL_PROXY_TEXTURE_1D_ARRAY](_GL_PROXY_TEXTURE_1D_ARRAY), [_GL_PROXY_TEXTURE_RECTANGLE](_GL_PROXY_TEXTURE_RECTANGLE), or [_GL_PROXY_TEXTURE_CUBE_MAP](_GL_PROXY_TEXTURE_CUBE_MAP) target to try out a resolution and format. The implementation will update and recompute its best match for the requested storage resolution and format. To then query this state, call [_glGetTexLevelParameter](_glGetTexLevelParameter). If the texture cannot be accommodated, texture state is set to 0.
A one-component texture image uses only the red component of the RGBA color extracted from data. A two-component image uses the R and G values. A three-component image uses the R, G, and B values. A four-component image uses all of the RGBA components.
Image-based shadowing can be enabled by comparing texture r coordinates to depth texture values to generate a boolean result. See [_glTexParameter](_glTexParameter) for details on texture comparison.
## Notes
The [_glPixelStore](_glPixelStore) mode affects texture images.
data may be a null pointer. In this case, texture memory is allocated to accommodate a texture of width width and height height. You can then download subtextures to initialize this texture memory. The image is undefined if the user tries to apply an uninitialized portion of the texture image to a primitive.
**_glTexImage2D** specifies the two-dimensional texture for the current texture unit, specified with [_glActiveTexture](_glActiveTexture).
## Error(s)
[_GL_INVALID_ENUM](_GL_INVALID_ENUM) is generated if target is not [_GL_TEXTURE_2D](_GL_TEXTURE_2D), [_GL_TEXTURE_1D_ARRAY](_GL_TEXTURE_1D_ARRAY), [_GL_TEXTURE_RECTANGLE](_GL_TEXTURE_RECTANGLE), [_GL_PROXY_TEXTURE_2D](_GL_PROXY_TEXTURE_2D), [_GL_PROXY_TEXTURE_1D_ARRAY](_GL_PROXY_TEXTURE_1D_ARRAY), [_GL_PROXY_TEXTURE_RECTANGLE](_GL_PROXY_TEXTURE_RECTANGLE), [_GL_PROXY_TEXTURE_CUBE_MAP](_GL_PROXY_TEXTURE_CUBE_MAP), [_GL_TEXTURE_CUBE_MAP_POSITIVE_X](_GL_TEXTURE_CUBE_MAP_POSITIVE_X), [_GL_TEXTURE_CUBE_MAP_NEGATIVE_X](_GL_TEXTURE_CUBE_MAP_NEGATIVE_X), [_GL_TEXTURE_CUBE_MAP_POSITIVE_Y](_GL_TEXTURE_CUBE_MAP_POSITIVE_Y), [_GL_TEXTURE_CUBE_MAP_NEGATIVE_Y](_GL_TEXTURE_CUBE_MAP_NEGATIVE_Y), [_GL_TEXTURE_CUBE_MAP_POSITIVE_Z](_GL_TEXTURE_CUBE_MAP_POSITIVE_Z), or [_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z](_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z).
[_GL_INVALID_ENUM](_GL_INVALID_ENUM) is generated if target is one of the six cube map 2D image targets and the width and height parameters are not equal.
[_GL_INVALID_ENUM](_GL_INVALID_ENUM) is generated if type is not a type constant.
[_GL_INVALID_VALUE](_GL_INVALID_VALUE) is generated if width is less than 0 or greater than [_GL_MAX_TEXTURE_SIZE](_GL_MAX_TEXTURE_SIZE).
[_GL_INVALID_VALUE](_GL_INVALID_VALUE) is generated if target is not [_GL_TEXTURE_1D_ARRAY](_GL_TEXTURE_1D_ARRAY) or [_GL_PROXY_TEXTURE_1D_ARRAY](_GL_PROXY_TEXTURE_1D_ARRAY) and height is less than 0 or greater than [_GL_MAX_TEXTURE_SIZE](_GL_MAX_TEXTURE_SIZE).
[_GL_INVALID_VALUE](_GL_INVALID_VALUE) is generated if target is [_GL_TEXTURE_1D_ARRAY](_GL_TEXTURE_1D_ARRAY) or [_GL_PROXY_TEXTURE_1D_ARRAY](_GL_PROXY_TEXTURE_1D_ARRAY) and height is less than 0 or greater than [_GL_MAX_ARRAY_TEXTURE_LAYERS](_GL_MAX_ARRAY_TEXTURE_LAYERS).
[_GL_INVALID_VALUE](_GL_INVALID_VALUE) is generated if level is less than 0.
[_GL_INVALID_VALUE](_GL_INVALID_VALUE) may be generated if level is greater than log<sub>2</sub>(*max*), where *max* is the returned value of [_GL_MAX_TEXTURE_SIZE](_GL_MAX_TEXTURE_SIZE).
[_GL_INVALID_VALUE](_GL_INVALID_VALUE) is generated if internalFormat is not one of the accepted resolution and format symbolic constants.
[_GL_INVALID_VALUE](_GL_INVALID_VALUE) is generated if width or height is less than 0 or greater than [_GL_MAX_TEXTURE_SIZE](_GL_MAX_TEXTURE_SIZE).
[_GL_INVALID_VALUE](_GL_INVALID_VALUE) is generated if border is not 0.
[_GL_INVALID_OPERATION](_GL_INVALID_OPERATION) is generated if type is one of [_GL_UNSIGNED_BYTE_3_3_2](_GL_UNSIGNED_BYTE_3_3_2), [_GL_UNSIGNED_BYTE_2_3_3_REV](_GL_UNSIGNED_BYTE_2_3_3_REV), [_GL_UNSIGNED_SHORT_5_6_5](_GL_UNSIGNED_SHORT_5_6_5), [_GL_UNSIGNED_SHORT_5_6_5_REV](_GL_UNSIGNED_SHORT_5_6_5_REV), or [_GL_UNSIGNED_INT_10F_11F_11F_REV](_GL_UNSIGNED_INT_10F_11F_11F_REV), and format is not [_GL_RGB](_GL_RGB).
[_GL_INVALID_OPERATION](_GL_INVALID_OPERATION) is generated if type is one of [_GL_UNSIGNED_SHORT_4_4_4_4](_GL_UNSIGNED_SHORT_4_4_4_4), [_GL_UNSIGNED_SHORT_4_4_4_4_REV](_GL_UNSIGNED_SHORT_4_4_4_4_REV), [_GL_UNSIGNED_SHORT_5_5_5_1](_GL_UNSIGNED_SHORT_5_5_5_1), [_GL_UNSIGNED_SHORT_1_5_5_5_REV](_GL_UNSIGNED_SHORT_1_5_5_5_REV), [_GL_UNSIGNED_INT_8_8_8_8](_GL_UNSIGNED_INT_8_8_8_8), [_GL_UNSIGNED_INT_8_8_8_8_REV](_GL_UNSIGNED_INT_8_8_8_8_REV), [_GL_UNSIGNED_INT_10_10_10_2](_GL_UNSIGNED_INT_10_10_10_2), [_GL_UNSIGNED_INT_2_10_10_10_REV](_GL_UNSIGNED_INT_2_10_10_10_REV), or [_GL_UNSIGNED_INT_5_9_9_9_REV](_GL_UNSIGNED_INT_5_9_9_9_REV), and format is neither [_GL_RGBA](_GL_RGBA) nor [_GL_BGRA](_GL_BGRA).
[_GL_INVALID_OPERATION](_GL_INVALID_OPERATION) is generated if target is not [_GL_TEXTURE_2D](_GL_TEXTURE_2D), [_GL_PROXY_TEXTURE_2D](_GL_PROXY_TEXTURE_2D), [_GL_TEXTURE_RECTANGLE](_GL_TEXTURE_RECTANGLE), or [_GL_PROXY_TEXTURE_RECTANGLE](_GL_PROXY_TEXTURE_RECTANGLE), and internalFormat is [_GL_DEPTH_COMPONENT](_GL_DEPTH_COMPONENT), [_GL_DEPTH_COMPONENT16](_GL_DEPTH_COMPONENT16), [_GL_DEPTH_COMPONENT24](_GL_DEPTH_COMPONENT24), or [_GL_DEPTH_COMPONENT32F](_GL_DEPTH_COMPONENT32F).
[_GL_INVALID_OPERATION](_GL_INVALID_OPERATION) is generated if format is [_GL_DEPTH_COMPONENT](_GL_DEPTH_COMPONENT) and internalFormat is not [_GL_DEPTH_COMPONENT](_GL_DEPTH_COMPONENT), [_GL_DEPTH_COMPONENT16](_GL_DEPTH_COMPONENT16), [_GL_DEPTH_COMPONENT24](_GL_DEPTH_COMPONENT24), or [_GL_DEPTH_COMPONENT32F](_GL_DEPTH_COMPONENT32F).
[_GL_INVALID_OPERATION](_GL_INVALID_OPERATION) is generated if internalFormat is [_GL_DEPTH_COMPONENT](_GL_DEPTH_COMPONENT), [_GL_DEPTH_COMPONENT16](_GL_DEPTH_COMPONENT16), [_GL_DEPTH_COMPONENT24](_GL_DEPTH_COMPONENT24), or [_GL_DEPTH_COMPONENT32F](_GL_DEPTH_COMPONENT32F), and format is not [_GL_DEPTH_COMPONENT](_GL_DEPTH_COMPONENT).
[_GL_INVALID_OPERATION](_GL_INVALID_OPERATION) is generated if a non-zero buffer object name is bound to the [_GL_PIXEL_UNPACK_BUFFER](_GL_PIXEL_UNPACK_BUFFER) target and the buffer object's data store is currently mapped.
[_GL_INVALID_OPERATION](_GL_INVALID_OPERATION) is generated if a non-zero buffer object name is bound to the [_GL_PIXEL_UNPACK_BUFFER](_GL_PIXEL_UNPACK_BUFFER) target and the data would be unpacked from the buffer object such that the memory reads required would exceed the data store size.
[_GL_INVALID_OPERATION](_GL_INVALID_OPERATION) is generated if a non-zero buffer object name is bound to the [_GL_PIXEL_UNPACK_BUFFER](_GL_PIXEL_UNPACK_BUFFER) target and data is not evenly divisible into the number of bytes needed to store in memory a datum indicated by type.
[_GL_INVALID_VALUE](_GL_INVALID_VALUE) is generated if target is [_GL_TEXTURE_RECTANGLE](_GL_TEXTURE_RECTANGLE) or [_GL_PROXY_TEXTURE_RECTANGLE](_GL_PROXY_TEXTURE_RECTANGLE) and level is not 0.
## Use With
[_glGetTexImage](_glGetTexImage)
[_glGet](_glGet) with argument [_GL_PIXEL_UNPACK_BUFFER_BINDING](_GL_PIXEL_UNPACK_BUFFER_BINDING)
## See Also
[_GL](_GL)
[_glActiveTexture](_glActiveTexture), [_glBindTexture](_glBindTexture), [_glTexImage1D](_glTexImage1D), [_glTexImage2DMultisample](_glTexImage2DMultisample), [_glTexImage3D](_glTexImage3D), [_glTexImage3DMultisample](_glTexImage3DMultisample), [_glTexSubImage2D](_glTexSubImage2D), [_glPixelStore](_glPixelStore)

View file

@ -1,89 +0,0 @@
**_glTexSubImage1D:** specify a one-dimensional texture subimage
## Syntax
SUB _glTexSubImage1D (BYVAL target AS _UNSIGNED LONG, BYVAL level AS LONG, BYVAL xoffset AS LONG, BYVAL width AS LONG, BYVAL format AS _UNSIGNED LONG, BYVAL type AS _UNSIGNED LONG, pixels AS _OFFSET)
void **_glTexSubImage1D**(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid * data);
; target
> Specifies the target texture. Must be [_GL_TEXTURE_1D](_GL_TEXTURE_1D).
; level
> Specifies the level-of-detail number. Level 0 is the base image level. Level *n* is the *n*th mipmap reduction image.
; xoffset
> Specifies a texel offset in the x direction within the texture array.
; width
> Specifies the width of the texture subimage.
glapi pixeltransferupparams
## Description
Texturing maps a portion of a specified texture image onto each graphical primitive for which texturing is enabled. To enable or disable one-dimensional texturing, call [_glEnable](_glEnable) and [_glDisable](_glDisable) with argument [_GL_TEXTURE_1D](_GL_TEXTURE_1D).
**_glTexSubImage1D** redefines a contiguous subregion of an existing one-dimensional texture image. The texels referenced by data replace the portion of the existing texture array with x indices xoffset and xoffset + width - 1, inclusive. This region may not include any texels outside the range of the texture array as it was originally specified. It is not an error to specify a subtexture with width of 0, but such a specification has no effect.
If a non-zero named buffer object is bound to the [_GL_PIXEL_UNPACK_BUFFER](_GL_PIXEL_UNPACK_BUFFER) target (see [_glBindBuffer](_glBindBuffer)) while a texture image is specified, data is treated as a byte offset into the buffer object's data store.
## Notes
[_glPixelStore](_glPixelStore) modes affect texture images.
**_glTexSubImage1D** specifies a one-dimensional subtexture for the current texture unit, specified with [_glActiveTexture](_glActiveTexture).
## Error(s)
[_GL_INVALID_ENUM](_GL_INVALID_ENUM) is generated if target is not one of the allowable values.
[_GL_INVALID_ENUM](_GL_INVALID_ENUM) is generated if format is not an accepted format constant.
[_GL_INVALID_ENUM](_GL_INVALID_ENUM) is generated if type is not a type constant.
[_GL_INVALID_VALUE](_GL_INVALID_VALUE) is generated if level is less than 0.
[_GL_INVALID_VALUE](_GL_INVALID_VALUE) may be generated if level is greater than log<sub>2</sub>(*max*), where *max* is the returned value of [_GL_MAX_TEXTURE_SIZE](_GL_MAX_TEXTURE_SIZE).
[_GL_INVALID_VALUE](_GL_INVALID_VALUE) is generated if *xoffset* < 0, or if *xoffset* + *width* > *w*, where *w* is the [_GL_TEXTURE_WIDTH](_GL_TEXTURE_WIDTH). Note that *w* includes twice the border width.
[_GL_INVALID_VALUE](_GL_INVALID_VALUE) is generated if width is less than 0.
[_GL_INVALID_OPERATION](_GL_INVALID_OPERATION) is generated if the texture array has not been defined by a previous [_glTexImage1D](_glTexImage1D) operation.
[_GL_INVALID_OPERATION](_GL_INVALID_OPERATION) is generated if type is one of [_GL_UNSIGNED_BYTE_3_3_2](_GL_UNSIGNED_BYTE_3_3_2), [_GL_UNSIGNED_BYTE_2_3_3_REV](_GL_UNSIGNED_BYTE_2_3_3_REV), [_GL_UNSIGNED_SHORT_5_6_5](_GL_UNSIGNED_SHORT_5_6_5), or [_GL_UNSIGNED_SHORT_5_6_5_REV](_GL_UNSIGNED_SHORT_5_6_5_REV) and format is not [_GL_RGB](_GL_RGB).
[_GL_INVALID_OPERATION](_GL_INVALID_OPERATION) is generated if type is one of [_GL_UNSIGNED_SHORT_4_4_4_4](_GL_UNSIGNED_SHORT_4_4_4_4), [_GL_UNSIGNED_SHORT_4_4_4_4_REV](_GL_UNSIGNED_SHORT_4_4_4_4_REV), [_GL_UNSIGNED_SHORT_5_5_5_1](_GL_UNSIGNED_SHORT_5_5_5_1), [_GL_UNSIGNED_SHORT_1_5_5_5_REV](_GL_UNSIGNED_SHORT_1_5_5_5_REV), [_GL_UNSIGNED_INT_8_8_8_8](_GL_UNSIGNED_INT_8_8_8_8), [_GL_UNSIGNED_INT_8_8_8_8_REV](_GL_UNSIGNED_INT_8_8_8_8_REV), [_GL_UNSIGNED_INT_10_10_10_2](_GL_UNSIGNED_INT_10_10_10_2), or [_GL_UNSIGNED_INT_2_10_10_10_REV](_GL_UNSIGNED_INT_2_10_10_10_REV) and format is neither [_GL_RGBA](_GL_RGBA) nor [_GL_BGRA](_GL_BGRA).
[_GL_INVALID_OPERATION](_GL_INVALID_OPERATION) is generated if a non-zero buffer object name is bound to the [_GL_PIXEL_UNPACK_BUFFER](_GL_PIXEL_UNPACK_BUFFER) target and the buffer object's data store is currently mapped.
[_GL_INVALID_OPERATION](_GL_INVALID_OPERATION) is generated if a non-zero buffer object name is bound to the [_GL_PIXEL_UNPACK_BUFFER](_GL_PIXEL_UNPACK_BUFFER) target and the data would be unpacked from the buffer object such that the memory reads required would exceed the data store size.
[_GL_INVALID_OPERATION](_GL_INVALID_OPERATION) is generated if a non-zero buffer object name is bound to the [_GL_PIXEL_UNPACK_BUFFER](_GL_PIXEL_UNPACK_BUFFER) target and data is not evenly divisible into the number of bytes needed to store in memory a datum indicated by type.
## Use With
[_glGetTexImage](_glGetTexImage)
[_glGet](_glGet) with argument [_GL_PIXEL_UNPACK_BUFFER_BINDING](_GL_PIXEL_UNPACK_BUFFER_BINDING)
## See Also
[_GL](_GL)
[_glActiveTexture](_glActiveTexture), [_glBindTexture](_glBindTexture), [_glTexSubImage2D](_glTexSubImage2D), [_glTexSubImage3D](_glTexSubImage3D), [_glCopyTexImage1D](_glCopyTexImage1D), [_glTexImage1D](_glTexImage1D), [_glTexStorage1D](_glTexStorage1D), [_glTextureView](_glTextureView), [_glPixelStore](_glPixelStore)

View file

@ -1,93 +0,0 @@
**_glTexSubImage2D:** specify a two-dimensional texture subimage
## Syntax
SUB _glTexSubImage2D (BYVAL target AS _UNSIGNED LONG, BYVAL level AS LONG, BYVAL xoffset AS LONG, BYVAL yoffset AS LONG, BYVAL width AS LONG, BYVAL height AS LONG, BYVAL format AS _UNSIGNED LONG, BYVAL type AS _UNSIGNED LONG, pixels AS _OFFSET)
void **_glTexSubImage2D**(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * data);
; target
> Specifies the target texture. Must be [_GL_TEXTURE_2D](_GL_TEXTURE_2D), [_GL_TEXTURE_CUBE_MAP_POSITIVE_X](_GL_TEXTURE_CUBE_MAP_POSITIVE_X), [_GL_TEXTURE_CUBE_MAP_NEGATIVE_X](_GL_TEXTURE_CUBE_MAP_NEGATIVE_X), [_GL_TEXTURE_CUBE_MAP_POSITIVE_Y](_GL_TEXTURE_CUBE_MAP_POSITIVE_Y), [_GL_TEXTURE_CUBE_MAP_NEGATIVE_Y](_GL_TEXTURE_CUBE_MAP_NEGATIVE_Y), [_GL_TEXTURE_CUBE_MAP_POSITIVE_Z](_GL_TEXTURE_CUBE_MAP_POSITIVE_Z), [_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z](_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z), or [_GL_TEXTURE_1D_ARRAY](_GL_TEXTURE_1D_ARRAY).
; level
> Specifies the level-of-detail number. Level 0 is the base image level. Level *n* is the *n*th mipmap reduction image.
; xoffset
> Specifies a texel offset in the x direction within the texture array.
; yoffset
> Specifies a texel offset in the y direction within the texture array.
; width
> Specifies the width of the texture subimage.
; height
> Specifies the height of the texture subimage.
Glapi pixeltransferupparams|
## Description
Texturing maps a portion of a specified texture image onto each graphical primitive for which texturing is enabled.
**_glTexSubImage2D** redefines a contiguous subregion of an existing two-dimensional or one-dimensional array texture image. The texels referenced by data replace the portion of the existing texture array with x indices xoffset and *xoffset* + *width* - 1, inclusive, and y indices yoffset and *yoffset* + *height* - 1, inclusive. This region may not include any texels outside the range of the texture array as it was originally specified. It is not an error to specify a subtexture with zero width or height, but such a specification has no effect.
If a non-zero named buffer object is bound to the [_GL_PIXEL_UNPACK_BUFFER](_GL_PIXEL_UNPACK_BUFFER) target (see [_glBindBuffer](_glBindBuffer)) while a texture image is specified, data is treated as a byte offset into the buffer object's data store.
## Notes
[_glPixelStore](_glPixelStore) modes affect texture images.
**_glTexSubImage2D** specifies a two-dimensional subtexture for the current texture unit, specified with [_glActiveTexture](_glActiveTexture).
## Error(s)
[_GL_INVALID_ENUM](_GL_INVALID_ENUM) is generated if target is not [_GL_TEXTURE_2D](_GL_TEXTURE_2D), [_GL_TEXTURE_CUBE_MAP_POSITIVE_X](_GL_TEXTURE_CUBE_MAP_POSITIVE_X), [_GL_TEXTURE_CUBE_MAP_NEGATIVE_X](_GL_TEXTURE_CUBE_MAP_NEGATIVE_X), [_GL_TEXTURE_CUBE_MAP_POSITIVE_Y](_GL_TEXTURE_CUBE_MAP_POSITIVE_Y), [_GL_TEXTURE_CUBE_MAP_NEGATIVE_Y](_GL_TEXTURE_CUBE_MAP_NEGATIVE_Y), [_GL_TEXTURE_CUBE_MAP_POSITIVE_Z](_GL_TEXTURE_CUBE_MAP_POSITIVE_Z), [_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z](_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z), or [_GL_TEXTURE_1D_ARRAY](_GL_TEXTURE_1D_ARRAY).
[_GL_INVALID_ENUM](_GL_INVALID_ENUM) is generated if format is not an accepted format constant.
[_GL_INVALID_ENUM](_GL_INVALID_ENUM) is generated if type is not a type constant.
[_GL_INVALID_VALUE](_GL_INVALID_VALUE) is generated if level is less than 0.
[_GL_INVALID_VALUE](_GL_INVALID_VALUE) may be generated if level is greater than log<sub>2</sub>(*max*), where *max* is the returned value of [_GL_MAX_TEXTURE_SIZE](_GL_MAX_TEXTURE_SIZE).
[_GL_INVALID_VALUE](_GL_INVALID_VALUE) is generated if *xoffset* < 0, (*xoffset* + *width*) > *w*, *yoffset* < 0, or (*yoffset* + *height*) > *h*, where *w* is the [_GL_TEXTURE_WIDTH](_GL_TEXTURE_WIDTH) and *h* is the [_GL_TEXTURE_HEIGHT](_GL_TEXTURE_HEIGHT).
[_GL_INVALID_VALUE](_GL_INVALID_VALUE) is generated if width or height is less than 0.
[_GL_INVALID_OPERATION](_GL_INVALID_OPERATION) is generated if the texture array has not been defined by a previous [_glTexImage2D](_glTexImage2D) operation.
[_GL_INVALID_OPERATION](_GL_INVALID_OPERATION) is generated if type is one of [_GL_UNSIGNED_BYTE_3_3_2](_GL_UNSIGNED_BYTE_3_3_2), [_GL_UNSIGNED_BYTE_2_3_3_REV](_GL_UNSIGNED_BYTE_2_3_3_REV), [_GL_UNSIGNED_SHORT_5_6_5](_GL_UNSIGNED_SHORT_5_6_5), or [_GL_UNSIGNED_SHORT_5_6_5_REV](_GL_UNSIGNED_SHORT_5_6_5_REV) and format is not [_GL_RGB](_GL_RGB).
[_GL_INVALID_OPERATION](_GL_INVALID_OPERATION) is generated if type is one of [_GL_UNSIGNED_SHORT_4_4_4_4](_GL_UNSIGNED_SHORT_4_4_4_4), [_GL_UNSIGNED_SHORT_4_4_4_4_REV](_GL_UNSIGNED_SHORT_4_4_4_4_REV), [_GL_UNSIGNED_SHORT_5_5_5_1](_GL_UNSIGNED_SHORT_5_5_5_1), [_GL_UNSIGNED_SHORT_1_5_5_5_REV](_GL_UNSIGNED_SHORT_1_5_5_5_REV), [_GL_UNSIGNED_INT_8_8_8_8](_GL_UNSIGNED_INT_8_8_8_8), [_GL_UNSIGNED_INT_8_8_8_8_REV](_GL_UNSIGNED_INT_8_8_8_8_REV), [_GL_UNSIGNED_INT_10_10_10_2](_GL_UNSIGNED_INT_10_10_10_2), or [_GL_UNSIGNED_INT_2_10_10_10_REV](_GL_UNSIGNED_INT_2_10_10_10_REV) and format is neither [_GL_RGBA](_GL_RGBA) nor [_GL_BGRA](_GL_BGRA).
[_GL_INVALID_OPERATION](_GL_INVALID_OPERATION) is generated if a non-zero buffer object name is bound to the [_GL_PIXEL_UNPACK_BUFFER](_GL_PIXEL_UNPACK_BUFFER) target and the buffer object's data store is currently mapped.
[_GL_INVALID_OPERATION](_GL_INVALID_OPERATION) is generated if a non-zero buffer object name is bound to the [_GL_PIXEL_UNPACK_BUFFER](_GL_PIXEL_UNPACK_BUFFER) target and the data would be unpacked from the buffer object such that the memory reads required would exceed the data store size.
[_GL_INVALID_OPERATION](_GL_INVALID_OPERATION) is generated if a non-zero buffer object name is bound to the [_GL_PIXEL_UNPACK_BUFFER](_GL_PIXEL_UNPACK_BUFFER) target and data is not evenly divisible into the number of bytes needed to store in memory a datum indicated by type.
## Use With
[_glGetTexImage](_glGetTexImage)
[_glGet](_glGet) with argument [_GL_PIXEL_UNPACK_BUFFER_BINDING](_GL_PIXEL_UNPACK_BUFFER_BINDING)
## See Also
[_GL](_GL)
[_glActiveTexture](_glActiveTexture), [_glBindTexture](_glBindTexture), [_glTexSubImage1D](_glTexSubImage1D), [_glTexSubImage3D](_glTexSubImage3D), [_glCopyTexImage2D](_glCopyTexImage2D), [_glTexImage2D](_glTexImage2D), [_glTexStorage2D](_glTexStorage2D), [_glTextureView](_glTextureView), [_glPixelStore](_glPixelStore)

View file

@ -1,52 +0,0 @@
**_glViewport:** set the viewport
## Syntax
;QB64:SUB _glViewport (BYVAL x AS LONG, BYVAL y AS LONG, BYVAL width AS LONG, BYVAL height AS LONG)
;C/C++:void **_glViewport**(GLint x, GLint y, GLsizei width, GLsizei height);
; x, y
> Specify the lower left corner of the viewport rectangle, in pixels. The initial value is (0,0).
; width, height
> Specify the width and height of the viewport. When a GL context is first attached to a window, width and height are set to the dimensions of that window.
## Description
**_glViewport** specifies the affine transformation of *x* and *y* from normalized device coordinates to window coordinates. Let (x<sub>nd</sub>, y<sub>nd</sub>) be normalized device coordinates. Then the window coordinates (x<sub>w</sub>, y<sub>w</sub>) are computed as follows:
glapi viewport equations
Viewport width and height are silently clamped to a range that depends on the implementation. To query this range, call [_glGet](_glGet) with argument [_GL_MAX_VIEWPORT_DIMS](_GL_MAX_VIEWPORT_DIMS).
## Error(s)
[_GL_INVALID_VALUE](_GL_INVALID_VALUE) is generated if either width or height is negative.
## Use With
[_glGet](_glGet) with argument [_GL_VIEWPORT](_GL_VIEWPORT)
[_glGet](_glGet) with argument [_GL_MAX_VIEWPORT_DIMS](_GL_MAX_VIEWPORT_DIMS)
## See Also
[_GL](_GL)
[_glDepthRange](_glDepthRange), [_glViewportArray](_glViewportArray), [_glViewportIndexed](_glViewportIndexed)

View file

@ -1,64 +0,0 @@
**_glBindTexture:** bind a named texture to a texturing target
## Syntax
> : SUB **_glBindTexture** (BYVAL target AS _UNSIGNED LONG, BYVAL texture AS _UNSIGNED LONG)
> : void **_glBindTexture**(GLenum target, GLuint texture);
; target
> Specifies the target to which the texture is bound. Must be either [_GL_TEXTURE_1D](_GL_TEXTURE_1D), [_GL_TEXTURE_2D](_GL_TEXTURE_2D), [_GL_TEXTURE_3D](_GL_TEXTURE_3D), or [_GL_TEXTURE_1D_ARRAY](_GL_TEXTURE_1D_ARRAY), [_GL_TEXTURE_2D_ARRAY](_GL_TEXTURE_2D_ARRAY), [_GL_TEXTURE_RECTANGLE](_GL_TEXTURE_RECTANGLE), [_GL_TEXTURE_CUBE_MAP](_GL_TEXTURE_CUBE_MAP), [_GL_TEXTURE_2D_MULTISAMPLE](_GL_TEXTURE_2D_MULTISAMPLE), [_GL_TEXTURE_2D_MULTISAMPLE_ARRAY](_GL_TEXTURE_2D_MULTISAMPLE_ARRAY), [_GL_TEXTURE_BUFFER](_GL_TEXTURE_BUFFER), or [_GL_TEXTURE_CUBE_MAP_ARRAY](_GL_TEXTURE_CUBE_MAP_ARRAY).
; texture
> Specifies the name of a texture.
## Description
**_glBindTexture** lets you create or use a named texture. Calling **_glBindTexture** with target set to [_GL_TEXTURE_1D](_GL_TEXTURE_1D), [_GL_TEXTURE_2D](_GL_TEXTURE_2D), [_GL_TEXTURE_3D](_GL_TEXTURE_3D), or [_GL_TEXTURE_1D_ARRAY](_GL_TEXTURE_1D_ARRAY), [_GL_TEXTURE_2D_ARRAY](_GL_TEXTURE_2D_ARRAY), [_GL_TEXTURE_RECTANGLE](_GL_TEXTURE_RECTANGLE), [_GL_TEXTURE_CUBE_MAP](_GL_TEXTURE_CUBE_MAP), [_GL_TEXTURE_2D_MULTISAMPLE](_GL_TEXTURE_2D_MULTISAMPLE) or [_GL_TEXTURE_2D_MULTISAMPLE_ARRAY](_GL_TEXTURE_2D_MULTISAMPLE_ARRAY) and texture set to the name of the new texture binds the texture name to the target. When a texture is bound to a target, the previous binding for that target is automatically broken.
Texture names are unsigned integers. The value zero is reserved to represent the default texture for each texture target. Texture names and the corresponding texture contents are local to the shared object space of the current GL rendering context; two rendering contexts share texture names only if they explicitly enable sharing between contexts through the appropriate GL windows interfaces functions.
You must use [_glGenTextures](_glGenTextures) to generate a set of new texture names.
When a texture is first bound, it assumes the specified target: A texture first bound to [_GL_TEXTURE_1D](_GL_TEXTURE_1D) becomes one-dimensional texture, a texture first bound to [_GL_TEXTURE_2D](_GL_TEXTURE_2D) becomes two-dimensional texture, a texture first bound to [_GL_TEXTURE_3D](_GL_TEXTURE_3D) becomes three-dimensional texture, a texture first bound to [_GL_TEXTURE_1D_ARRAY](_GL_TEXTURE_1D_ARRAY) becomes one-dimensional array texture, a texture first bound to [_GL_TEXTURE_2D_ARRAY](_GL_TEXTURE_2D_ARRAY) becomes two-dimensional arary texture, a texture first bound to [_GL_TEXTURE_RECTANGLE](_GL_TEXTURE_RECTANGLE) becomes rectangle texture, a, texture first bound to [_GL_TEXTURE_CUBE_MAP](_GL_TEXTURE_CUBE_MAP) becomes a cube-mapped texture, a texture first bound to [_GL_TEXTURE_2D_MULTISAMPLE](_GL_TEXTURE_2D_MULTISAMPLE) becomes a two-dimensional multisampled texture, and a texture first bound to [_GL_TEXTURE_2D_MULTISAMPLE_ARRAY](_GL_TEXTURE_2D_MULTISAMPLE_ARRAY) becomes a two-dimensional multisampled array texture. The state of a one-dimensional texture immediately after it is first bound is equivalent to the state of the default [_GL_TEXTURE_1D](_GL_TEXTURE_1D) at GL initialization, and similarly for the other texture types.
While a texture is bound, GL operations on the target to which it is bound affect the bound texture, and queries of the target to which it is bound return state from the bound texture. In effect, the texture targets become aliases for the textures currently bound to them, and the texture name zero refers to the default textures that were bound to them at initialization.
A texture binding created with **_glBindTexture** remains active until a different texture is bound to the same target, or until the bound texture is deleted with [_glDeleteTextures](_glDeleteTextures).
Once created, a named texture may be re-bound to its same original target as often as needed. It is usually much faster to use **_glBindTexture** to bind an existing named texture to one of the texture targets than it is to reload the texture image using [_glTexImage1D](_glTexImage1D), [_glTexImage2D](_glTexImage2D), [_glTexImage3D](_glTexImage3D) or another similar function.
## Notes
The [_GL_TEXTURE_2D_MULTISAMPLE](_GL_TEXTURE_2D_MULTISAMPLE) and [_GL_TEXTURE_2D_MULTISAMPLE_ARRAY](_GL_TEXTURE_2D_MULTISAMPLE_ARRAY) targets are available only if the GL version is 3.2 or higher.
## Error(s)
[_GL_INVALID_ENUM](_GL_INVALID_ENUM) is generated if target is not one of the allowable values.
[_GL_INVALID_VALUE](_GL_INVALID_VALUE) is generated if target is not a name returned from a previous call to [_glGenTextures](_glGenTextures).
[_GL_INVALID_OPERATION](_GL_INVALID_OPERATION) is generated if texture was previously created with a target that doesn't match that of target.
## Use With
[_glGet](_glGet) with argument [_GL_TEXTURE_BINDING_1D](_GL_TEXTURE_BINDING_1D), [_GL_TEXTURE_BINDING_2D](_GL_TEXTURE_BINDING_2D), [_GL_TEXTURE_BINDING_3D](_GL_TEXTURE_BINDING_3D), [_GL_TEXTURE_BINDING_1D_ARRAY](_GL_TEXTURE_BINDING_1D_ARRAY), [_GL_TEXTURE_BINDING_2D_ARRAY](_GL_TEXTURE_BINDING_2D_ARRAY), [_GL_TEXTURE_BINDING_RECTANGLE](_GL_TEXTURE_BINDING_RECTANGLE), [_GL_TEXTURE_BINDING_2D_MULTISAMPLE](_GL_TEXTURE_BINDING_2D_MULTISAMPLE), or [_GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY](_GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY).
## See Also
[_GL](_GL)
[_glActiveTexture](_glActiveTexture), [_glDeleteTextures](_glDeleteTextures), [_glGenTextures](_glGenTextures), [_glGetTexParameter](_glGetTexParameter), [_glIsTexture](_glIsTexture), [_glTexParameter](_glTexParameter)

View file

@ -1,67 +0,0 @@
**_glLineWidth:** specify the width of rasterized lines
## Syntax
SUB _glLineWidth (BYVAL width AS SINGLE)
void **_glLineWidth**(GLfloat width);
; width
> Specifies the width of rasterized lines. The initial value is 1.
## Description
**_glLineWidth** specifies the rasterized width of both aliased and antialiased lines. Using a line width other than 1 has different effects, depending on whether line antialiasing is enabled. To enable and disable line antialiasing, call [_glEnable](_glEnable) and [_glDisable](_glDisable) with argument [_GL_LINE_SMOOTH](_GL_LINE_SMOOTH). Line antialiasing is initially disabled.
If line antialiasing is disabled, the actual width is determined by rounding the supplied width to the nearest integer. (If the rounding results in the value 0, it is as if the line width were 1.) If <math>|\Delta X| \ge |\Delta Y|</math>, *i* pixels are filled in each column that is rasterized, where *i* is the rounded value of width. Otherwise, *i* pixels are filled in each row that is rasterized.
If antialiasing is enabled, line rasterization produces a fragment for each pixel square that intersects the region lying within the rectangle having width equal to the current line width, length equal to the actual length of the line, and centered on the mathematical line segment. The coverage value for each fragment is the window coordinate area of the intersection of the rectangular region with the corresponding pixel square. This value is saved and used in the final rasterization step.
Not all widths can be supported when line antialiasing is enabled. If an unsupported width is requested, the nearest supported width is used. Only width 1 is guaranteed to be supported; others depend on the implementation. Likewise, there is a range for aliased line widths as well. To query the range of supported widths and the size difference between supported widths within the range, call [_glGet](_glGet) with arguments [_GL_ALIASED_LINE_WIDTH_RANGE](_GL_ALIASED_LINE_WIDTH_RANGE), [_GL_SMOOTH_LINE_WIDTH_RANGE](_GL_SMOOTH_LINE_WIDTH_RANGE), and [_GL_SMOOTH_LINE_WIDTH_GRANULARITY](_GL_SMOOTH_LINE_WIDTH_GRANULARITY).
## Notes
The line width specified by **_glLineWidth** is always returned when [_GL_LINE_WIDTH](_GL_LINE_WIDTH) is queried. Clamping and rounding for aliased and antialiased lines have no effect on the specified value.
Nonantialiased line width may be clamped to an implementation-dependent maximum. Call [_glGet](_glGet) with [_GL_ALIASED_LINE_WIDTH_RANGE](_GL_ALIASED_LINE_WIDTH_RANGE) to determine the maximum width.
In OpenGL 1.2, the tokens [_GL_LINE_WIDTH_RANGE](_GL_LINE_WIDTH_RANGE) and [_GL_LINE_WIDTH_GRANULARITY](_GL_LINE_WIDTH_GRANULARITY) were replaced by [_GL_ALIASED_LINE_WIDTH_RANGE](_GL_ALIASED_LINE_WIDTH_RANGE), [_GL_SMOOTH_LINE_WIDTH_RANGE](_GL_SMOOTH_LINE_WIDTH_RANGE), and [_GL_SMOOTH_LINE_WIDTH_GRANULARITY](_GL_SMOOTH_LINE_WIDTH_GRANULARITY). The old names are retained for backward compatibility, but should not be used in new code.
## Error(s)
[_GL_INVALID_VALUE](_GL_INVALID_VALUE) is generated if width is less than or equal to 0.
## Use With
[_glGet](_glGet) with argument [_GL_LINE_WIDTH](_GL_LINE_WIDTH)
[_glGet](_glGet) with argument [_GL_ALIASED_LINE_WIDTH_RANGE](_GL_ALIASED_LINE_WIDTH_RANGE)
[_glGet](_glGet) with argument [_GL_SMOOTH_LINE_WIDTH_RANGE](_GL_SMOOTH_LINE_WIDTH_RANGE)
[_glGet](_glGet) with argument [_GL_SMOOTH_LINE_WIDTH_GRANULARITY](_GL_SMOOTH_LINE_WIDTH_GRANULARITY)
[_glIsEnabled](_glIsEnabled) with argument [_GL_LINE_SMOOTH](_GL_LINE_SMOOTH)
## See Also
[_GL](_GL)
[_glEnable](_glEnable)
Copyright 1991-2006 Silicon Graphics, Inc. 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/].

View file

@ -1,34 +0,0 @@
**_glFinish:** block until all GL execution is complete
## Syntax
SUB _glFinish
void **_glFinish**(void);
## Description
**_glFinish** does not return until the effects of all previously called GL commands are complete. Such effects include all changes to GL state, all changes to connection state, and all changes to the frame buffer contents.
## Notes
**_glFinish** requires a round trip to the server.
## See Also
[_GL](_GL)
[_glFlush](_glFlush), [_glFenceSync](_glFenceSync), [_glWaitSync](_glWaitSync), [_glClientWaitSync](_glClientWaitSync)
Copyright 1991-2006 Silicon Graphics, Inc. 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/].

View file

@ -1,61 +0,0 @@
**_glHint:** specify implementation-specific hints
## Syntax
SUB _glHint (BYVAL target AS _UNSIGNED LONG, BYVAL mode AS _UNSIGNED LONG)
void **_glHint**(GLenum target, GLenum mode);
; target
> Specifies a symbolic constant indicating the behavior to be controlled. [_GL_LINE_SMOOTH_HINT](_GL_LINE_SMOOTH_HINT), [_GL_POLYGON_SMOOTH_HINT](_GL_POLYGON_SMOOTH_HINT), [_GL_TEXTURE_COMPRESSION_HINT](_GL_TEXTURE_COMPRESSION_HINT), and [_GL_FRAGMENT_SHADER_DERIVATIVE_HINT](_GL_FRAGMENT_SHADER_DERIVATIVE_HINT) are accepted.
; mode
> Specifies a symbolic constant indicating the desired behavior. [_GL_FASTEST](_GL_FASTEST), [_GL_NICEST](_GL_NICEST), and [_GL_DONT_CARE](_GL_DONT_CARE) are accepted.
## Description
Certain aspects of GL behavior, when there is room for interpretation, can be controlled with hints. A hint is specified with two arguments. target is a symbolic constant indicating the behavior to be controlled, and mode is another symbolic constant indicating the desired behavior. The initial value for each target is [_GL_DONT_CARE](_GL_DONT_CARE). mode can be one of the following:
; [_GL_FASTEST](_GL_FASTEST)
>
The most efficient option should be chosen.
; [_GL_NICEST](_GL_NICEST)
>
The most correct, or highest quality, option should be chosen.
; [_GL_DONT_CARE](_GL_DONT_CARE)
>
No preference.
Though the implementation aspects that can be hinted are well defined, the interpretation of the hints depends on the implementation. The hint aspects that can be specified with target, along with suggested semantics, are as follows:
; [_GL_FRAGMENT_SHADER_DERIVATIVE_HINT](_GL_FRAGMENT_SHADER_DERIVATIVE_HINT)
>
Indicates the accuracy of the derivative calculation for the GL shading language fragment processing built-in functions: [_dFdx](_dFdx), [_dFdy](_dFdy), and [_fwidth](_fwidth).
; [_GL_LINE_SMOOTH_HINT](_GL_LINE_SMOOTH_HINT)
>
Indicates the sampling quality of antialiased lines. If a larger filter function is applied, hinting [_GL_NICEST](_GL_NICEST) can result in more pixel fragments being generated during rasterization.
; [_GL_POLYGON_SMOOTH_HINT](_GL_POLYGON_SMOOTH_HINT)
>
Indicates the sampling quality of antialiased polygons. Hinting [_GL_NICEST](_GL_NICEST) can result in more pixel fragments being generated during rasterization, if a larger filter function is applied.
; [_GL_TEXTURE_COMPRESSION_HINT](_GL_TEXTURE_COMPRESSION_HINT)
>
Indicates the quality and performance of the compressing texture images. Hinting [_GL_FASTEST](_GL_FASTEST) indicates that texture images should be compressed as quickly as possible, while [_GL_NICEST](_GL_NICEST) indicates that texture images should be compressed with as little image quality loss as possible. [_GL_NICEST](_GL_NICEST) should be selected if the texture is to be retrieved by [_glGetCompressedTexImage](_glGetCompressedTexImage) for reuse.
## Notes
The interpretation of hints depends on the implementation. Some implementations ignore **_glHint** settings.
## Error(s)
[_GL_INVALID_ENUM](_GL_INVALID_ENUM) is generated if either target or mode is not an accepted value.
Copyright 1991-2006 Silicon Graphics, Inc. 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/].

View file

@ -1,64 +0,0 @@
**_glClear:** clear buffers to preset values
## Syntax
> : [SUB](SUB) _glClear ([BYVAL](BYVAL) mask AS [_UNSIGNED](_UNSIGNED) [LONG](LONG))
> : void **_glClear**(GLbitfield mask);
## Parameters
* *mask* that indicate the buffer [OR](OR) buffers to be cleared. The three masks are [_GL_COLOR_BUFFER_BIT](_GL_COLOR_BUFFER_BIT), [_GL_DEPTH_BUFFER_BIT](_GL_DEPTH_BUFFER_BIT), and [_GL_STENCIL_BUFFER_BIT](_GL_STENCIL_BUFFER_BIT).
## Description
* [_glClear](_glClear) sets the bitplane area of the window to values previously selected by [_glClearColor](_glClearColor), [glClearDepth](glClearDepth), and [_glClearStencil](_glClearStencil).
* Multiple color buffers can be cleared simultaneously by selecting more than one buffer at a time using [_glDrawBuffer](_glDrawBuffer).
* The pixel ownership test, the scissor test, dithering, and the buffer writemasks affect the operation of [_glClear](_glClear). The scissor box bounds the cleared region. Alpha function, blend function, logical operation, stenciling, texture mapping, and depth-buffering are ignored by [_glClear](_glClear).
* [_glClear](_glClear) takes a single argument that is the bitwise OR of several values indicating which buffer is to be cleared. The values are as follows:
> :: [_GL_COLOR_BUFFER_BIT](_GL_COLOR_BUFFER_BIT): Indicates the buffers currently enabled for color writing.
> :: [_GL_DEPTH_BUFFER_BIT](_GL_DEPTH_BUFFER_BIT): Indicates the depth buffer.
> :: [_GL_STENCIL_BUFFER_BIT](_GL_STENCIL_BUFFER_BIT): Indicates the stencil buffer.
* The value to which each buffer is cleared depends on the setting of the clear value for that buffer.
## Notes
If a buffer is not present, then a **_glClear** directed at that buffer has no effect.
## Error(s)
[_GL_INVALID_VALUE](_GL_INVALID_VALUE) is generated if any bit other than the three defined bits is set in mask.
## Use With
[_glGet](_glGet) with argument [_GL_DEPTH_CLEAR_VALUE](_GL_DEPTH_CLEAR_VALUE)
[_glGet](_glGet) with argument [_GL_COLOR_CLEAR_VALUE](_GL_COLOR_CLEAR_VALUE)
[_glGet](_glGet) with argument [_GL_STENCIL_CLEAR_VALUE](_GL_STENCIL_CLEAR_VALUE)
## See Also
* [_GL](_GL)
* [_glClearBuffer](_glClearBuffer), [_glClearColor](_glClearColor), [_glClearDepth](_glClearDepth), [_glClearStencil](_glClearStencil)
* [_glColorMask](_glColorMask), [_glDepthMask](_glDepthMask), [_glStencilMask](_glStencilMask)
* [_glDrawBuffer](_glDrawBuffer), [_glDrawBuffers](_glDrawBuffers)
* [_glScissor](_glScissor)

View file

@ -1,40 +0,0 @@
**_glClearColor:** specify clear values for the color buffers
## Syntax
> : SUB **_glClearColor** (BYVAL red AS SINGLE, BYVAL green AS SINGLE, BYVAL blue AS SINGLE, BYVAL alpha AS SINGLE)
> : void **_glClearColor**(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
; red, green, blue, alpha
> Specify the red, green, blue, and alpha values used when the color buffers are cleared. The initial values are all 0.
## Description
**_glClearColor** specifies the red, green, blue, and alpha values used by [_glClear](_glClear) to clear the color buffers.
## Notes
The type of the red, green, blue, and alpha parameters was changed from GLclampf to GLfloat. This change is transparent to user code.
## Use With
[_glGet](_glGet) with argument [_GL_COLOR_CLEAR_VALUE](_GL_COLOR_CLEAR_VALUE)
## See Also
[_GL](_GL)
[_glClear](_glClear)

View file

@ -1,40 +0,0 @@
**_glClearDepth:** specify the clear value for the depth buffer
## Syntax
> : SUB _glClearDepth (BYVAL depth AS DOUBLE)
> : void **_glClearDepth**(GLdouble depth);
> : void **_glClearDepthf**(GLfloat depth);
; depth
> Specifies the depth value used when the depth buffer is cleared. The initial value is 1.
## Description
**_glClearDepth** specifies the depth value used by [_glClear](_glClear) to clear the depth buffer. Values specified by **_glClearDepth** are clamped to the range [0, 1].
## Notes
The type of the depth parameter was changed from GLclampf to GLfloat for **_glClearDepthf** and from GLclampd to GLdouble for **_glClearDepth**. This change is transparent to user code.
## Use With
[_glGet](_glGet) with argument [_GL_DEPTH_CLEAR_VALUE](_GL_DEPTH_CLEAR_VALUE)
## See Also
[_GL](_GL)
[_glClear](_glClear)

View file

@ -1,37 +0,0 @@
**_glClearStencil:** specify the clear value for the stencil buffer
## Syntax
> : SUB _glClearStencil (BYVAL s AS LONG)
> : void **_glClearStencil**(GLint s);
; s
> Specifies the index used when the stencil buffer is cleared. The initial value is 0.
## Description
**_glClearStencil** specifies the index used by [_glClear](_glClear) to clear the stencil buffer. s is masked with 2<sup>m</sup> - 1, where m is the number of bits in the stencil buffer.
## Use With
[_glGet](_glGet) with argument [_GL_STENCIL_CLEAR_VALUE](_GL_STENCIL_CLEAR_VALUE)
[_glGet](_glGet) with argument [_GL_STENCIL_BITS](_GL_STENCIL_BITS)
## See Also
[_GL](_GL)
[_glClear](_glClear)

View file

@ -1,36 +0,0 @@
**_glFlush:** force execution of GL commands in finite time
## Syntax
SUB _glFlush
void **_glFlush**(void);
## Description
Different GL implementations buffer commands in several different locations, including network buffers and the graphics accelerator itself. **_glFlush** empties all of these buffers, causing all issued commands to be executed as quickly as they are accepted by the actual rendering engine. Though this execution may not be completed in any particular time period, it does complete in finite time.
Because any GL program might be executed over a network, or on an accelerator that buffers commands, all programs should call **_glFlush** whenever they count on having all of their previously issued commands completed. For example, call **_glFlush** before waiting for user input that depends on the generated image.
## Notes
**_glFlush** can return at any time. It does not wait until the execution of all previously issued GL commands is complete.
## See Also
[_GL](_GL)
[_glFinish](_glFinish)
Copyright 1991-2006 Silicon Graphics, Inc. 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/].

View file

@ -1,149 +0,0 @@
**_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 [_glDisable](_glDisable) enable and disable various capabilities. Use [_glIsEnabled](_glIsEnabled) or [_glGet](_glGet) to determine the current setting of any capability. The initial value for each capability with the exception of [_GL_DITHER](_GL_DITHER) and [_GL_MULTISAMPLE](_GL_MULTISAMPLE) is [_GL_FALSE](_GL_FALSE). The initial value for [_GL_DITHER](_GL_DITHER) and [_GL_MULTISAMPLE](_GL_MULTISAMPLE) is [_GL_TRUE](_GL_TRUE).
Both **_glEnable** and [_glDisable](_glDisable) take a single argument, cap, which can assume one of the following values:
; [_GL_BLEND](_GL_BLEND)
> If enabled, blend the computed fragment color values with the values in the color buffers. See [GLAPI/glBlendFunc](GLAPI/glBlendFunc). Sets the blend enable/disable flag for all color buffers.
; [_GL_CLIP_DISTANCE](_GL_CLIP_DISTANCE)*i*
> If enabled, clip geometry against user-defined half space *i*.
; [_GL_COLOR_LOGIC_OP](_GL_COLOR_LOGIC_OP)
> If enabled, apply the currently selected logical operation to the computed fragment color and color buffer values. See [GLAPI/glLogicOp](GLAPI/glLogicOp).
; [_GL_CULL_FACE](_GL_CULL_FACE)
> If enabled, cull polygons based on their winding in window coordinates. See [GLAPI/glCullFace](GLAPI/glCullFace).
; [_GL_DEBUG_OUTPUT](_GL_DEBUG_OUTPUT)
> 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 [_GL_DEBUG_OUTPUT](_GL_DEBUG_OUTPUT) is enabled.
; [_GL_DEBUG_OUTPUT_SYNCHRONOUS](_GL_DEBUG_OUTPUT_SYNCHRONOUS)
> 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 [_glDebugMessageCallback](_glDebugMessageCallback).
; [_GL_DEPTH_CLAMP](_GL_DEPTH_CLAMP)
> If enabled, the -w<sub>c</sub> <= z<sub>c</sub> <= w<sub>c</sub> plane equation is ignored by view volume clipping (effectively, there is no near or far plane clipping). See [GLAPI/glDepthRange](GLAPI/glDepthRange).
; [_GL_DEPTH_TEST](_GL_DEPTH_TEST)
> 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 [GLAPI/glDepthFunc](GLAPI/glDepthFunc) and [GLAPI/glDepthRange](GLAPI/glDepthRange).
; [_GL_DITHER](_GL_DITHER)
> If enabled, dither color components or indices before they are written to the color buffer.
; [_GL_FRAMEBUFFER_SRGB](_GL_FRAMEBUFFER_SRGB)
> If enabled and the value of [_GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING](_GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING) for the framebuffer attachment corresponding to the destination buffer is [_GL_SRGB](_GL_SRGB), 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.
; [_GL_LINE_SMOOTH](_GL_LINE_SMOOTH)
> If enabled, draw lines with correct filtering. Otherwise, draw aliased lines. See [GLAPI/glLineWidth](GLAPI/glLineWidth).
; [_GL_MULTISAMPLE](_GL_MULTISAMPLE)
> If enabled, use multiple fragment samples in computing the final color of a pixel. See [GLAPI/glSampleCoverage](GLAPI/glSampleCoverage).
; [_GL_POLYGON_OFFSET_FILL](_GL_POLYGON_OFFSET_FILL)
> If enabled, and if the polygon is rendered in [_GL_FILL](_GL_FILL) mode, an offset is added to depth values of a polygon's fragments before the depth comparison is performed. See [GLAPI/glPolygonOffset](GLAPI/glPolygonOffset).
; [_GL_POLYGON_OFFSET_LINE](_GL_POLYGON_OFFSET_LINE)
> If enabled, and if the polygon is rendered in [_GL_LINE](_GL_LINE) mode, an offset is added to depth values of a polygon's fragments before the depth comparison is performed. See [GLAPI/glPolygonOffset](GLAPI/glPolygonOffset).
; [_GL_POLYGON_OFFSET_POINT](_GL_POLYGON_OFFSET_POINT)
> 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 [_GL_POINT](_GL_POINT) mode. See [GLAPI/glPolygonOffset](GLAPI/glPolygonOffset).
; [_GL_POLYGON_SMOOTH](_GL_POLYGON_SMOOTH)
> 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.
; [_GL_PRIMITIVE_RESTART](_GL_PRIMITIVE_RESTART)
> 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 [_glPrimitiveRestartIndex](_glPrimitiveRestartIndex).
; [_GL_PRIMITIVE_RESTART_FIXED_INDEX](_GL_PRIMITIVE_RESTART_FIXED_INDEX)
> 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 2^n - 1 where *n* is equal to 8 for [_GL_UNSIGNED_BYTE](_GL_UNSIGNED_BYTE), 16 for [_GL_UNSIGNED_SHORT](_GL_UNSIGNED_SHORT) and 32 for [_GL_UNSIGNED_INT](_GL_UNSIGNED_INT).
; [_GL_RASTERIZER_DISCARD](_GL_RASTERIZER_DISCARD)
> If enabled, all primitives are discarded before rasterization, but *after* any optional transform feedback. Also causes [_glClear](_glClear) and [_glClearBuffer](_glClearBuffer) commands to be ignored.
; [_GL_SAMPLE_ALPHA_TO_COVERAGE](_GL_SAMPLE_ALPHA_TO_COVERAGE)
> 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.
; [_GL_SAMPLE_ALPHA_TO_ONE](_GL_SAMPLE_ALPHA_TO_ONE)
> If enabled, each sample alpha value is replaced by the maximum representable alpha value.
; [_GL_SAMPLE_COVERAGE](_GL_SAMPLE_COVERAGE)
> If enabled, the fragment's coverage is ANDed with the temporary coverage value. If [_GL_SAMPLE_COVERAGE_INVERT](_GL_SAMPLE_COVERAGE_INVERT) is set to [_GL_TRUE](_GL_TRUE), invert the coverage value. See [GLAPI/glSampleCoverage](GLAPI/glSampleCoverage).
; [_GL_SAMPLE_SHADING](_GL_SAMPLE_SHADING)
> 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 [_GL_MIN_SAMPLE_SHADING_VALUE](_GL_MIN_SAMPLE_SHADING_VALUE). See [GLAPI/glMinSampleShading](GLAPI/glMinSampleShading).
; [_GL_SAMPLE_MASK](_GL_SAMPLE_MASK)
> If enabled, the sample coverage mask generated for a fragment during rasterization will be ANDed with the value of [_GL_SAMPLE_MASK_VALUE](_GL_SAMPLE_MASK_VALUE) before shading occurs. See [GLAPI/glSampleMaski](GLAPI/glSampleMaski).
; [_GL_SCISSOR_TEST](_GL_SCISSOR_TEST)
> If enabled, discard fragments that are outside the scissor rectangle. See [GLAPI/glScissor](GLAPI/glScissor).
; [_GL_STENCIL_TEST](_GL_STENCIL_TEST)
> If enabled, do stencil testing and update the stencil buffer. See [GLAPI/glStencilFunc](GLAPI/glStencilFunc) and [GLAPI/glStencilOp](GLAPI/glStencilOp).
; [_GL_TEXTURE_CUBE_MAP_SEAMLESS](_GL_TEXTURE_CUBE_MAP_SEAMLESS)
> 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.
; [_GL_PROGRAM_POINT_SIZE](_GL_PROGRAM_POINT_SIZE)
> If enabled and a vertex or geometry shader is active, then the derived point size is taken from the (potentially clipped) shader builtin gl_PointSize 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:
; [_GL_BLEND](_GL_BLEND)
> If enabled, blend the computed fragment color values with the values in the specified color buffer. index must be less than [_GL_MAX_DRAW_BUFFERS](_GL_MAX_DRAW_BUFFERS) or [_GL_INVALID_VALUE](_GL_INVALID_VALUE) will result. See [GLAPI/glBlendFunc](GLAPI/glBlendFunc).
## Error(s)
[_GL_INVALID_ENUM](_GL_INVALID_ENUM) is generated if cap is not one of the values listed previously.
[_GL_INVALID_VALUE](_GL_INVALID_VALUE) is generated by **_glEnablei** and **_glDisablei** if index is greater than or equal to the number of indexed capabilities for cap.
## Notes
[_GL_PRIMITIVE_RESTART](_GL_PRIMITIVE_RESTART) is available only if the GL version is 3.1 or greater.
[_GL_TEXTURE_CUBE_MAP_SEAMLESS](_GL_TEXTURE_CUBE_MAP_SEAMLESS) is available only if the GL version is 3.2 or greater.
[_GL_PRIMITIVE_RESTART_FIXED_INDEX](_GL_PRIMITIVE_RESTART_FIXED_INDEX) is available only if the GL version is 4.3 or greater.
[_GL_DEBUG_OUTPUT](_GL_DEBUG_OUTPUT) and [_GL_DEBUG_OUTPUT_SYNCHRONOUS](_GL_DEBUG_OUTPUT_SYNCHRONOUS) 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.
## Use With
[_glIsEnabled](_glIsEnabled)
[_glGet](_glGet)
## See Also
[_GL](_GL)
[_glActiveTexture](_glActiveTexture), [_glBlendFunc](_glBlendFunc), [_glCullFace](_glCullFace), [_glDepthFunc](_glDepthFunc), [_glDepthRange](_glDepthRange), [_glGet](_glGet), [_glIsEnabled](_glIsEnabled), [_glLineWidth](_glLineWidth), [_glLogicOp](_glLogicOp), [_glPointSize](_glPointSize), [_glPolygonMode](_glPolygonMode), [_glPolygonOffset](_glPolygonOffset), [_glSampleCoverage](_glSampleCoverage), [_glScissor](_glScissor), [_glStencilFunc](_glStencilFunc), [_glStencilOp](_glStencilOp), [_glTexImage1D](_glTexImage1D), [_glTexImage2D](_glTexImage2D), [_glTexImage3D](_glTexImage3D)
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/].

View file

@ -1,111 +0,0 @@
**_glLogicOp:** specify a logical pixel operation for rendering
## Syntax
SUB _glLogicOp (BYVAL opcode AS _UNSIGNED LONG)
void **_glLogicOp**(GLenum opcode);
; opcode
> Specifies a symbolic constant that selects a logical operation. The following symbols are accepted: [_GL_CLEAR](_GL_CLEAR), [_GL_SET](_GL_SET), [_GL_COPY](_GL_COPY), [_GL_COPY_INVERTED](_GL_COPY_INVERTED), [_GL_NOOP](_GL_NOOP), [_GL_INVERT](_GL_INVERT), [_GL_AND](_GL_AND), [_GL_NAND](_GL_NAND), [_GL_OR](_GL_OR), [_GL_NOR](_GL_NOR), [_GL_XOR](_GL_XOR), [_GL_EQUIV](_GL_EQUIV), [_GL_AND_REVERSE](_GL_AND_REVERSE), [_GL_AND_INVERTED](_GL_AND_INVERTED), [_GL_OR_REVERSE](_GL_OR_REVERSE), and [_GL_OR_INVERTED](_GL_OR_INVERTED). The initial value is [_GL_COPY](_GL_COPY).
## Description
**_glLogicOp** specifies a logical operation that, when enabled, is applied between the incoming RGBA color and the RGBA color at the corresponding location in the frame buffer. To enable or disable the logical operation, call [_glEnable](_glEnable) and [_glDisable](_glDisable) using the symbolic constant [_GL_COLOR_LOGIC_OP](_GL_COLOR_LOGIC_OP). The initial value is disabled.
{|
|+
! **Opcode**
! **Resulting Operation**
|+
| [_GL_CLEAR](_GL_CLEAR)
| 0
|+
| [_GL_SET](_GL_SET)
| 1
|+
| [_GL_COPY](_GL_COPY)
| s
|+
| [_GL_COPY_INVERTED](_GL_COPY_INVERTED)
| ~s
|+
| [_GL_NOOP](_GL_NOOP)
| d
|+
| [_GL_INVERT](_GL_INVERT)
| ~d
|+
| [_GL_AND](_GL_AND)
| s & d
|+
| [_GL_NAND](_GL_NAND)
| ~(s & d)
|+
| [_GL_OR](_GL_OR)
| s | d
|+
| [_GL_NOR](_GL_NOR)
| ~(s | d)
|+
| [_GL_XOR](_GL_XOR)
| s ^ d
|+
| [_GL_EQUIV](_GL_EQUIV)
| ~(s ^ d)
|+
| [_GL_AND_REVERSE](_GL_AND_REVERSE)
| s & ~d
|+
| [_GL_AND_INVERTED](_GL_AND_INVERTED)
| ~s & d
|+
| [_GL_OR_REVERSE](_GL_OR_REVERSE)
| s | ~d
|+
| [_GL_OR_INVERTED](_GL_OR_INVERTED)
| ~s | d
|}
opcode is a symbolic constant chosen from the list above. In the explanation of the logical operations, *s* represents the incoming color and *d* represents the color in the frame buffer. Standard C-language operators are used. As these bitwise operators suggest, the logical operation is applied independently to each bit pair of the source and destination colors.
## Notes
When more than one RGBA color buffer is enabled for drawing, logical operations are performed separately for each enabled buffer, using for the destination value the contents of that buffer (see [_glDrawBuffer](_glDrawBuffer)).
Logic operations have no effect on floating point draw buffers. However, if [_GL_COLOR_LOGIC_OP](_GL_COLOR_LOGIC_OP) is enabled, blending is still disabled in this case.
## Error(s)
[_GL_INVALID_ENUM](_GL_INVALID_ENUM) is generated if opcode is not an accepted value.
## Use With
[_glGet](_glGet) with argument [_GL_LOGIC_OP_MODE](_GL_LOGIC_OP_MODE).
[_glIsEnabled](_glIsEnabled) with argument [_GL_COLOR_LOGIC_OP](_GL_COLOR_LOGIC_OP).
## See Also
[_GL](_GL)
[_glEnable](_glEnable), [_glDrawBuffer](_glDrawBuffer), [_glDrawBuffers](_glDrawBuffers), [_glStencilOp](_glStencilOp)
Copyright 1991-2006 Silicon Graphics, Inc. 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/].

View file

@ -1,61 +0,0 @@
**_glPointSize:** specify the diameter of rasterized points
## Syntax
SUB _glPointSize (BYVAL size AS SINGLE)
void **_glPointSize**(GLfloat size);
; size
> Specifies the diameter of rasterized points. The initial value is 1.
## Description
**_glPointSize** specifies the rasterized diameter of points. If point size mode is disabled (see [_glEnable](_glEnable) with parameter [_GL_PROGRAM_POINT_SIZE](_GL_PROGRAM_POINT_SIZE)), this value will be used to rasterize points. Otherwise, the value written to the shading language built-in variable gl_PointSize will be used.
## Notes
The point size specified by **_glPointSize** is always returned when [_GL_POINT_SIZE](_GL_POINT_SIZE) is queried. Clamping and rounding for points have no effect on the specified value.
## Error(s)
[_GL_INVALID_VALUE](_GL_INVALID_VALUE) is generated if size is less than or equal to 0.
## Use With
[_glGet](_glGet) with argument [_GL_POINT_SIZE_RANGE](_GL_POINT_SIZE_RANGE)
[_glGet](_glGet) with argument [_GL_POINT_SIZE_GRANULARITY](_GL_POINT_SIZE_GRANULARITY)
[_glGet](_glGet) with argument [_GL_POINT_SIZE](_GL_POINT_SIZE)
[_glGet](_glGet) with argument [_GL_POINT_SIZE_MIN](_GL_POINT_SIZE_MIN)
[_glGet](_glGet) with argument [_GL_POINT_SIZE_MAX](_GL_POINT_SIZE_MAX)
[_glGet](_glGet) with argument [_GL_POINT_FADE_THRESHOLD_SIZE](_GL_POINT_FADE_THRESHOLD_SIZE)
[_glIsEnabled](_glIsEnabled) with argument [_GL_PROGRAM_POINT_SIZE](_GL_PROGRAM_POINT_SIZE)
## See Also
[_GL](_GL)
[_glEnable](_glEnable), [_glPointParameter](_glPointParameter)
Copyright 1991-2006 Silicon Graphics, Inc. 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/].

View file

@ -1,46 +0,0 @@
**_glColorMask, glColorMaski:** enable and disable writing of frame buffer color components
## Syntax
> : SUB _glColorMask (BYVAL red AS _UNSIGNED _BYTE, BYVAL green AS _UNSIGNED _BYTE, BYVAL blue AS _UNSIGNED _BYTE, BYVAL alpha AS _UNSIGNED _BYTE)
> : void **_glColorMask**(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
> : void **_glColorMaski**(GLuint buf, GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
; buf
> For **_glColorMaski**, specifies the index of the draw buffer whose color mask to set.
; red, green, blue, alpha
> Specify whether red, green, blue, and alpha are to be written into the frame buffer. The initial values are all [_GL_TRUE](_GL_TRUE), indicating that the color components are written.
## Description
**_glColorMask** and **_glColorMaski** specify whether the individual color components in the frame buffer can or cannot be written. **_glColorMaski** sets the mask for a specific draw buffer, whereas **_glColorMask** sets the mask for all draw buffers. If red is [_GL_FALSE](_GL_FALSE), for example, no change is made to the red component of any pixel in any of the color buffers, regardless of the drawing operation attempted.
Changes to individual bits of components cannot be controlled. Rather, changes are either enabled or disabled for entire color components.
## Error(s)
[_GL_INVALID_VALUE](_GL_INVALID_VALUE) is generated if buf is greater than [_GL_MAX_DRAW_BUFFERS](_GL_MAX_DRAW_BUFFERS) minus 1.
## Use With
[_glGet](_glGet) with argument [_GL_COLOR_WRITEMASK](_GL_COLOR_WRITEMASK)
## See Also
[_GL](_GL)
[_glClear](_glClear), [_glClearBuffer](_glClearBuffer), [_glDepthMask](_glDepthMask), [_glStencilMask](_glStencilMask)

View file

@ -1,64 +0,0 @@
**_glPolygonMode:** select a polygon rasterization mode
## Syntax
SUB _glPolygonMode (BYVAL face AS _UNSIGNED LONG, BYVAL mode AS _UNSIGNED LONG)
void **_glPolygonMode**(GLenum face, GLenum mode);
; face
> Specifies the polygons that mode applies to. Must be [_GL_FRONT_AND_BACK](_GL_FRONT_AND_BACK) for front- and back-facing polygons.
; mode
> Specifies how polygons will be rasterized. Accepted values are [_GL_POINT](_GL_POINT), [_GL_LINE](_GL_LINE), and [_GL_FILL](_GL_FILL). The initial value is [_GL_FILL](_GL_FILL) for both front- and back-facing polygons.
## Description
**_glPolygonMode** controls the interpretation of polygons for rasterization. face describes which polygons mode applies to: both front and back-facing polygons ([_GL_FRONT_AND_BACK](_GL_FRONT_AND_BACK)). The polygon mode affects only the final rasterization of polygons. In particular, a polygon's vertices are lit and the polygon is clipped and possibly culled before these modes are applied.
Three modes are defined and can be specified in mode:
; [_GL_POINT](_GL_POINT)
> Polygon vertices that are marked as the start of a boundary edge are drawn as points. Point attributes such as [_GL_POINT_SIZE](_GL_POINT_SIZE) and [_GL_POINT_SMOOTH](_GL_POINT_SMOOTH) control the rasterization of the points. Polygon rasterization attributes other than [_GL_POLYGON_MODE](_GL_POLYGON_MODE) have no effect.
; [_GL_LINE](_GL_LINE)
> Boundary edges of the polygon are drawn as line segments. Line attributes such as [_GL_LINE_WIDTH](_GL_LINE_WIDTH) and [_GL_LINE_SMOOTH](_GL_LINE_SMOOTH) control the rasterization of the lines. Polygon rasterization attributes other than [_GL_POLYGON_MODE](_GL_POLYGON_MODE) have no effect.
; [_GL_FILL](_GL_FILL)
> The interior of the polygon is filled. Polygon attributes such as [_GL_POLYGON_SMOOTH](_GL_POLYGON_SMOOTH) control the rasterization of the polygon.
## Examples
To draw a surface with outlined polygons, call `glPolygonMode(, )`
## Notes
Vertices are marked as boundary or nonboundary with an edge flag. Edge flags are generated internally by the GL when it decomposes triangle stips and fans.
## Error(s)
[_GL_INVALID_ENUM](_GL_INVALID_ENUM) is generated if either face or mode is not an accepted value.
## Use With
[_glGet](_glGet) with argument [_GL_POLYGON_MODE](_GL_POLYGON_MODE)
## See Also
[_GL](_GL)
[_glLineWidth](_glLineWidth), [_glPointSize](_glPointSize)
Copyright 1991-2006 Silicon Graphics, Inc. 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/].

View file

@ -1,43 +0,0 @@
**_glPolygonOffset:** set the scale and units used to calculate depth values
## Syntax
SUB _glPolygonOffset (BYVAL factor AS SINGLE, BYVAL units AS SINGLE)
void **_glPolygonOffset**(GLfloat factor, GLfloat units);
; factor
> Specifies a scale factor that is used to create a variable depth offset for each polygon. The initial value is 0.
; units
> Is multiplied by an implementation-specific value to create a constant depth offset. The initial value is 0.
## Description
When [_GL_POLYGON_OFFSET_FILL](_GL_POLYGON_OFFSET_FILL), [_GL_POLYGON_OFFSET_LINE](_GL_POLYGON_OFFSET_LINE), or [_GL_POLYGON_OFFSET_POINT](_GL_POLYGON_OFFSET_POINT) is enabled, each fragment's *depth* value will be offset after it is interpolated from the *depth* values of the appropriate vertices. The value of the offset is *factor* * *DZ* + *r* * *units*, where *DZ* is a measurement of the change in depth relative to the screen area of the polygon, and *r* is the smallest value that is guaranteed to produce a resolvable offset for a given implementation. The offset is added before the depth test is performed and before the value is written into the depth buffer.
**_glPolygonOffset** is useful for rendering hidden-line images, for applying decals to surfaces, and for rendering solids with highlighted edges.
## Use With
[_glIsEnabled](_glIsEnabled) with argument [_GL_POLYGON_OFFSET_FILL](_GL_POLYGON_OFFSET_FILL), [_GL_POLYGON_OFFSET_LINE](_GL_POLYGON_OFFSET_LINE), or [_GL_POLYGON_OFFSET_POINT](_GL_POLYGON_OFFSET_POINT).
[_glGet](_glGet) with argument [_GL_POLYGON_OFFSET_FACTOR](_GL_POLYGON_OFFSET_FACTOR) or [_GL_POLYGON_OFFSET_UNITS](_GL_POLYGON_OFFSET_UNITS).
## See Also
[_GL](_GL)
[_glDepthFunc](_glDepthFunc), [_glEnable](_glEnable)
Copyright 1991-2006 Silicon Graphics, Inc. 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/].

View file

@ -1,84 +0,0 @@
**_glCopyTexImage1D:** copy pixels into a 1D texture image
## Syntax
> SUB _glCopyTexImage1D (BYVAL target AS _UNSIGNED LONG, BYVAL level AS LONG, BYVAL internalFormat AS _UNSIGNED LONG, BYVAL x AS LONG, BYVAL y AS LONG, BYVAL width AS LONG, BYVAL border AS LONG)
> void **_glCopyTexImage1D**(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);
; target
> Specifies the target texture. Must be [_GL_TEXTURE_1D](_GL_TEXTURE_1D).
; level
> Specifies the level-of-detail number. Level 0 is the base image level. Level *n* is the *n*th mipmap reduction image.
; internalformat
> Specifies the internal format of the texture. Must be one of the following symbolic constants: [_GL_COMPRESSED_RED](_GL_COMPRESSED_RED), [_GL_COMPRESSED_RG](_GL_COMPRESSED_RG), [_GL_COMPRESSED_RGB](_GL_COMPRESSED_RGB), [_GL_COMPRESSED_RGBA](_GL_COMPRESSED_RGBA). [_GL_COMPRESSED_SRGB](_GL_COMPRESSED_SRGB), [_GL_COMPRESSED_SRGB_ALPHA](_GL_COMPRESSED_SRGB_ALPHA). [_GL_DEPTH_COMPONENT](_GL_DEPTH_COMPONENT), [_GL_DEPTH_COMPONENT16](_GL_DEPTH_COMPONENT16), [_GL_DEPTH_COMPONENT24](_GL_DEPTH_COMPONENT24), [_GL_DEPTH_COMPONENT32](_GL_DEPTH_COMPONENT32), [_GL_RED](_GL_RED), [_GL_RG](_GL_RG), [_GL_RGB](_GL_RGB), [_GL_R3_G3_B2](_GL_R3_G3_B2), [_GL_RGB4](_GL_RGB4), [_GL_RGB5](_GL_RGB5), [_GL_RGB8](_GL_RGB8), [_GL_RGB10](_GL_RGB10), [_GL_RGB12](_GL_RGB12), [_GL_RGB16](_GL_RGB16), [_GL_RGBA](_GL_RGBA), [_GL_RGBA2](_GL_RGBA2), [_GL_RGBA4](_GL_RGBA4), [_GL_RGB5_A1](_GL_RGB5_A1), [_GL_RGBA8](_GL_RGBA8), [_GL_RGB10_A2](_GL_RGB10_A2), [_GL_RGBA12](_GL_RGBA12), [_GL_RGBA16](_GL_RGBA16), [_GL_SRGB](_GL_SRGB), [_GL_SRGB8](_GL_SRGB8), [_GL_SRGB_ALPHA](_GL_SRGB_ALPHA), or [_GL_SRGB8_ALPHA8](_GL_SRGB8_ALPHA8).
; x, y
> Specify the window coordinates of the left corner of the row of pixels to be copied.
; width
> Specifies the width of the texture image. The height of the texture image is 1.
; border
> This value must be 0.
## Description
**_glCopyTexImage1D** defines a one-dimensional texture image with pixels from the current [_GL_READ_BUFFER](_GL_READ_BUFFER).
The screen-aligned pixel row with left corner at (*x*, *y*) and with a length of width defines the texture array at the mipmap level specified by level. internalformat specifies the internal format of the texture array.
The pixels in the row are processed exactly as if [_glReadPixels](_glReadPixels) had been called, but the process stops just before final conversion. At this point all pixel component values are clamped to the range [0, 1] and then converted to the texture's internal format for storage in the texel array.
Pixel ordering is such that lower *x* screen coordinates correspond to lower texture coordinates.
If any of the pixels within the specified row of the current [_GL_READ_BUFFER](_GL_READ_BUFFER) are outside the window associated with the current rendering context, then the values obtained for those pixels are undefined.
**_glCopyTexImage1D** defines a one-dimensional texture image with pixels from the current [_GL_READ_BUFFER](_GL_READ_BUFFER).
When internalformat is one of the sRGB types, the GL does not automatically convert the source pixels to the sRGB color space. In this case, the **_glPixelMap** function can be used to accomplish the conversion.
## Notes
1, 2, 3, and 4 are not accepted values for internalformat.
An image with 0 width indicates a NULL texture.
## Error(s)
[_GL_INVALID_ENUM](_GL_INVALID_ENUM) is generated if target is not one of the allowable values.
[_GL_INVALID_VALUE](_GL_INVALID_VALUE) is generated if level is less than 0.
[_GL_INVALID_VALUE](_GL_INVALID_VALUE) may be generated if level is greater than log<sub>2</sub>(max), where max is the returned value of [_GL_MAX_TEXTURE_SIZE](_GL_MAX_TEXTURE_SIZE).
[_GL_INVALID_VALUE](_GL_INVALID_VALUE) is generated if internalformat is not an allowable value.
[_GL_INVALID_VALUE](_GL_INVALID_VALUE) is generated if width is less than 0 or greater than [_GL_MAX_TEXTURE_SIZE](_GL_MAX_TEXTURE_SIZE).
[_GL_INVALID_VALUE](_GL_INVALID_VALUE) is generated if border is not 0.
[_GL_INVALID_OPERATION](_GL_INVALID_OPERATION) is generated if internalformat is [_GL_DEPTH_COMPONENT](_GL_DEPTH_COMPONENT), [_GL_DEPTH_COMPONENT16](_GL_DEPTH_COMPONENT16), [_GL_DEPTH_COMPONENT24](_GL_DEPTH_COMPONENT24), or [_GL_DEPTH_COMPONENT32](_GL_DEPTH_COMPONENT32) and there is no depth buffer.
## Use With
[_glGetTexImage](_glGetTexImage)
## See Also
[_GL](_GL)
[_glActiveTexture](_glActiveTexture), [_glBindTexture](_glBindTexture), [_glBindFramebuffer](_glBindFramebuffer), [_glCopyTexImage2D](_glCopyTexImage2D), [_glCopyImageSubData](_glCopyImageSubData), [_glCopyTexSubImage1D](_glCopyTexSubImage1D), [_glCopyTexSubImage2D](_glCopyTexSubImage2D), [_glReadBuffer](_glReadBuffer)

View file

@ -1,83 +0,0 @@
**_glCopyTexImage2D:** copy pixels into a 2D texture image
## Syntax
> SUB _glCopyTexImage2D (BYVAL target AS _UNSIGNED LONG, BYVAL level AS LONG, BYVAL internalFormat AS _UNSIGNED LONG, BYVAL x AS LONG, BYVAL y AS LONG, BYVAL width AS LONG, BYVAL height AS LONG, BYVAL border AS LONG)
> void **_glCopyTexImage2D**(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
; target
> Specifies the target texture. Must be [_GL_TEXTURE_2D](_GL_TEXTURE_2D), [_GL_TEXTURE_CUBE_MAP_POSITIVE_X](_GL_TEXTURE_CUBE_MAP_POSITIVE_X), [_GL_TEXTURE_CUBE_MAP_NEGATIVE_X](_GL_TEXTURE_CUBE_MAP_NEGATIVE_X), [_GL_TEXTURE_CUBE_MAP_POSITIVE_Y](_GL_TEXTURE_CUBE_MAP_POSITIVE_Y), [_GL_TEXTURE_CUBE_MAP_NEGATIVE_Y](_GL_TEXTURE_CUBE_MAP_NEGATIVE_Y), [_GL_TEXTURE_CUBE_MAP_POSITIVE_Z](_GL_TEXTURE_CUBE_MAP_POSITIVE_Z), or [_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z](_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z).
; level
> Specifies the level-of-detail number. Level 0 is the base image level. Level *n* is the *n*th mipmap reduction image.
; internalformat
> Specifies the internal format of the texture. Must be one of the following symbolic constants: [_GL_COMPRESSED_RED](_GL_COMPRESSED_RED), [_GL_COMPRESSED_RG](_GL_COMPRESSED_RG), [_GL_COMPRESSED_RGB](_GL_COMPRESSED_RGB), [_GL_COMPRESSED_RGBA](_GL_COMPRESSED_RGBA). [_GL_COMPRESSED_SRGB](_GL_COMPRESSED_SRGB), [_GL_COMPRESSED_SRGB_ALPHA](_GL_COMPRESSED_SRGB_ALPHA). [_GL_DEPTH_COMPONENT](_GL_DEPTH_COMPONENT), [_GL_DEPTH_COMPONENT16](_GL_DEPTH_COMPONENT16), [_GL_DEPTH_COMPONENT24](_GL_DEPTH_COMPONENT24), [_GL_DEPTH_COMPONENT32](_GL_DEPTH_COMPONENT32), [_GL_RED](_GL_RED), [_GL_RG](_GL_RG), [_GL_RGB](_GL_RGB), [_GL_R3_G3_B2](_GL_R3_G3_B2), [_GL_RGB4](_GL_RGB4), [_GL_RGB5](_GL_RGB5), [_GL_RGB8](_GL_RGB8), [_GL_RGB10](_GL_RGB10), [_GL_RGB12](_GL_RGB12), [_GL_RGB16](_GL_RGB16), [_GL_RGBA](_GL_RGBA), [_GL_RGBA2](_GL_RGBA2), [_GL_RGBA4](_GL_RGBA4), [_GL_RGB5_A1](_GL_RGB5_A1), [_GL_RGBA8](_GL_RGBA8), [_GL_RGB10_A2](_GL_RGB10_A2), [_GL_RGBA12](_GL_RGBA12), [_GL_RGBA16](_GL_RGBA16), [_GL_SRGB](_GL_SRGB), [_GL_SRGB8](_GL_SRGB8), [_GL_SRGB_ALPHA](_GL_SRGB_ALPHA), or [_GL_SRGB8_ALPHA8](_GL_SRGB8_ALPHA8).
; x, y
> Specify the window coordinates of the lower left corner of the rectangular region of pixels to be copied.
; width
> Specifies the width of the texture image.
; height
> Specifies the height of the texture image.
; border
> This value must be 0.
## Description
**_glCopyTexImage2D** defines a two-dimensional texture image, or cube-map texture image with pixels from the current [_GL_READ_BUFFER](_GL_READ_BUFFER).
The screen-aligned pixel rectangle with lower left corner at (x, y) and with a width of width and a height of height defines the texture array at the mipmap level specified by level. internalformat specifies the internal format of the texture array.
The pixels in the rectangle are processed exactly as if [_glReadPixels](_glReadPixels) had been called, but the process stops just before final conversion. At this point all pixel component values are clamped to the range [0, 1] and then converted to the texture's internal format for storage in the texel array.
Pixel ordering is such that lower x and y screen coordinates correspond to lower s and t texture coordinates.
If any of the pixels within the specified rectangle of the current [_GL_READ_BUFFER](_GL_READ_BUFFER) are outside the window associated with the current rendering context, then the values obtained for those pixels are undefined.
When internalformat is one of the sRGB types, the GL does not automatically convert the source pixels to the sRGB color space. In this case, the **_glPixelMap** function can be used to accomplish the conversion.
## Notes
1, 2, 3, and 4 are not accepted values for internalformat.
An image with height or width of 0 indicates a NULL texture.
## Error(s)
[_GL_INVALID_ENUM](_GL_INVALID_ENUM) is generated if target is not [_GL_TEXTURE_2D](_GL_TEXTURE_2D), [_GL_TEXTURE_CUBE_MAP_POSITIVE_X](_GL_TEXTURE_CUBE_MAP_POSITIVE_X), [_GL_TEXTURE_CUBE_MAP_NEGATIVE_X](_GL_TEXTURE_CUBE_MAP_NEGATIVE_X), [_GL_TEXTURE_CUBE_MAP_POSITIVE_Y](_GL_TEXTURE_CUBE_MAP_POSITIVE_Y), [_GL_TEXTURE_CUBE_MAP_NEGATIVE_Y](_GL_TEXTURE_CUBE_MAP_NEGATIVE_Y), [_GL_TEXTURE_CUBE_MAP_POSITIVE_Z](_GL_TEXTURE_CUBE_MAP_POSITIVE_Z), or [_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z](_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z).
[_GL_INVALID_VALUE](_GL_INVALID_VALUE) is generated if level is less than 0.
[_GL_INVALID_VALUE](_GL_INVALID_VALUE) may be generated if level is greater than log<sub>2</sub>(max}, where max is the returned value of [_GL_MAX_TEXTURE_SIZE](_GL_MAX_TEXTURE_SIZE).
[_GL_INVALID_VALUE](_GL_INVALID_VALUE) is generated if width is less than 0 or greater than [_GL_MAX_TEXTURE_SIZE](_GL_MAX_TEXTURE_SIZE).
[_GL_INVALID_VALUE](_GL_INVALID_VALUE) is generated if border is not 0.
[_GL_INVALID_VALUE](_GL_INVALID_VALUE) is generated if internalformat is not an accepted format.
[_GL_INVALID_OPERATION](_GL_INVALID_OPERATION) is generated if internalformat is [_GL_DEPTH_COMPONENT](_GL_DEPTH_COMPONENT), [_GL_DEPTH_COMPONENT16](_GL_DEPTH_COMPONENT16), [_GL_DEPTH_COMPONENT24](_GL_DEPTH_COMPONENT24), or [_GL_DEPTH_COMPONENT32](_GL_DEPTH_COMPONENT32) and there is no depth buffer.
## Use With
[_glGetTexImage](_glGetTexImage)
## See Also
[_GL](_GL)
[_glActiveTexture](_glActiveTexture), [_glBindTexture](_glBindTexture), [_glBindFramebuffer](_glBindFramebuffer), [_glCopyTexImage1D](_glCopyTexImage1D), [_glCopyImageSubData](_glCopyImageSubData), [_glCopyTexSubImage1D](_glCopyTexSubImage1D), [_glCopyTexSubImage2D](_glCopyTexSubImage2D), [_glReadBuffer](_glReadBuffer)

View file

@ -1,72 +0,0 @@
**_glCopyTexSubImage1D:** copy a one-dimensional texture subimage
## Syntax
> SUB _glCopyTexSubImage1D (BYVAL target AS _UNSIGNED LONG, BYVAL level AS LONG, BYVAL xoffset AS LONG, BYVAL x AS LONG, BYVAL y AS LONG, BYVAL width AS LONG)
> void **_glCopyTexSubImage1D**(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
; target
> Specifies the target texture. Must be [_GL_TEXTURE_1D](_GL_TEXTURE_1D).
; level
> Specifies the level-of-detail number. Level 0 is the base image level. Level *n* is the *n*th mipmap reduction image.
; xoffset
> Specifies the texel offset within the texture array.
; x, y
> Specify the window coordinates of the left corner of the row of pixels to be copied.
; width
> Specifies the width of the texture subimage.
## Description
**_glCopyTexSubImage1D** replaces a portion of a one-dimensional texture image with pixels from the current [_GL_READ_BUFFER](_GL_READ_BUFFER) (rather than from main memory, as is the case for [_glTexSubImage1D](_glTexSubImage1D)).
The screen-aligned pixel row with left corner at (x,\ y), and with length width replaces the portion of the texture array with x indices xoffset through *xoffset + width - 1*, inclusive. The destination in the texture array may not include any texels outside the texture array as it was originally specified.
The pixels in the row are processed exactly as if [_glReadPixels](_glReadPixels) had been called, but the process stops just before final conversion. At this point, all pixel component values are clamped to the range [0, 1] and then converted to the texture's internal format for storage in the texel array.
It is not an error to specify a subtexture with zero width, but such a specification has no effect. If any of the pixels within the specified row of the current [_GL_READ_BUFFER](_GL_READ_BUFFER) are outside the read window associated with the current rendering context, then the values obtained for those pixels are undefined.
No change is made to the *internalformat*, *width*, or *border* parameters of the specified texture array or to texel values outside the specified subregion.
## Notes
The [_glPixelStore](_glPixelStore) mode affects texture images.
## Error(s)
[_GL_INVALID_ENUM](_GL_INVALID_ENUM) is generated if /target is not [_GL_TEXTURE_1D](_GL_TEXTURE_1D).
[_GL_INVALID_OPERATION](_GL_INVALID_OPERATION) is generated if the texture array has not been defined by a previous [_glTexImage1D](_glTexImage1D) or [_glCopyTexImage1D](_glCopyTexImage1D) operation.
[_GL_INVALID_VALUE](_GL_INVALID_VALUE) is generated if level is less than 0.
[_GL_INVALID_VALUE](_GL_INVALID_VALUE) may be generated if *level* is greater than log<sub>2</sub>(max), where *max* is the returned value of [_GL_MAX_TEXTURE_SIZE](_GL_MAX_TEXTURE_SIZE).
[_GL_INVALID_VALUE](_GL_INVALID_VALUE) is generated if xoffset < 0 or xoffset + width > w, where w is the [_GL_TEXTURE_WIDTH](_GL_TEXTURE_WIDTH).
## Use With
[_glGetTexImage](_glGetTexImage)
## See Also
[_GL](_GL)
[_glActiveTexture](_glActiveTexture), [_glBindTexture](_glBindTexture), [_glBindFramebuffer](_glBindFramebuffer), [_glCopyImageSubData](_glCopyImageSubData), [_glCopyTexSubImage2D](_glCopyTexSubImage2D), [_glCopyTexSubImage3D](_glCopyTexSubImage3D), [_glCopyTexImage1D](_glCopyTexImage1D), [_glReadBuffer](_glReadBuffer)

View file

@ -1,80 +0,0 @@
**_glCopyTexSubImage2D:** copy a two-dimensional texture subimage
## Syntax
> SUB _glCopyTexSubImage2D (BYVAL target AS _UNSIGNED LONG, BYVAL level AS LONG, BYVAL xoffset AS LONG, BYVAL yoffset AS LONG, BYVAL x AS LONG, BYVAL y AS LONG, BYVAL width AS LONG, BYVAL height AS LONG)
> void **_glCopyTexSubImage2D**(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
; target
> Specifies the target texture. Must be [_GL_TEXTURE_2D](_GL_TEXTURE_2D), [_GL_TEXTURE_CUBE_MAP_POSITIVE_X](_GL_TEXTURE_CUBE_MAP_POSITIVE_X), [_GL_TEXTURE_CUBE_MAP_NEGATIVE_X](_GL_TEXTURE_CUBE_MAP_NEGATIVE_X), [_GL_TEXTURE_CUBE_MAP_POSITIVE_Y](_GL_TEXTURE_CUBE_MAP_POSITIVE_Y), [_GL_TEXTURE_CUBE_MAP_NEGATIVE_Y](_GL_TEXTURE_CUBE_MAP_NEGATIVE_Y), [_GL_TEXTURE_CUBE_MAP_POSITIVE_Z](_GL_TEXTURE_CUBE_MAP_POSITIVE_Z), [_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z](_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z), or [_GL_TEXTURE_1D_ARRAY](_GL_TEXTURE_1D_ARRAY).
; level
> Specifies the level-of-detail number. Level 0 is the base image level. Level *n* is the *n*th mipmap reduction image.
; xoffset
> Specifies a texel offset in the x direction within the texture array.
; yoffset
> Specifies a texel offset in the y direction within the texture array.
; x, y
> Specify the window coordinates of the lower left corner of the rectangular region of pixels to be copied.
; width
> Specifies the width of the texture subimage.
; height
> Specifies the height of the texture subimage.
## Description
**_glCopyTexSubImage2D** replaces a rectangular portion of a two-dimensional texture image, cube-map texture image or a linear portion of a number of slices of a one-dimensional array texture with pixels from the current [_GL_READ_BUFFER](_GL_READ_BUFFER) (rather than from main memory, as is the case for [_glTexSubImage2D](_glTexSubImage2D)).
The screen-aligned pixel rectangle with lower left corner at (*x*, *y*) and with width width and height height replaces the portion of the texture array with x indices xoffset through *xoffset + width - 1*, inclusive, and y indices yoffset through *yoffset + height - 1*, inclusive, at the mipmap level specified by level.
The pixels in the rectangle are processed exactly as if [_glReadPixels](_glReadPixels) had been called, but the process stops just before final conversion. At this point, all pixel component values are clamped to the range [0, 1] and then converted to the texture's internal format for storage in the texel array.
The destination rectangle in the texture array may not include any texels outside the texture array as it was originally specified. It is not an error to specify a subtexture with zero width or height, but such a specification has no effect.
When target is [_GL_TEXTURE_1D_ARRAY](_GL_TEXTURE_1D_ARRAY) then the y coordinate and height are treated as the start slice and number of slices to modify.
If any of the pixels within the specified rectangle of the current [_GL_READ_BUFFER](_GL_READ_BUFFER) are outside the read window associated with the current rendering context, then the values obtained for those pixels are undefined.
No change is made to the *internalformat*, *width*, *height*, or *border* parameters of the specified texture array or to texel values outside the specified subregion.
## Notes
[_glPixelStore](_glPixelStore) modes affect texture images.
## Error(s)
[_GL_INVALID_ENUM](_GL_INVALID_ENUM) is generated if target is not [_GL_TEXTURE_2D](_GL_TEXTURE_2D), [_GL_TEXTURE_CUBE_MAP_POSITIVE_X](_GL_TEXTURE_CUBE_MAP_POSITIVE_X), [_GL_TEXTURE_CUBE_MAP_NEGATIVE_X](_GL_TEXTURE_CUBE_MAP_NEGATIVE_X), [_GL_TEXTURE_CUBE_MAP_POSITIVE_Y](_GL_TEXTURE_CUBE_MAP_POSITIVE_Y), [_GL_TEXTURE_CUBE_MAP_NEGATIVE_Y](_GL_TEXTURE_CUBE_MAP_NEGATIVE_Y), [_GL_TEXTURE_CUBE_MAP_POSITIVE_Z](_GL_TEXTURE_CUBE_MAP_POSITIVE_Z), [_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z](_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z), or [_GL_TEXTURE_1D_ARRAY](_GL_TEXTURE_1D_ARRAY).
[_GL_INVALID_OPERATION](_GL_INVALID_OPERATION) is generated if the texture array has not been defined by a previous [_glTexImage2D](_glTexImage2D) or [_glCopyTexImage2D](_glCopyTexImage2D) operation.
[_GL_INVALID_VALUE](_GL_INVALID_VALUE) is generated if level is less than 0.
[_GL_INVALID_VALUE](_GL_INVALID_VALUE) may be generated if *level* is greater than log<sub>2</sub>(max), where *max* is the returned value of [_GL_MAX_TEXTURE_SIZE](_GL_MAX_TEXTURE_SIZE).
[_GL_INVALID_VALUE](_GL_INVALID_VALUE) is generated if xoffset < 0, xoffset + width > w, yoffset < 0, or yoffset + height > h, where w is the [_GL_TEXTURE_WIDTH](_GL_TEXTURE_WIDTH) and h is the [_GL_TEXTURE_HEIGHT](_GL_TEXTURE_HEIGHT) of the texture image being modified.
## Use With
[_glGetTexImage](_glGetTexImage)
## See Also
[_GL](_GL)
[_glActiveTexture](_glActiveTexture), [_glBindTexture](_glBindTexture), [_glBindFramebuffer](_glBindFramebuffer), [_glCopyImageSubData](_glCopyImageSubData), [_glCopyTexSubImage1D](_glCopyTexSubImage1D), [_glCopyTexSubImage3D](_glCopyTexSubImage3D), [_glCopyTexImage2D](_glCopyTexImage2D), [_glReadBuffer](_glReadBuffer)

View file

@ -1,55 +0,0 @@
**_glDrawArrays:** render primitives from array data
## Syntax
> : SUB _glDrawArrays (BYVAL mode AS _UNSIGNED LONG, BYVAL first AS LONG, BYVAL count AS LONG)
> : void **_glDrawArrays**(GLenum mode, GLint first, GLsizei count);
; mode
> Specifies what kind of primitives to render. Symbolic constants [_GL_POINTS](_GL_POINTS), [_GL_LINE_STRIP](_GL_LINE_STRIP), [_GL_LINE_LOOP](_GL_LINE_LOOP), [_GL_LINES](_GL_LINES), [_GL_LINE_STRIP_ADJACENCY](_GL_LINE_STRIP_ADJACENCY), [_GL_LINES_ADJACENCY](_GL_LINES_ADJACENCY), [_GL_TRIANGLE_STRIP](_GL_TRIANGLE_STRIP), [_GL_TRIANGLE_FAN](_GL_TRIANGLE_FAN), [_GL_TRIANGLES](_GL_TRIANGLES), [_GL_TRIANGLE_STRIP_ADJACENCY](_GL_TRIANGLE_STRIP_ADJACENCY), [_GL_TRIANGLES_ADJACENCY](_GL_TRIANGLES_ADJACENCY) and [_GL_PATCHES](_GL_PATCHES) are accepted.
; first
> Specifies the starting index in the enabled arrays.
; count
> Specifies the number of indices to be rendered.
## Description
**_glDrawArrays** specifies multiple geometric primitives with very few subroutine calls. Instead of calling a GL procedure to pass each individual vertex, normal, texture coordinate, edge flag, or color, you can prespecify separate arrays of vertices, normals, and colors and use them to construct a sequence of primitives with a single call to **_glDrawArrays**.
When **_glDrawArrays** is called, it uses count sequential elements from each enabled array to construct a sequence of geometric primitives, beginning with element first. mode specifies what kind of primitives are constructed and how the array elements construct those primitives.
Vertex attributes that are modified by **_glDrawArrays** have an unspecified value after **_glDrawArrays** returns. Attributes that aren't modified remain well defined.
## Notes
[_GL_LINE_STRIP_ADJACENCY](_GL_LINE_STRIP_ADJACENCY), [_GL_LINES_ADJACENCY](_GL_LINES_ADJACENCY), [_GL_TRIANGLE_STRIP_ADJACENCY](_GL_TRIANGLE_STRIP_ADJACENCY) and [_GL_TRIANGLES_ADJACENCY](_GL_TRIANGLES_ADJACENCY) are available only if the GL version is 3.2 or greater.
## Error(s)
[_GL_INVALID_ENUM](_GL_INVALID_ENUM) is generated if mode is not an accepted value.
[_GL_INVALID_VALUE](_GL_INVALID_VALUE) is generated if count is negative.
[_GL_INVALID_OPERATION](_GL_INVALID_OPERATION) is generated if a non-zero buffer object name is bound to an enabled array and the buffer object's data store is currently mapped.
[_GL_INVALID_OPERATION](_GL_INVALID_OPERATION) is generated if a geometry shader is active and mode is incompatible with the input primitive type of the geometry shader in the currently installed program object.
## See Also
[_GL](_GL)
[_glBindVertexArray](_glBindVertexArray), [_glDrawArraysIndirect](_glDrawArraysIndirect), [_glDrawArraysInstanced](_glDrawArraysInstanced), [_glDrawArraysInstancedBaseInstance](_glDrawArraysInstancedBaseInstance), [_glMultiDrawArrays](_glMultiDrawArrays), [_glMultiDrawArraysIndirect](_glMultiDrawArraysIndirect)

View file

@ -1,67 +0,0 @@
**_glDrawBuffer:** specify which color buffers are to be drawn into
## Syntax
> : SUB _glDrawBuffer (BYVAL mode AS _UNSIGNED LONG)
> : void **_glDrawBuffer**(GLenum mode);
; mode
> Specifies up to four color buffers to be drawn into. Symbolic constants [_GL_NONE](_GL_NONE), [_GL_FRONT_LEFT](_GL_FRONT_LEFT), [_GL_FRONT_RIGHT](_GL_FRONT_RIGHT), [_GL_BACK_LEFT](_GL_BACK_LEFT), [_GL_BACK_RIGHT](_GL_BACK_RIGHT), [_GL_FRONT](_GL_FRONT), [_GL_BACK](_GL_BACK), [_GL_LEFT](_GL_LEFT), [_GL_RIGHT](_GL_RIGHT), and [_GL_FRONT_AND_BACK](_GL_FRONT_AND_BACK) are accepted. The initial value is [_GL_FRONT](_GL_FRONT) for single-buffered contexts, and [_GL_BACK](_GL_BACK) for double-buffered contexts.
## Description
When colors are written to the frame buffer, they are written into the color buffers specified by **_glDrawBuffer**. The specifications are as follows:
; [_GL_NONE](_GL_NONE)
> No color buffers are written.
; [_GL_FRONT_LEFT](_GL_FRONT_LEFT)
> Only the front left color buffer is written.
; [_GL_FRONT_RIGHT](_GL_FRONT_RIGHT)
> Only the front right color buffer is written.
; [_GL_BACK_LEFT](_GL_BACK_LEFT)
> Only the back left color buffer is written.
; [_GL_BACK_RIGHT](_GL_BACK_RIGHT)
> Only the back right color buffer is written.
; [_GL_FRONT](_GL_FRONT)
> Only the front left and front right color buffers are written. If there is no front right color buffer, only the front left color buffer is written.
; [_GL_BACK](_GL_BACK)
> Only the back left and back right color buffers are written. If there is no back right color buffer, only the back left color buffer is written.
; [_GL_LEFT](_GL_LEFT)
> Only the front left and back left color buffers are written. If there is no back left color buffer, only the front left color buffer is written.
; [_GL_RIGHT](_GL_RIGHT)
> Only the front right and back right color buffers are written. If there is no back right color buffer, only the front right color buffer is written.
; [_GL_FRONT_AND_BACK](_GL_FRONT_AND_BACK)
> All the front and back color buffers (front left, front right, back left, back right) are written. If there are no back color buffers, only the front left and front right color buffers are written. If there are no right color buffers, only the front left and back left color buffers are written. If there are no right or back color buffers, only the front left color buffer is written.
If more than one color buffer is selected for drawing, then blending or logical operations are computed and applied independently for each color buffer and can produce different results in each buffer.
Monoscopic contexts include only *left* buffers, and stereoscopic contexts include both *left* and *right* buffers. Likewise, single-buffered contexts include only *front* buffers, and double-buffered contexts include both *front* and *back* buffers. The context is selected at GL initialization.
## Error(s)
[_GL_INVALID_ENUM](_GL_INVALID_ENUM) is generated if mode is not an accepted value.
[_GL_INVALID_OPERATION](_GL_INVALID_OPERATION) is generated if none of the buffers indicated by mode exists.
## Use With
[_glGet](_glGet) with argument [_GL_DRAW_BUFFER](_GL_DRAW_BUFFER)
## See Also
[_GL](_GL)
[_glBindFramebuffer](_glBindFramebuffer), [_glBlendFunc](_glBlendFunc), [_glColorMask](_glColorMask), [_glDrawBuffers](_glDrawBuffers), [_glLogicOp](_glLogicOp)

View file

@ -1,57 +0,0 @@
**_glDrawElements:** render primitives from array data
## Syntax
> SUB _glDrawElements (BYVAL mode AS _UNSIGNED LONG, BYVAL count AS LONG, BYVAL type AS _UNSIGNED LONG, indices AS _OFFSET)
> void **_glDrawElements**(GLenum mode, GLsizei count, GLenum type, const GLvoid * indices);
; mode
> Specifies what kind of primitives to render. Symbolic constants [_GL_POINTS](_GL_POINTS), [_GL_LINE_STRIP](_GL_LINE_STRIP), [_GL_LINE_LOOP](_GL_LINE_LOOP), [_GL_LINES](_GL_LINES), [_GL_LINE_STRIP_ADJACENCY](_GL_LINE_STRIP_ADJACENCY), [_GL_LINES_ADJACENCY](_GL_LINES_ADJACENCY), [_GL_TRIANGLE_STRIP](_GL_TRIANGLE_STRIP), [_GL_TRIANGLE_FAN](_GL_TRIANGLE_FAN), [_GL_TRIANGLES](_GL_TRIANGLES), [_GL_TRIANGLE_STRIP_ADJACENCY](_GL_TRIANGLE_STRIP_ADJACENCY), [_GL_TRIANGLES_ADJACENCY](_GL_TRIANGLES_ADJACENCY) and [_GL_PATCHES](_GL_PATCHES) are accepted.
; count
> Specifies the number of elements to be rendered.
; type
> Specifies the type of the values in indices. Must be one of [_GL_UNSIGNED_BYTE](_GL_UNSIGNED_BYTE), [_GL_UNSIGNED_SHORT](_GL_UNSIGNED_SHORT), or [_GL_UNSIGNED_INT](_GL_UNSIGNED_INT).
; indices
> Specifies a pointer to the location where the indices are stored.
## Description
**_glDrawElements** specifies multiple geometric primitives with very few subroutine calls. Instead of calling a GL function to pass each individual vertex, normal, texture coordinate, edge flag, or color, you can prespecify separate arrays of vertices, normals, and so on, and use them to construct a sequence of primitives with a single call to **_glDrawElements**.
When **_glDrawElements** is called, it uses count sequential elements from an enabled array, starting at indices (interpreted as a byte count) to construct a sequence of geometric primitives. mode specifies what kind of primitives are constructed and how the array elements construct these primitives. If more than one array is enabled, each is used.
Vertex attributes that are modified by **_glDrawElements** have an unspecified value after **_glDrawElements** returns. Attributes that aren't modified maintain their previous values.
## Notes
[_GL_LINE_STRIP_ADJACENCY](_GL_LINE_STRIP_ADJACENCY), [_GL_LINES_ADJACENCY](_GL_LINES_ADJACENCY), [_GL_TRIANGLE_STRIP_ADJACENCY](_GL_TRIANGLE_STRIP_ADJACENCY) and [_GL_TRIANGLES_ADJACENCY](_GL_TRIANGLES_ADJACENCY) are available only if the GL version is 3.2 or greater.
## Error(s)
[_GL_INVALID_ENUM](_GL_INVALID_ENUM) is generated if mode is not an accepted value.
[_GL_INVALID_VALUE](_GL_INVALID_VALUE) is generated if count is negative.
[_GL_INVALID_OPERATION](_GL_INVALID_OPERATION) is generated if a geometry shader is active and mode is incompatible with the input primitive type of the geometry shader in the currently installed program object.
[_GL_INVALID_OPERATION](_GL_INVALID_OPERATION) is generated if a non-zero buffer object name is bound to an enabled array or the element array and the buffer object's data store is currently mapped.
## See Also
[_GL](_GL)
[_glBindVertexArray](_glBindVertexArray), [_glDrawArrays](_glDrawArrays), [_glDrawElementsBaseVertex](_glDrawElementsBaseVertex), [_glDrawElementsIndirect](_glDrawElementsIndirect), [_glDrawElementsInstanced](_glDrawElementsInstanced), [_glDrawElementsInstancedBaseInstance](_glDrawElementsInstancedBaseInstance), [_glDrawElementsInstancedBaseVertex](_glDrawElementsInstancedBaseVertex), [_glDrawElementsInstancedBaseVertexBaseInstance](_glDrawElementsInstancedBaseVertexBaseInstance), [_glDrawRangeElements](_glDrawRangeElements), [_glDrawRangeElementsBaseVertex](_glDrawRangeElementsBaseVertex), [_glMultiDrawElements](_glMultiDrawElements), [_glMultiDrawElementsBaseVertex](_glMultiDrawElementsBaseVertex), [_glMultiDrawElementsIndirect](_glMultiDrawElementsIndirect)

View file

@ -1,45 +0,0 @@
**_glFrontFace:** define front- and back-facing polygons
## Syntax
SUB _glFrontFace (BYVAL mode AS _UNSIGNED LONG)
void **_glFrontFace**(GLenum mode);
; mode
> Specifies the orientation of front-facing polygons. [_GL_CW](_GL_CW) and [_GL_CCW](_GL_CCW) are accepted. The initial value is [_GL_CCW](_GL_CCW).
## Description
In a scene composed entirely of opaque closed surfaces, back-facing polygons are never visible. Eliminating these invisible polygons has the obvious benefit of speeding up the rendering of the image. To enable and disable elimination of back-facing polygons, call [_glEnable](_glEnable) and [_glDisable](_glDisable) with argument [_GL_CULL_FACE](_GL_CULL_FACE).
The projection of a polygon to window coordinates is said to have clockwise winding if an imaginary object following the path from its first vertex, its second vertex, and so on, to its last vertex, and finally back to its first vertex, moves in a clockwise direction about the interior of the polygon. The polygon's winding is said to be counterclockwise if the imaginary object following the same path moves in a counterclockwise direction about the interior of the polygon. **_glFrontFace** specifies whether polygons with clockwise winding in window coordinates, or counterclockwise winding in window coordinates, are taken to be front-facing. Passing [_GL_CCW](_GL_CCW) to mode selects counterclockwise polygons as front-facing; [_GL_CW](_GL_CW) selects clockwise polygons as front-facing. By default, counterclockwise polygons are taken to be front-facing.
## Error(s)
[_GL_INVALID_ENUM](_GL_INVALID_ENUM) is generated if mode is not an accepted value.
## Use With
[_glGet](_glGet) with argument [_GL_FRONT_FACE](_GL_FRONT_FACE)
## See Also
[_GL](_GL)
[_glCullFace](_glCullFace)
Copyright 1991-2006 Silicon Graphics, Inc. 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/].

View file

@ -1,137 +0,0 @@
**_glIsEnabled, glIsEnabledi:** test whether a capability is enabled
## Syntax
FUNCTION _glIsEnabled~%% (BYVAL cap AS _UNSIGNED LONG)
GLboolean **_glIsEnabled**(GLenum cap);
GLboolean **_glIsEnabledi**(GLenum cap, GLuint index);
; cap
> Specifies a symbolic constant indicating a GL capability.
; index
> Specifies the index of the capability.
## Description
**_glIsEnabled** returns [_GL_TRUE](_GL_TRUE) if cap is an enabled capability and returns [_GL_FALSE](_GL_FALSE) otherwise. Boolean states that are indexed may be tested with **_glIsEnabledi**. For **_glIsEnabledi**, index specifies the index of the capability to test. index must be between zero and the count of indexed capabilities for cap. Initially all capabilities except [_GL_DITHER](_GL_DITHER) are disabled; [_GL_DITHER](_GL_DITHER) is initially enabled.
The following capabilities are accepted for cap:
{|
|+
! **Constant**
! **See**
|+
| [_GL_BLEND](_GL_BLEND)
| [_glBlendFunc](_glBlendFunc), [_glLogicOp](_glLogicOp)
|+
| [_GL_CLIP_DISTANCE](_GL_CLIP_DISTANCE)*i*
| [_glEnable](_glEnable)
|+
| [_GL_COLOR_LOGIC_OP](_GL_COLOR_LOGIC_OP)
| [_glLogicOp](_glLogicOp)
|+
| [_GL_CULL_FACE](_GL_CULL_FACE)
| [_glCullFace](_glCullFace)
|+
| [_GL_DEPTH_CLAMP](_GL_DEPTH_CLAMP)
| [_glEnable](_glEnable)
|+
| [_GL_DEBUG_OUTPUT](_GL_DEBUG_OUTPUT)
| [_glEnable](_glEnable)
|+
| [_GL_DEBUG_OUTPUT_SYNCHRONOUS](_GL_DEBUG_OUTPUT_SYNCHRONOUS)
| [_glEnable](_glEnable)
|+
| [_GL_DEPTH_TEST](_GL_DEPTH_TEST)
| [_glDepthFunc](_glDepthFunc), [_glDepthRange](_glDepthRange)
|+
| [_GL_DITHER](_GL_DITHER)
| [_glEnable](_glEnable)
|+
| [_GL_FRAMEBUFFER_SRGB](_GL_FRAMEBUFFER_SRGB)
| [_glEnable](_glEnable)
|+
| [_GL_LINE_SMOOTH](_GL_LINE_SMOOTH)
| [_glLineWidth](_glLineWidth)
|+
| [_GL_MULTISAMPLE](_GL_MULTISAMPLE)
| [_glSampleCoverage](_glSampleCoverage)
|+
| [_GL_POLYGON_SMOOTH](_GL_POLYGON_SMOOTH)
| [_glPolygonMode](_glPolygonMode)
|+
| [_GL_POLYGON_OFFSET_FILL](_GL_POLYGON_OFFSET_FILL)
| [_glPolygonOffset](_glPolygonOffset)
|+
| [_GL_POLYGON_OFFSET_LINE](_GL_POLYGON_OFFSET_LINE)
| [_glPolygonOffset](_glPolygonOffset)
|+
| [_GL_POLYGON_OFFSET_POINT](_GL_POLYGON_OFFSET_POINT)
| [_glPolygonOffset](_glPolygonOffset)
|+
| [_GL_PROGRAM_POINT_SIZE](_GL_PROGRAM_POINT_SIZE)
| [_glEnable](_glEnable)
|+
| [_GL_PRIMITIVE_RESTART](_GL_PRIMITIVE_RESTART)
| [_glEnable](_glEnable), [_glPrimitiveRestartIndex](_glPrimitiveRestartIndex)
|+
| [_GL_SAMPLE_ALPHA_TO_COVERAGE](_GL_SAMPLE_ALPHA_TO_COVERAGE)
| [_glSampleCoverage](_glSampleCoverage)
|+
| [_GL_SAMPLE_ALPHA_TO_ONE](_GL_SAMPLE_ALPHA_TO_ONE)
| [_glSampleCoverage](_glSampleCoverage)
|+
| [_GL_SAMPLE_COVERAGE](_GL_SAMPLE_COVERAGE)
| [_glSampleCoverage](_glSampleCoverage)
|+
| [_GL_SAMPLE_MASK](_GL_SAMPLE_MASK)
| [_glEnable](_glEnable)
|+
| [_GL_SCISSOR_TEST](_GL_SCISSOR_TEST)
| [_glScissor](_glScissor)
|+
| [_GL_STENCIL_TEST](_GL_STENCIL_TEST)
| [_glStencilFunc](_glStencilFunc), [_glStencilOp](_glStencilOp)
|+
| [_GL_TEXTURE_CUBEMAP_SEAMLESS](_GL_TEXTURE_CUBEMAP_SEAMLESS)
| [_glEnable](_glEnable)
|}
## Notes
If an error is generated, **_glIsEnabled** and **_glIsEnabledi** return [_GL_FALSE](_GL_FALSE).
[_GL_DEBUG_OUTPUT](_GL_DEBUG_OUTPUT) and [_GL_DEBUG_OUTPUT_SYNCHRONOUS](_GL_DEBUG_OUTPUT_SYNCHRONOUS) are available only if the GL version is 4.3 or greater.
## Error(s)
[_GL_INVALID_ENUM](_GL_INVALID_ENUM) is generated if cap is not an accepted value.
[_GL_INVALID_VALUE](_GL_INVALID_VALUE) is generated by **_glIsEnabledi** if index is outside the valid range for the indexed state cap.
## See Also
[_GL](_GL)
[_glEnable](_glEnable), [_glDisable](_glDisable), [_glGet](_glGet)
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/].

View file

@ -1,33 +0,0 @@
**_glIsTexture:** determine if a name corresponds to a texture
## Syntax
FUNCTION _glIsTexture~%% (BYVAL texture AS _UNSIGNED LONG)
GLboolean **_glIsTexture**(GLuint texture);
; texture
> Specifies a value that may be the name of a texture.
## Description
**_glIsTexture** returns [_GL_TRUE](_GL_TRUE) if texture is currently the name of a texture. If texture is zero, or is a non-zero value that is not currently the name of a texture, or if an error occurs, **_glIsTexture** returns [_GL_FALSE](_GL_FALSE).
A name returned by [_glGenTextures](_glGenTextures), but not yet associated with a texture by calling [_glBindTexture](_glBindTexture), is not the name of a texture.
## See Also
[_GL](_GL)
[_glBindTexture](_glBindTexture), [_glDeleteTextures](_glDeleteTextures), [_glGenTextures](_glGenTextures)
Copyright 1991-2006 Silicon Graphics, Inc. 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/].

View file

@ -1,84 +0,0 @@
**_glStencilFunc:** set front and back function and reference value for stencil testing
## Syntax
SUB _glStencilFunc (BYVAL func AS _UNSIGNED LONG, BYVAL ref AS LONG, BYVAL mask AS _UNSIGNED LONG)
void **_glStencilFunc**(GLenum func, GLint ref, GLuint mask);
; func
> Specifies the test function. Eight symbolic constants are valid: [_GL_NEVER](_GL_NEVER), [_GL_LESS](_GL_LESS), [_GL_LEQUAL](_GL_LEQUAL), [_GL_GREATER](_GL_GREATER), [_GL_GEQUAL](_GL_GEQUAL), [_GL_EQUAL](_GL_EQUAL), [_GL_NOTEQUAL](_GL_NOTEQUAL), and [_GL_ALWAYS](_GL_ALWAYS). The initial value is [_GL_ALWAYS](_GL_ALWAYS).
; ref
> Specifies the reference value for the stencil test. ref is clamped to the range [0, 2<sup>n</sup> - 1, where *n* is the number of bitplanes in the stencil buffer. The initial value is 0.
; mask
> Specifies a mask that is ANDed with both the reference value and the stored stencil value when the test is done. The initial value is all 1's.
## Description
Stenciling, like depth-buffering, enables and disables drawing on a per-pixel basis. Stencil planes are first drawn into using GL drawing primitives, then geometry and images are rendered using the stencil planes to mask out portions of the screen. Stenciling is typically used in multipass rendering algorithms to achieve special effects, such as decals, outlining, and constructive solid geometry rendering.
The stencil test conditionally eliminates a pixel based on the outcome of a comparison between the reference value and the value in the stencil buffer. To enable and disable the test, call [_glEnable](_glEnable) and [_glDisable](_glDisable) with argument [_GL_STENCIL_TEST](_GL_STENCIL_TEST). To specify actions based on the outcome of the stencil test, call [_glStencilOp](_glStencilOp) or [_glStencilOpSeparate](_glStencilOpSeparate).
There can be two separate sets of func, ref, and mask parameters; one affects back-facing polygons, and the other affects front-facing polygons as well as other non-polygon primitives. [_glStencilFunc](_glStencilFunc) sets both front and back stencil state to the same values. Use [_glStencilFuncSeparate](_glStencilFuncSeparate) to set front and back stencil state to different values.
func is a symbolic constant that determines the stencil comparison function. It accepts one of eight values, shown in the following list. ref is an integer reference value that is used in the stencil comparison. It is clamped to the range [0, 2<sup>n</sup> - 1], where *n* is the number of bitplanes in the stencil buffer. mask is bitwise ANDed with both the reference value and the stored stencil value, with the ANDed values participating in the comparison.
If *stencil* represents the value stored in the corresponding stencil buffer location, the following list shows the effect of each comparison function that can be specified by func. Only if the comparison succeeds is the pixel passed through to the next stage in the rasterization process (see [_glStencilOp](_glStencilOp)). All tests treat *stencil* values as unsigned integers in the range [0, 2<sup>n</sup> - 1], where *n* is the number of bitplanes in the stencil buffer.
The following values are accepted by func:
; [_GL_NEVER](_GL_NEVER)
> Always fails.
; [_GL_LESS](_GL_LESS)
> Passes if ( ref & mask ) < ( *stencil* & mask ).
; [_GL_LEQUAL](_GL_LEQUAL)
> Passes if ( ref & mask ) <= ( *stencil* & mask ).
; [_GL_GREATER](_GL_GREATER)
> Passes if ( ref & mask ) > ( *stencil* & mask ).
; [_GL_GEQUAL](_GL_GEQUAL)
> Passes if ( ref & mask ) >= ( *stencil* & mask ).
; [_GL_EQUAL](_GL_EQUAL)
> Passes if ( ref & mask ) = ( *stencil* & mask ).
; [_GL_NOTEQUAL](_GL_NOTEQUAL)
> Passes if ( ref & mask ) != ( *stencil* & mask ).
; [_GL_ALWAYS](_GL_ALWAYS)
> Always passes.
## Notes
Initially, the stencil test is disabled. If there is no stencil buffer, no stencil modification can occur and it is as if the stencil test always passes.
[_glStencilFunc](_glStencilFunc) is the same as calling [_glStencilFuncSeparate](_glStencilFuncSeparate) with face set to [_GL_FRONT_AND_BACK](_GL_FRONT_AND_BACK).
## Error(s)
[_GL_INVALID_ENUM](_GL_INVALID_ENUM) is generated if func is not one of the eight accepted values.
## Use With
[_glGet](_glGet) with argument [_GL_STENCIL_FUNC](_GL_STENCIL_FUNC), [_GL_STENCIL_VALUE_MASK](_GL_STENCIL_VALUE_MASK), [_GL_STENCIL_REF](_GL_STENCIL_REF), [_GL_STENCIL_BACK_FUNC](_GL_STENCIL_BACK_FUNC), [_GL_STENCIL_BACK_VALUE_MASK](_GL_STENCIL_BACK_VALUE_MASK), [_GL_STENCIL_BACK_REF](_GL_STENCIL_BACK_REF), or [_GL_STENCIL_BITS](_GL_STENCIL_BITS)
[_glIsEnabled](_glIsEnabled) with argument [_GL_STENCIL_TEST](_GL_STENCIL_TEST)
## See Also
[_GL](_GL)
[_glEnable](_glEnable), [_glLogicOp](_glLogicOp), [_glStencilFuncSeparate](_glStencilFuncSeparate), [_glStencilMask](_glStencilMask), [_glStencilMaskSeparate](_glStencilMaskSeparate), [_glStencilOp](_glStencilOp), [_glStencilOpSeparate](_glStencilOpSeparate)

View file

@ -1,46 +0,0 @@
**_glStencilMask:** control the front and back writing of individual bits in the stencil planes
## Syntax
SUB _glStencilMask (BYVAL mask AS _UNSIGNED LONG)
void **_glStencilMask**(GLuint mask);
; mask
> Specifies a bit mask to enable and disable writing of individual bits in the stencil planes. Initially, the mask is all 1's.
## Description
**_glStencilMask** controls the writing of individual bits in the stencil planes. The least significant *n* bits of mask, where *n* is the number of bits in the stencil buffer, specify a mask. Where a 1 appears in the mask, it's possible to write to the corresponding bit in the stencil buffer. Where a 0 appears, the corresponding bit is write-protected. Initially, all bits are enabled for writing.
There can be two separate mask writemasks; one affects back-facing polygons, and the other affects front-facing polygons as well as other non-polygon primitives. [_glStencilMask](_glStencilMask) sets both front and back stencil writemasks to the same values. Use [_glStencilMaskSeparate](_glStencilMaskSeparate) to set front and back stencil writemasks to different values.
## Notes
[_glStencilMask](_glStencilMask) is the same as calling [_glStencilMaskSeparate](_glStencilMaskSeparate) with face set to [_GL_FRONT_AND_BACK](_GL_FRONT_AND_BACK).
## Use With
[_glGet](_glGet) with argument [_GL_STENCIL_WRITEMASK](_GL_STENCIL_WRITEMASK), [_GL_STENCIL_BACK_WRITEMASK](_GL_STENCIL_BACK_WRITEMASK), or [_GL_STENCIL_BITS](_GL_STENCIL_BITS)
## See Also
[_GL](_GL)
[_glClear](_glClear), [_glClearBuffer](_glClearBuffer), [_glColorMask](_glColorMask), [_glDepthMask](_glDepthMask), [_glStencilFunc](_glStencilFunc), [_glStencilFuncSeparate](_glStencilFuncSeparate), [_glStencilMaskSeparate](_glStencilMaskSeparate), [_glStencilOp](_glStencilOp), [_glStencilOpSeparate](_glStencilOpSeparate)

View file

@ -1,84 +0,0 @@
**_glStencilOp:** set front and back stencil test actions
## Syntax
SUB _glStencilOp (BYVAL fail AS _UNSIGNED LONG, BYVAL zfail AS _UNSIGNED LONG, BYVAL zpass AS _UNSIGNED LONG)
void **_glStencilOp**(GLenum sfail, GLenum dpfail, GLenum dppass);
; sfail
> Specifies the action to take when the stencil test fails. Eight symbolic constants are accepted: [_GL_KEEP](_GL_KEEP), [_GL_ZERO](_GL_ZERO), [_GL_REPLACE](_GL_REPLACE), [_GL_INCR](_GL_INCR), [_GL_INCR_WRAP](_GL_INCR_WRAP), [_GL_DECR](_GL_DECR), [_GL_DECR_WRAP](_GL_DECR_WRAP), and [_GL_INVERT](_GL_INVERT). The initial value is [_GL_KEEP](_GL_KEEP).
; dpfail
> Specifies the stencil action when the stencil test passes, but the depth test fails. dpfail accepts the same symbolic constants as sfail. The initial value is [_GL_KEEP](_GL_KEEP).
; dppass
> Specifies the stencil action when both the stencil test and the depth test pass, or when the stencil test passes and either there is no depth buffer or depth testing is not enabled. dppass accepts the same symbolic constants as sfail. The initial value is [_GL_KEEP](_GL_KEEP).
## Description
Stenciling, like depth-buffering, enables and disables drawing on a per-pixel basis. You draw into the stencil planes using GL drawing primitives, then render geometry and images, using the stencil planes to mask out portions of the screen. Stenciling is typically used in multipass rendering algorithms to achieve special effects, such as decals, outlining, and constructive solid geometry rendering.
The stencil test conditionally eliminates a pixel based on the outcome of a comparison between the value in the stencil buffer and a reference value. To enable and disable the test, call [_glEnable](_glEnable) and [_glDisable](_glDisable) with argument [_GL_STENCIL_TEST](_GL_STENCIL_TEST); to control it, call [_glStencilFunc](_glStencilFunc) or [_glStencilFuncSeparate](_glStencilFuncSeparate).
There can be two separate sets of sfail, dpfail, and dppass parameters; one affects back-facing polygons, and the other affects front-facing polygons as well as other non-polygon primitives. [_glStencilOp](_glStencilOp) sets both front and back stencil state to the same values. Use [_glStencilOpSeparate](_glStencilOpSeparate) to set front and back stencil state to different values.
**_glStencilOp** takes three arguments that indicate what happens to the stored stencil value while stenciling is enabled. If the stencil test fails, no change is made to the pixel's color or depth buffers, and sfail specifies what happens to the stencil buffer contents. The following eight actions are possible.
; [_GL_KEEP](_GL_KEEP)
> Keeps the current value.
; [_GL_ZERO](_GL_ZERO)
> Sets the stencil buffer value to 0.
; [_GL_REPLACE](_GL_REPLACE)
> Sets the stencil buffer value to *ref*, as specified by [_glStencilFunc](_glStencilFunc).
; [_GL_INCR](_GL_INCR)
> Increments the current stencil buffer value. Clamps to the maximum representable unsigned value.
; [_GL_INCR_WRAP](_GL_INCR_WRAP)
> Increments the current stencil buffer value. Wraps stencil buffer value to zero when incrementing the maximum representable unsigned value.
; [_GL_DECR](_GL_DECR)
> Decrements the current stencil buffer value. Clamps to 0.
; [_GL_DECR_WRAP](_GL_DECR_WRAP)
> Decrements the current stencil buffer value. Wraps stencil buffer value to the maximum representable unsigned value when decrementing a stencil buffer value of zero.
; [_GL_INVERT](_GL_INVERT)
> Bitwise inverts the current stencil buffer value.
Stencil buffer values are treated as unsigned integers. When incremented and decremented, values are clamped to 0 and 2<sup>n</sup> - 1, where *n* is the value returned by querying [_GL_STENCIL_BITS](_GL_STENCIL_BITS).
The other two arguments to **_glStencilOp** specify stencil buffer actions that depend on whether subsequent depth buffer tests succeed (dppass) or fail (dpfail) (see [_glDepthFunc](_glDepthFunc)). The actions are specified using the same eight symbolic constants as sfail. Note that dpfail is ignored when there is no depth buffer, or when the depth buffer is not enabled. In these cases, sfail and dppass specify stencil action when the stencil test fails and passes, respectively.
## Notes
Initially the stencil test is disabled. If there is no stencil buffer, no stencil modification can occur and it is as if the stencil tests always pass, regardless of any call to **_glStencilOp**.
[_glStencilOp](_glStencilOp) is the same as calling [_glStencilOpSeparate](_glStencilOpSeparate) with face set to [_GL_FRONT_AND_BACK](_GL_FRONT_AND_BACK).
## Error(s)
[_GL_INVALID_ENUM](_GL_INVALID_ENUM) is generated if sfail, dpfail, or dppass is any value other than the defined constant values.
## Use With
[_glGet](_glGet) with argument [_GL_STENCIL_FAIL](_GL_STENCIL_FAIL), [_GL_STENCIL_PASS_DEPTH_PASS](_GL_STENCIL_PASS_DEPTH_PASS), [_GL_STENCIL_PASS_DEPTH_FAIL](_GL_STENCIL_PASS_DEPTH_FAIL), [_GL_STENCIL_BACK_FAIL](_GL_STENCIL_BACK_FAIL), [_GL_STENCIL_BACK_PASS_DEPTH_PASS](_GL_STENCIL_BACK_PASS_DEPTH_PASS), [_GL_STENCIL_BACK_PASS_DEPTH_FAIL](_GL_STENCIL_BACK_PASS_DEPTH_FAIL), or [_GL_STENCIL_BITS](_GL_STENCIL_BITS)
[_glIsEnabled](_glIsEnabled) with argument [_GL_STENCIL_TEST](_GL_STENCIL_TEST)
## See Also
[_GL](_GL)
[_glBlendFunc](_glBlendFunc), [_glDepthFunc](_glDepthFunc), [_glEnable](_glEnable), [_glLogicOp](_glLogicOp), [_glStencilFunc](_glStencilFunc), [_glStencilFuncSeparate](_glStencilFuncSeparate), [_glStencilMask](_glStencilMask), [_glStencilMaskSeparate](_glStencilMaskSeparate), [_glStencilOpSeparate](_glStencilOpSeparate)

View file

@ -1,51 +0,0 @@
**_glCullFace:** specify whether front- or back-facing facets can be culled
## Syntax
> :SUB **_glCullFace** (BYVAL mode AS _UNSIGNED LONG)
> : void **_glCullFace**(GLenum mode);
; mode
> Specifies whether front- or back-facing facets are candidates for culling. Symbolic constants [_GL_FRONT](_GL_FRONT), [_GL_BACK](_GL_BACK), and [_GL_FRONT_AND_BACK](_GL_FRONT_AND_BACK) are accepted. The initial value is [_GL_BACK](_GL_BACK).
## Description
**_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 [_glEnable](_glEnable) and [_glDisable](_glDisable) commands with the argument [_GL_CULL_FACE](_GL_CULL_FACE). Facets include triangles, quadrilaterals, polygons, and rectangles.
[_glFrontFace](_glFrontFace) specifies which of the clockwise and counterclockwise facets are front-facing and back-facing. See [_glFrontFace](_glFrontFace).
## Notes
If mode is [_GL_FRONT_AND_BACK](_GL_FRONT_AND_BACK), no facets are drawn, but other primitives such as points and lines are drawn.
## Error(s)
[_GL_INVALID_ENUM](_GL_INVALID_ENUM) is generated if mode is not an accepted value.
## Use With
[_glIsEnabled](_glIsEnabled) with argument [_GL_CULL_FACE](_GL_CULL_FACE)
[_glGet](_glGet) with argument [_GL_CULL_FACE_MODE](_GL_CULL_FACE_MODE)
## See Also
[_GL](_GL)
[_glEnable](_glEnable), [_glFrontFace](_glFrontFace)