Skip to content
cgcostume edited this page Dec 10, 2014 · 10 revisions

contexts

contexts requests OpenGL contexts for all valid versions and lists the resulting versions. This helps to gather intel on context creation on various system setup's (operating systems, GPUs, and OpenGL drivers). Feel free to post your results to complete the Context Creation Cheat Sheet. Example output on a Windows 8.1:

test: requesting all context configurations ...

  scheme: <requested_version>  <forward> <core>  <created_version>

  1.0  - -  4.4
  1.0  - c  -.-
  1.0  f -  -.-
  1.0  f c  -.-

  ...

  3.0  - -  4.4
  3.0  - c  -.-
  3.0  f -  3.0
  3.0  f c  -.-

  3.1  - -  3.1
  3.1  - c  -.-
  3.1  f -  3.1
  3.1  f c  -.-

  3.2  - -  3.2
  3.2  - c  3.2
  3.2  f -  3.2
  3.2  f c  3.2

  ...

  4.4  - -  4.4
  4.4  - c  4.4
  4.4  f -  4.4
  4.4  f c  4.4

  4.5  - -  -.-
  4.5  - c  -.-
  4.5  f -  -.-
  4.5  f c  -.-

OpenGL Version:  4.4
OpenGL Vendor:   NVIDIA Corporation
OpenGL Renderer: GeForce GTX 770/PCIe/SSE2
OpenGL Revision: 29026 (gl.xml)

functions

This example lists all extensions along with their associated functions. For every function and extension the support status is shown, and the supported version are summarized (similar to the OpenGL Extensions Viewer). Shortened example output:

[-.- EXTENSIONS]

GL_3DFX_multisample

GL_3DFX_tbuffer
	(0x0000000000000000) glTbufferMask3DFX

...

GL_ARB_map_buffer_range (supported)
	(0x000000005FBA5010) glMapBufferRange
	(0x000000005FB93E10) glFlushMappedBufferRange

...

[4.3 EXTENSIONS]

GL_ARB_ES3_compatibility (supported)

GL_ARB_arrays_of_arrays (supported)

GL_ARB_clear_buffer_object (supported)
	(0x000000005FB869D0) glClearBufferData
	(0x000000005FB86A50) glClearBufferSubData

...

[EXTENSIONS NOT COVERED BY GLBINDING]

GL_ARB_context_flush_control
GL_EXTX_framebuffer_mixed_formats
GL_EXT_Cg_shader
GL_EXT_import_sync_object
GL_EXT_texture_compression_dxt1
GL_EXT_texture_edge_clamp
GL_EXT_texture_lod
GL_EXT_texture_storage
GL_EXT_transform_feedback2
GL_KTX_buffer_region
GL_NVX_nvenc_interop
GL_NV_ES1_1_compatibility
GL_NV_ES3_1_compatibility
GL_NV_gpu_program4_1
GL_NV_gpu_program_fp64
GL_WIN_swap_hint
WGL_EXT_swap_control


[NON-EXTENSION OR NOT-COVERED-EXTENSION FUNCTIONS]

	(0x00007FFF57922BF0) glStencilMask
	(0x000000005FBCB050) glVertexAttrib1f
	(0x00007FFF57922C50) glDepthMask
	(0x000000005FBCF450) glVertexAttribI4sv
	...

[SUMMARY]

# Functions:     2128 of 2773 resolved (645 unresolved)
                 2139 assigned to extensions.

# Extensions:    312 of 520 supported (17 of which are unknown to glbinding)
  # -.- assoc.:  177 / 384
  # 3.0 assoc.:  22 / 22
  # 3.1 assoc.:  6 / 6
  # 3.2 assoc.:  10 / 10
  # 3.3 assoc.:  9 / 9
  # 4.0 assoc.:  13 / 13
  # 4.1 assoc.:  6 / 6
  # 4.2 assoc.:  12 / 12
  # 4.3 assoc.:  22 / 22
  # 4.4 assoc.:  8 / 8
  # 4.5 assoc.:  10 / 11

OpenGL Version:  4.5
OpenGL Vendor:   NVIDIA Corporation
OpenGL Renderer: GeForce GTX 680/PCIe/SSE2
OpenGL Revision: 27693 (gl.xml)

meta

meta gathers list of string for versions, enums, and extensions and converts them to their associated OpenGL symbols (note: this example is more effective with OPTION_GL_BY_STRINGS=On):

[VERSIONS]

# Versions: 17

1.0
1.1

...

[ENUMS]

# Enums: 3352

 (0x00040b) GL_AUX2
 (0x008cda) GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT
 
...

[EXTENSIONS]

 # Extensions: 486

 GL_3DFX_multisample 
 GL_3DFX_tbuffer 
 
...

OpenGL Revision: 27590 (gl.xml)

queries

queries calls glGet functions to retrieve lots (probably not all) valid glGet enums and further verifies the specification defaults:

[QUERYING STATE VALUES]

Matrix Stack States
        GL_MATRIX_MODE                        = GL_MODELVIEW
        GL_COLOR_MATRIX                       = identity4
        GL_MODELVIEW_MATRIX                   = identity4
        GL_PROJECTION_MATRIX                  = identity4
        GL_TEXTURE_MATRIX                     = identity4
        GL_COLOR_MATRIX_STACK_DEPTH           = 1
        GL_MODELVIEW_STACK_DEPTH              = 1
        GL_PROJECTION_STACK_DEPTH             = 1
        GL_TEXTURE_STACK_DEPTH                = 1
        GL_MAX_MODELVIEW_STACK_DEPTH          = 32
        GL_MAX_PROJECTION_STACK_DEPTH         = 4
        GL_MAX_TEXTURE_STACK_DEPTH            = 10

Viewport States
        GL_VIEWPORT                           = (0, 0, 320, 240)
        GL_MAX_VIEWPORT_DIMS                  = (16384, 16384)

...
Clone this wiki locally