gls

package
v0.0.0-...-d21f05d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 14, 2023 License: BSD-2-Clause Imports: 12 Imported by: 0

Documentation

Overview

Package gls implements a loader of OpenGL functions for the platform and a Go binding for selected OpenGL functions. The binding maintains some cached state to minimize the number of C function calls. The OpenGL function loader is generated by the "glapi2go" tool by parsing the OpenGL "glcorearb.h" header file

This package also contains abstractions for some OpenGL object such as Program, Uniform, VBO and others.

Index

Constants

View Source
const (
	VERSION_1_0                                   = 1
	DEPTH_BUFFER_BIT                              = 0x00000100
	STENCIL_BUFFER_BIT                            = 0x00000400
	COLOR_BUFFER_BIT                              = 0x00004000
	FALSE                                         = 0
	TRUE                                          = 1
	POINTS                                        = 0x0000
	LINES                                         = 0x0001
	LINE_LOOP                                     = 0x0002
	LINE_STRIP                                    = 0x0003
	TRIANGLES                                     = 0x0004
	TRIANGLE_STRIP                                = 0x0005
	TRIANGLE_FAN                                  = 0x0006
	QUADS                                         = 0x0007
	NEVER                                         = 0x0200
	LESS                                          = 0x0201
	EQUAL                                         = 0x0202
	LEQUAL                                        = 0x0203
	GREATER                                       = 0x0204
	NOTEQUAL                                      = 0x0205
	GEQUAL                                        = 0x0206
	ALWAYS                                        = 0x0207
	ZERO                                          = 0
	ONE                                           = 1
	SRC_COLOR                                     = 0x0300
	ONE_MINUS_SRC_COLOR                           = 0x0301
	SRC_ALPHA                                     = 0x0302
	ONE_MINUS_SRC_ALPHA                           = 0x0303
	DST_ALPHA                                     = 0x0304
	ONE_MINUS_DST_ALPHA                           = 0x0305
	DST_COLOR                                     = 0x0306
	ONE_MINUS_DST_COLOR                           = 0x0307
	SRC_ALPHA_SATURATE                            = 0x0308
	NONE                                          = 0
	FRONT_LEFT                                    = 0x0400
	FRONT_RIGHT                                   = 0x0401
	BACK_LEFT                                     = 0x0402
	BACK_RIGHT                                    = 0x0403
	FRONT                                         = 0x0404
	BACK                                          = 0x0405
	LEFT                                          = 0x0406
	RIGHT                                         = 0x0407
	FRONT_AND_BACK                                = 0x0408
	NO_ERROR                                      = 0
	INVALID_ENUM                                  = 0x0500
	INVALID_VALUE                                 = 0x0501
	INVALID_OPERATION                             = 0x0502
	OUT_OF_MEMORY                                 = 0x0505
	CW                                            = 0x0900
	CCW                                           = 0x0901
	POINT_SIZE                                    = 0x0B11
	POINT_SIZE_RANGE                              = 0x0B12
	POINT_SIZE_GRANULARITY                        = 0x0B13
	LINE_SMOOTH                                   = 0x0B20
	LINE_WIDTH                                    = 0x0B21
	LINE_WIDTH_RANGE                              = 0x0B22
	LINE_WIDTH_GRANULARITY                        = 0x0B23
	POLYGON_MODE                                  = 0x0B40
	POLYGON_SMOOTH                                = 0x0B41
	CULL_FACE                                     = 0x0B44
	CULL_FACE_MODE                                = 0x0B45
	FRONT_FACE                                    = 0x0B46
	DEPTH_RANGE                                   = 0x0B70
	DEPTH_TEST                                    = 0x0B71
	DEPTH_WRITEMASK                               = 0x0B72
	DEPTH_CLEAR_VALUE                             = 0x0B73
	DEPTH_FUNC                                    = 0x0B74
	STENCIL_TEST                                  = 0x0B90
	STENCIL_CLEAR_VALUE                           = 0x0B91
	STENCIL_FUNC                                  = 0x0B92
	STENCIL_VALUE_MASK                            = 0x0B93
	STENCIL_FAIL                                  = 0x0B94
	STENCIL_PASS_DEPTH_FAIL                       = 0x0B95
	STENCIL_PASS_DEPTH_PASS                       = 0x0B96
	STENCIL_REF                                   = 0x0B97
	STENCIL_WRITEMASK                             = 0x0B98
	VIEWPORT                                      = 0x0BA2
	DITHER                                        = 0x0BD0
	BLEND_DST                                     = 0x0BE0
	BLEND_SRC                                     = 0x0BE1
	BLEND                                         = 0x0BE2
	LOGIC_OP_MODE                                 = 0x0BF0
	DRAW_BUFFER                                   = 0x0C01
	READ_BUFFER                                   = 0x0C02
	SCISSOR_BOX                                   = 0x0C10
	SCISSOR_TEST                                  = 0x0C11
	COLOR_CLEAR_VALUE                             = 0x0C22
	COLOR_WRITEMASK                               = 0x0C23
	DOUBLEBUFFER                                  = 0x0C32
	STEREO                                        = 0x0C33
	LINE_SMOOTH_HINT                              = 0x0C52
	POLYGON_SMOOTH_HINT                           = 0x0C53
	UNPACK_SWAP_BYTES                             = 0x0CF0
	UNPACK_LSB_FIRST                              = 0x0CF1
	UNPACK_ROW_LENGTH                             = 0x0CF2
	UNPACK_SKIP_ROWS                              = 0x0CF3
	UNPACK_SKIP_PIXELS                            = 0x0CF4
	UNPACK_ALIGNMENT                              = 0x0CF5
	PACK_SWAP_BYTES                               = 0x0D00
	PACK_LSB_FIRST                                = 0x0D01
	PACK_ROW_LENGTH                               = 0x0D02
	PACK_SKIP_ROWS                                = 0x0D03
	PACK_SKIP_PIXELS                              = 0x0D04
	PACK_ALIGNMENT                                = 0x0D05
	MAX_TEXTURE_SIZE                              = 0x0D33
	MAX_VIEWPORT_DIMS                             = 0x0D3A
	SUBPIXEL_BITS                                 = 0x0D50
	TEXTURE_1D                                    = 0x0DE0
	TEXTURE_2D                                    = 0x0DE1
	TEXTURE_WIDTH                                 = 0x1000
	TEXTURE_HEIGHT                                = 0x1001
	TEXTURE_BORDER_COLOR                          = 0x1004
	DONT_CARE                                     = 0x1100
	FASTEST                                       = 0x1101
	NICEST                                        = 0x1102
	BYTE                                          = 0x1400
	UNSIGNED_BYTE                                 = 0x1401
	SHORT                                         = 0x1402
	UNSIGNED_SHORT                                = 0x1403
	INT                                           = 0x1404
	UNSIGNED_INT                                  = 0x1405
	FLOAT                                         = 0x1406
	STACK_OVERFLOW                                = 0x0503
	STACK_UNDERFLOW                               = 0x0504
	CLEAR                                         = 0x1500
	AND                                           = 0x1501
	AND_REVERSE                                   = 0x1502
	COPY                                          = 0x1503
	AND_INVERTED                                  = 0x1504
	NOOP                                          = 0x1505
	XOR                                           = 0x1506
	OR                                            = 0x1507
	NOR                                           = 0x1508
	EQUIV                                         = 0x1509
	INVERT                                        = 0x150A
	OR_REVERSE                                    = 0x150B
	COPY_INVERTED                                 = 0x150C
	OR_INVERTED                                   = 0x150D
	NAND                                          = 0x150E
	SET                                           = 0x150F
	TEXTURE                                       = 0x1702
	COLOR                                         = 0x1800
	DEPTH                                         = 0x1801
	STENCIL                                       = 0x1802
	STENCIL_INDEX                                 = 0x1901
	DEPTH_COMPONENT                               = 0x1902
	RED                                           = 0x1903
	GREEN                                         = 0x1904
	BLUE                                          = 0x1905
	ALPHA                                         = 0x1906
	RGB                                           = 0x1907
	RGBA                                          = 0x1908
	POINT                                         = 0x1B00
	LINE                                          = 0x1B01
	FILL                                          = 0x1B02
	KEEP                                          = 0x1E00
	REPLACE                                       = 0x1E01
	INCR                                          = 0x1E02
	DECR                                          = 0x1E03
	VENDOR                                        = 0x1F00
	RENDERER                                      = 0x1F01
	VERSION                                       = 0x1F02
	EXTENSIONS                                    = 0x1F03
	NEAREST                                       = 0x2600
	LINEAR                                        = 0x2601
	NEAREST_MIPMAP_NEAREST                        = 0x2700
	LINEAR_MIPMAP_NEAREST                         = 0x2701
	NEAREST_MIPMAP_LINEAR                         = 0x2702
	LINEAR_MIPMAP_LINEAR                          = 0x2703
	TEXTURE_MAG_FILTER                            = 0x2800
	TEXTURE_MIN_FILTER                            = 0x2801
	TEXTURE_WRAP_S                                = 0x2802
	TEXTURE_WRAP_T                                = 0x2803
	REPEAT                                        = 0x2901
	VERSION_1_1                                   = 1
	COLOR_LOGIC_OP                                = 0x0BF2
	POLYGON_OFFSET_UNITS                          = 0x2A00
	POLYGON_OFFSET_POINT                          = 0x2A01
	POLYGON_OFFSET_LINE                           = 0x2A02
	POLYGON_OFFSET_FILL                           = 0x8037
	POLYGON_OFFSET_FACTOR                         = 0x8038
	TEXTURE_BINDING_1D                            = 0x8068
	TEXTURE_BINDING_2D                            = 0x8069
	TEXTURE_INTERNAL_FORMAT                       = 0x1003
	TEXTURE_RED_SIZE                              = 0x805C
	TEXTURE_GREEN_SIZE                            = 0x805D
	TEXTURE_BLUE_SIZE                             = 0x805E
	TEXTURE_ALPHA_SIZE                            = 0x805F
	DOUBLE                                        = 0x140A
	PROXY_TEXTURE_1D                              = 0x8063
	PROXY_TEXTURE_2D                              = 0x8064
	R3_G3_B2                                      = 0x2A10
	RGB4                                          = 0x804F
	RGB5                                          = 0x8050
	RGB8                                          = 0x8051
	RGB10                                         = 0x8052
	RGB12                                         = 0x8053
	RGB16                                         = 0x8054
	RGBA2                                         = 0x8055
	RGBA4                                         = 0x8056
	RGB5_A1                                       = 0x8057
	RGBA8                                         = 0x8058
	RGB10_A2                                      = 0x8059
	RGBA12                                        = 0x805A
	RGBA16                                        = 0x805B
	VERTEX_ARRAY                                  = 0x8074
	VERSION_1_2                                   = 1
	UNSIGNED_BYTE_3_3_2                           = 0x8032
	UNSIGNED_SHORT_4_4_4_4                        = 0x8033
	UNSIGNED_SHORT_5_5_5_1                        = 0x8034
	UNSIGNED_INT_8_8_8_8                          = 0x8035
	UNSIGNED_INT_10_10_10_2                       = 0x8036
	TEXTURE_BINDING_3D                            = 0x806A
	PACK_SKIP_IMAGES                              = 0x806B
	PACK_IMAGE_HEIGHT                             = 0x806C
	UNPACK_SKIP_IMAGES                            = 0x806D
	UNPACK_IMAGE_HEIGHT                           = 0x806E
	TEXTURE_3D                                    = 0x806F
	PROXY_TEXTURE_3D                              = 0x8070
	TEXTURE_DEPTH                                 = 0x8071
	TEXTURE_WRAP_R                                = 0x8072
	MAX_3D_TEXTURE_SIZE                           = 0x8073
	UNSIGNED_BYTE_2_3_3_REV                       = 0x8362
	UNSIGNED_SHORT_5_6_5                          = 0x8363
	UNSIGNED_SHORT_5_6_5_REV                      = 0x8364
	UNSIGNED_SHORT_4_4_4_4_REV                    = 0x8365
	UNSIGNED_SHORT_1_5_5_5_REV                    = 0x8366
	UNSIGNED_INT_8_8_8_8_REV                      = 0x8367
	UNSIGNED_INT_2_10_10_10_REV                   = 0x8368
	BGR                                           = 0x80E0
	BGRA                                          = 0x80E1
	MAX_ELEMENTS_VERTICES                         = 0x80E8
	MAX_ELEMENTS_INDICES                          = 0x80E9
	CLAMP_TO_EDGE                                 = 0x812F
	TEXTURE_MIN_LOD                               = 0x813A
	TEXTURE_MAX_LOD                               = 0x813B
	TEXTURE_BASE_LEVEL                            = 0x813C
	TEXTURE_MAX_LEVEL                             = 0x813D
	SMOOTH_POINT_SIZE_RANGE                       = 0x0B12
	SMOOTH_POINT_SIZE_GRANULARITY                 = 0x0B13
	SMOOTH_LINE_WIDTH_RANGE                       = 0x0B22
	SMOOTH_LINE_WIDTH_GRANULARITY                 = 0x0B23
	ALIASED_LINE_WIDTH_RANGE                      = 0x846E
	VERSION_1_3                                   = 1
	TEXTURE0                                      = 0x84C0
	TEXTURE1                                      = 0x84C1
	TEXTURE2                                      = 0x84C2
	TEXTURE3                                      = 0x84C3
	TEXTURE4                                      = 0x84C4
	TEXTURE5                                      = 0x84C5
	TEXTURE6                                      = 0x84C6
	TEXTURE7                                      = 0x84C7
	TEXTURE8                                      = 0x84C8
	TEXTURE9                                      = 0x84C9
	TEXTURE10                                     = 0x84CA
	TEXTURE11                                     = 0x84CB
	TEXTURE12                                     = 0x84CC
	TEXTURE13                                     = 0x84CD
	TEXTURE14                                     = 0x84CE
	TEXTURE15                                     = 0x84CF
	TEXTURE16                                     = 0x84D0
	TEXTURE17                                     = 0x84D1
	TEXTURE18                                     = 0x84D2
	TEXTURE19                                     = 0x84D3
	TEXTURE20                                     = 0x84D4
	TEXTURE21                                     = 0x84D5
	TEXTURE22                                     = 0x84D6
	TEXTURE23                                     = 0x84D7
	TEXTURE24                                     = 0x84D8
	TEXTURE25                                     = 0x84D9
	TEXTURE26                                     = 0x84DA
	TEXTURE27                                     = 0x84DB
	TEXTURE28                                     = 0x84DC
	TEXTURE29                                     = 0x84DD
	TEXTURE30                                     = 0x84DE
	TEXTURE31                                     = 0x84DF
	ACTIVE_TEXTURE                                = 0x84E0
	MULTISAMPLE                                   = 0x809D
	SAMPLE_ALPHA_TO_COVERAGE                      = 0x809E
	SAMPLE_ALPHA_TO_ONE                           = 0x809F
	SAMPLE_COVERAGE                               = 0x80A0
	SAMPLE_BUFFERS                                = 0x80A8
	SAMPLES                                       = 0x80A9
	SAMPLE_COVERAGE_VALUE                         = 0x80AA
	SAMPLE_COVERAGE_INVERT                        = 0x80AB
	TEXTURE_CUBE_MAP                              = 0x8513
	TEXTURE_BINDING_CUBE_MAP                      = 0x8514
	TEXTURE_CUBE_MAP_POSITIVE_X                   = 0x8515
	TEXTURE_CUBE_MAP_NEGATIVE_X                   = 0x8516
	TEXTURE_CUBE_MAP_POSITIVE_Y                   = 0x8517
	TEXTURE_CUBE_MAP_NEGATIVE_Y                   = 0x8518
	TEXTURE_CUBE_MAP_POSITIVE_Z                   = 0x8519
	TEXTURE_CUBE_MAP_NEGATIVE_Z                   = 0x851A
	PROXY_TEXTURE_CUBE_MAP                        = 0x851B
	MAX_CUBE_MAP_TEXTURE_SIZE                     = 0x851C
	COMPRESSED_RGB                                = 0x84ED
	COMPRESSED_RGBA                               = 0x84EE
	TEXTURE_COMPRESSION_HINT                      = 0x84EF
	TEXTURE_COMPRESSED_IMAGE_SIZE                 = 0x86A0
	TEXTURE_COMPRESSED                            = 0x86A1
	NUM_COMPRESSED_TEXTURE_FORMATS                = 0x86A2
	COMPRESSED_TEXTURE_FORMATS                    = 0x86A3
	CLAMP_TO_BORDER                               = 0x812D
	VERSION_1_4                                   = 1
	BLEND_DST_RGB                                 = 0x80C8
	BLEND_SRC_RGB                                 = 0x80C9
	BLEND_DST_ALPHA                               = 0x80CA
	BLEND_SRC_ALPHA                               = 0x80CB
	POINT_FADE_THRESHOLD_SIZE                     = 0x8128
	DEPTH_COMPONENT16                             = 0x81A5
	DEPTH_COMPONENT24                             = 0x81A6
	DEPTH_COMPONENT32                             = 0x81A7
	MIRRORED_REPEAT                               = 0x8370
	MAX_TEXTURE_LOD_BIAS                          = 0x84FD
	TEXTURE_LOD_BIAS                              = 0x8501
	INCR_WRAP                                     = 0x8507
	DECR_WRAP                                     = 0x8508
	TEXTURE_DEPTH_SIZE                            = 0x884A
	TEXTURE_COMPARE_MODE                          = 0x884C
	TEXTURE_COMPARE_FUNC                          = 0x884D
	FUNC_ADD                                      = 0x8006
	FUNC_SUBTRACT                                 = 0x800A
	FUNC_REVERSE_SUBTRACT                         = 0x800B
	MIN                                           = 0x8007
	MAX                                           = 0x8008
	CONSTANT_COLOR                                = 0x8001
	ONE_MINUS_CONSTANT_COLOR                      = 0x8002
	CONSTANT_ALPHA                                = 0x8003
	ONE_MINUS_CONSTANT_ALPHA                      = 0x8004
	VERSION_1_5                                   = 1
	BUFFER_SIZE                                   = 0x8764
	BUFFER_USAGE                                  = 0x8765
	QUERY_COUNTER_BITS                            = 0x8864
	CURRENT_QUERY                                 = 0x8865
	QUERY_RESULT                                  = 0x8866
	QUERY_RESULT_AVAILABLE                        = 0x8867
	ARRAY_BUFFER                                  = 0x8892
	ELEMENT_ARRAY_BUFFER                          = 0x8893
	ARRAY_BUFFER_BINDING                          = 0x8894
	ELEMENT_ARRAY_BUFFER_BINDING                  = 0x8895
	VERTEX_ATTRIB_ARRAY_BUFFER_BINDING            = 0x889F
	READ_ONLY                                     = 0x88B8
	WRITE_ONLY                                    = 0x88B9
	READ_WRITE                                    = 0x88BA
	BUFFER_ACCESS                                 = 0x88BB
	BUFFER_MAPPED                                 = 0x88BC
	BUFFER_MAP_POINTER                            = 0x88BD
	STREAM_DRAW                                   = 0x88E0
	STREAM_READ                                   = 0x88E1
	STREAM_COPY                                   = 0x88E2
	STATIC_DRAW                                   = 0x88E4
	STATIC_READ                                   = 0x88E5
	STATIC_COPY                                   = 0x88E6
	DYNAMIC_DRAW                                  = 0x88E8
	DYNAMIC_READ                                  = 0x88E9
	DYNAMIC_COPY                                  = 0x88EA
	SAMPLES_PASSED                                = 0x8914
	SRC1_ALPHA                                    = 0x8589
	VERSION_2_0                                   = 1
	BLEND_EQUATION_RGB                            = 0x8009
	VERTEX_ATTRIB_ARRAY_ENABLED                   = 0x8622
	VERTEX_ATTRIB_ARRAY_SIZE                      = 0x8623
	VERTEX_ATTRIB_ARRAY_STRIDE                    = 0x8624
	VERTEX_ATTRIB_ARRAY_TYPE                      = 0x8625
	CURRENT_VERTEX_ATTRIB                         = 0x8626
	VERTEX_PROGRAM_POINT_SIZE                     = 0x8642
	VERTEX_ATTRIB_ARRAY_POINTER                   = 0x8645
	STENCIL_BACK_FUNC                             = 0x8800
	STENCIL_BACK_FAIL                             = 0x8801
	STENCIL_BACK_PASS_DEPTH_FAIL                  = 0x8802
	STENCIL_BACK_PASS_DEPTH_PASS                  = 0x8803
	MAX_DRAW_BUFFERS                              = 0x8824
	DRAW_BUFFER0                                  = 0x8825
	DRAW_BUFFER1                                  = 0x8826
	DRAW_BUFFER2                                  = 0x8827
	DRAW_BUFFER3                                  = 0x8828
	DRAW_BUFFER4                                  = 0x8829
	DRAW_BUFFER5                                  = 0x882A
	DRAW_BUFFER6                                  = 0x882B
	DRAW_BUFFER7                                  = 0x882C
	DRAW_BUFFER8                                  = 0x882D
	DRAW_BUFFER9                                  = 0x882E
	DRAW_BUFFER10                                 = 0x882F
	DRAW_BUFFER11                                 = 0x8830
	DRAW_BUFFER12                                 = 0x8831
	DRAW_BUFFER13                                 = 0x8832
	DRAW_BUFFER14                                 = 0x8833
	DRAW_BUFFER15                                 = 0x8834
	BLEND_EQUATION_ALPHA                          = 0x883D
	MAX_VERTEX_ATTRIBS                            = 0x8869
	VERTEX_ATTRIB_ARRAY_NORMALIZED                = 0x886A
	MAX_TEXTURE_IMAGE_UNITS                       = 0x8872
	FRAGMENT_SHADER                               = 0x8B30
	VERTEX_SHADER                                 = 0x8B31
	MAX_FRAGMENT_UNIFORM_COMPONENTS               = 0x8B49
	MAX_VERTEX_UNIFORM_COMPONENTS                 = 0x8B4A
	MAX_VARYING_FLOATS                            = 0x8B4B
	MAX_VERTEX_TEXTURE_IMAGE_UNITS                = 0x8B4C
	MAX_COMBINED_TEXTURE_IMAGE_UNITS              = 0x8B4D
	SHADER_TYPE                                   = 0x8B4F
	FLOAT_VEC2                                    = 0x8B50
	FLOAT_VEC3                                    = 0x8B51
	FLOAT_VEC4                                    = 0x8B52
	INT_VEC2                                      = 0x8B53
	INT_VEC3                                      = 0x8B54
	INT_VEC4                                      = 0x8B55
	BOOL                                          = 0x8B56
	BOOL_VEC2                                     = 0x8B57
	BOOL_VEC3                                     = 0x8B58
	BOOL_VEC4                                     = 0x8B59
	FLOAT_MAT2                                    = 0x8B5A
	FLOAT_MAT3                                    = 0x8B5B
	FLOAT_MAT4                                    = 0x8B5C
	SAMPLER_1D                                    = 0x8B5D
	SAMPLER_2D                                    = 0x8B5E
	SAMPLER_3D                                    = 0x8B5F
	SAMPLER_CUBE                                  = 0x8B60
	SAMPLER_1D_SHADOW                             = 0x8B61
	SAMPLER_2D_SHADOW                             = 0x8B62
	DELETE_STATUS                                 = 0x8B80
	COMPILE_STATUS                                = 0x8B81
	LINK_STATUS                                   = 0x8B82
	VALIDATE_STATUS                               = 0x8B83
	INFO_LOG_LENGTH                               = 0x8B84
	ATTACHED_SHADERS                              = 0x8B85
	ACTIVE_UNIFORMS                               = 0x8B86
	ACTIVE_UNIFORM_MAX_LENGTH                     = 0x8B87
	SHADER_SOURCE_LENGTH                          = 0x8B88
	ACTIVE_ATTRIBUTES                             = 0x8B89
	ACTIVE_ATTRIBUTE_MAX_LENGTH                   = 0x8B8A
	FRAGMENT_SHADER_DERIVATIVE_HINT               = 0x8B8B
	SHADING_LANGUAGE_VERSION                      = 0x8B8C
	CURRENT_PROGRAM                               = 0x8B8D
	POINT_SPRITE_COORD_ORIGIN                     = 0x8CA0
	LOWER_LEFT                                    = 0x8CA1
	UPPER_LEFT                                    = 0x8CA2
	STENCIL_BACK_REF                              = 0x8CA3
	STENCIL_BACK_VALUE_MASK                       = 0x8CA4
	STENCIL_BACK_WRITEMASK                        = 0x8CA5
	VERSION_2_1                                   = 1
	PIXEL_PACK_BUFFER                             = 0x88EB
	PIXEL_UNPACK_BUFFER                           = 0x88EC
	PIXEL_PACK_BUFFER_BINDING                     = 0x88ED
	PIXEL_UNPACK_BUFFER_BINDING                   = 0x88EF
	FLOAT_MAT2x3                                  = 0x8B65
	FLOAT_MAT2x4                                  = 0x8B66
	FLOAT_MAT3x2                                  = 0x8B67
	FLOAT_MAT3x4                                  = 0x8B68
	FLOAT_MAT4x2                                  = 0x8B69
	FLOAT_MAT4x3                                  = 0x8B6A
	SRGB                                          = 0x8C40
	SRGB8                                         = 0x8C41
	SRGB_ALPHA                                    = 0x8C42
	SRGB8_ALPHA8                                  = 0x8C43
	COMPRESSED_SRGB                               = 0x8C48
	COMPRESSED_SRGB_ALPHA                         = 0x8C49
	VERSION_3_0                                   = 1
	COMPARE_REF_TO_TEXTURE                        = 0x884E
	CLIP_DISTANCE0                                = 0x3000
	CLIP_DISTANCE1                                = 0x3001
	CLIP_DISTANCE2                                = 0x3002
	CLIP_DISTANCE3                                = 0x3003
	CLIP_DISTANCE4                                = 0x3004
	CLIP_DISTANCE5                                = 0x3005
	CLIP_DISTANCE6                                = 0x3006
	CLIP_DISTANCE7                                = 0x3007
	MAX_CLIP_DISTANCES                            = 0x0D32
	MAJOR_VERSION                                 = 0x821B
	MINOR_VERSION                                 = 0x821C
	NUM_EXTENSIONS                                = 0x821D
	CONTEXT_FLAGS                                 = 0x821E
	COMPRESSED_RED                                = 0x8225
	COMPRESSED_RG                                 = 0x8226
	CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT           = 0x00000001
	RGBA32F                                       = 0x8814
	RGB32F                                        = 0x8815
	RGBA16F                                       = 0x881A
	RGB16F                                        = 0x881B
	VERTEX_ATTRIB_ARRAY_INTEGER                   = 0x88FD
	MAX_ARRAY_TEXTURE_LAYERS                      = 0x88FF
	MIN_PROGRAM_TEXEL_OFFSET                      = 0x8904
	MAX_PROGRAM_TEXEL_OFFSET                      = 0x8905
	CLAMP_READ_COLOR                              = 0x891C
	FIXED_ONLY                                    = 0x891D
	MAX_VARYING_COMPONENTS                        = 0x8B4B
	TEXTURE_1D_ARRAY                              = 0x8C18
	PROXY_TEXTURE_1D_ARRAY                        = 0x8C19
	TEXTURE_2D_ARRAY                              = 0x8C1A
	PROXY_TEXTURE_2D_ARRAY                        = 0x8C1B
	TEXTURE_BINDING_1D_ARRAY                      = 0x8C1C
	TEXTURE_BINDING_2D_ARRAY                      = 0x8C1D
	R11F_G11F_B10F                                = 0x8C3A
	UNSIGNED_INT_10F_11F_11F_REV                  = 0x8C3B
	RGB9_E5                                       = 0x8C3D
	UNSIGNED_INT_5_9_9_9_REV                      = 0x8C3E
	TEXTURE_SHARED_SIZE                           = 0x8C3F
	TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH         = 0x8C76
	TRANSFORM_FEEDBACK_BUFFER_MODE                = 0x8C7F
	MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS    = 0x8C80
	TRANSFORM_FEEDBACK_VARYINGS                   = 0x8C83
	TRANSFORM_FEEDBACK_BUFFER_START               = 0x8C84
	TRANSFORM_FEEDBACK_BUFFER_SIZE                = 0x8C85
	PRIMITIVES_GENERATED                          = 0x8C87
	TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN         = 0x8C88
	RASTERIZER_DISCARD                            = 0x8C89
	MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS = 0x8C8A
	MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS       = 0x8C8B
	INTERLEAVED_ATTRIBS                           = 0x8C8C
	SEPARATE_ATTRIBS                              = 0x8C8D
	TRANSFORM_FEEDBACK_BUFFER                     = 0x8C8E
	TRANSFORM_FEEDBACK_BUFFER_BINDING             = 0x8C8F
	RGBA32UI                                      = 0x8D70
	RGB32UI                                       = 0x8D71
	RGBA16UI                                      = 0x8D76
	RGB16UI                                       = 0x8D77
	RGBA8UI                                       = 0x8D7C
	RGB8UI                                        = 0x8D7D
	RGBA32I                                       = 0x8D82
	RGB32I                                        = 0x8D83
	RGBA16I                                       = 0x8D88
	RGB16I                                        = 0x8D89
	RGBA8I                                        = 0x8D8E
	RGB8I                                         = 0x8D8F
	RED_INTEGER                                   = 0x8D94
	GREEN_INTEGER                                 = 0x8D95
	BLUE_INTEGER                                  = 0x8D96
	RGB_INTEGER                                   = 0x8D98
	RGBA_INTEGER                                  = 0x8D99
	BGR_INTEGER                                   = 0x8D9A
	BGRA_INTEGER                                  = 0x8D9B
	SAMPLER_1D_ARRAY                              = 0x8DC0
	SAMPLER_2D_ARRAY                              = 0x8DC1
	SAMPLER_1D_ARRAY_SHADOW                       = 0x8DC3
	SAMPLER_2D_ARRAY_SHADOW                       = 0x8DC4
	SAMPLER_CUBE_SHADOW                           = 0x8DC5
	UNSIGNED_INT_VEC2                             = 0x8DC6
	UNSIGNED_INT_VEC3                             = 0x8DC7
	UNSIGNED_INT_VEC4                             = 0x8DC8
	INT_SAMPLER_1D                                = 0x8DC9
	INT_SAMPLER_2D                                = 0x8DCA
	INT_SAMPLER_3D                                = 0x8DCB
	INT_SAMPLER_CUBE                              = 0x8DCC
	INT_SAMPLER_1D_ARRAY                          = 0x8DCE
	INT_SAMPLER_2D_ARRAY                          = 0x8DCF
	UNSIGNED_INT_SAMPLER_1D                       = 0x8DD1
	UNSIGNED_INT_SAMPLER_2D                       = 0x8DD2
	UNSIGNED_INT_SAMPLER_3D                       = 0x8DD3
	UNSIGNED_INT_SAMPLER_CUBE                     = 0x8DD4
	UNSIGNED_INT_SAMPLER_1D_ARRAY                 = 0x8DD6
	UNSIGNED_INT_SAMPLER_2D_ARRAY                 = 0x8DD7
	QUERY_WAIT                                    = 0x8E13
	QUERY_NO_WAIT                                 = 0x8E14
	QUERY_BY_REGION_WAIT                          = 0x8E15
	QUERY_BY_REGION_NO_WAIT                       = 0x8E16
	BUFFER_ACCESS_FLAGS                           = 0x911F
	BUFFER_MAP_LENGTH                             = 0x9120
	BUFFER_MAP_OFFSET                             = 0x9121
	DEPTH_COMPONENT32F                            = 0x8CAC
	DEPTH32F_STENCIL8                             = 0x8CAD
	FLOAT_32_UNSIGNED_INT_24_8_REV                = 0x8DAD
	INVALID_FRAMEBUFFER_OPERATION                 = 0x0506
	FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING         = 0x8210
	FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE         = 0x8211
	FRAMEBUFFER_ATTACHMENT_RED_SIZE               = 0x8212
	FRAMEBUFFER_ATTACHMENT_GREEN_SIZE             = 0x8213
	FRAMEBUFFER_ATTACHMENT_BLUE_SIZE              = 0x8214
	FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE             = 0x8215
	FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE             = 0x8216
	FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE           = 0x8217
	FRAMEBUFFER_DEFAULT                           = 0x8218
	FRAMEBUFFER_UNDEFINED                         = 0x8219
	DEPTH_STENCIL_ATTACHMENT                      = 0x821A
	MAX_RENDERBUFFER_SIZE                         = 0x84E8
	DEPTH_STENCIL                                 = 0x84F9
	UNSIGNED_INT_24_8                             = 0x84FA
	DEPTH24_STENCIL8                              = 0x88F0
	TEXTURE_STENCIL_SIZE                          = 0x88F1
	TEXTURE_RED_TYPE                              = 0x8C10
	TEXTURE_GREEN_TYPE                            = 0x8C11
	TEXTURE_BLUE_TYPE                             = 0x8C12
	TEXTURE_ALPHA_TYPE                            = 0x8C13
	TEXTURE_DEPTH_TYPE                            = 0x8C16
	UNSIGNED_NORMALIZED                           = 0x8C17
	FRAMEBUFFER_BINDING                           = 0x8CA6
	DRAW_FRAMEBUFFER_BINDING                      = 0x8CA6
	RENDERBUFFER_BINDING                          = 0x8CA7
	READ_FRAMEBUFFER                              = 0x8CA8
	DRAW_FRAMEBUFFER                              = 0x8CA9
	READ_FRAMEBUFFER_BINDING                      = 0x8CAA
	RENDERBUFFER_SAMPLES                          = 0x8CAB
	FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE            = 0x8CD0
	FRAMEBUFFER_ATTACHMENT_OBJECT_NAME            = 0x8CD1
	FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL          = 0x8CD2
	FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE  = 0x8CD3
	FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER          = 0x8CD4
	FRAMEBUFFER_COMPLETE                          = 0x8CD5
	FRAMEBUFFER_INCOMPLETE_ATTACHMENT             = 0x8CD6
	FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT     = 0x8CD7
	FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER            = 0x8CDB
	FRAMEBUFFER_INCOMPLETE_READ_BUFFER            = 0x8CDC
	FRAMEBUFFER_UNSUPPORTED                       = 0x8CDD
	MAX_COLOR_ATTACHMENTS                         = 0x8CDF
	COLOR_ATTACHMENT0                             = 0x8CE0
	COLOR_ATTACHMENT1                             = 0x8CE1
	COLOR_ATTACHMENT2                             = 0x8CE2
	COLOR_ATTACHMENT3                             = 0x8CE3
	COLOR_ATTACHMENT4                             = 0x8CE4
	COLOR_ATTACHMENT5                             = 0x8CE5
	COLOR_ATTACHMENT6                             = 0x8CE6
	COLOR_ATTACHMENT7                             = 0x8CE7
	COLOR_ATTACHMENT8                             = 0x8CE8
	COLOR_ATTACHMENT9                             = 0x8CE9
	COLOR_ATTACHMENT10                            = 0x8CEA
	COLOR_ATTACHMENT11                            = 0x8CEB
	COLOR_ATTACHMENT12                            = 0x8CEC
	COLOR_ATTACHMENT13                            = 0x8CED
	COLOR_ATTACHMENT14                            = 0x8CEE
	COLOR_ATTACHMENT15                            = 0x8CEF
	COLOR_ATTACHMENT16                            = 0x8CF0
	COLOR_ATTACHMENT17                            = 0x8CF1
	COLOR_ATTACHMENT18                            = 0x8CF2
	COLOR_ATTACHMENT19                            = 0x8CF3
	COLOR_ATTACHMENT20                            = 0x8CF4
	COLOR_ATTACHMENT21                            = 0x8CF5
	COLOR_ATTACHMENT22                            = 0x8CF6
	COLOR_ATTACHMENT23                            = 0x8CF7
	COLOR_ATTACHMENT24                            = 0x8CF8
	COLOR_ATTACHMENT25                            = 0x8CF9
	COLOR_ATTACHMENT26                            = 0x8CFA
	COLOR_ATTACHMENT27                            = 0x8CFB
	COLOR_ATTACHMENT28                            = 0x8CFC
	COLOR_ATTACHMENT29                            = 0x8CFD
	COLOR_ATTACHMENT30                            = 0x8CFE
	COLOR_ATTACHMENT31                            = 0x8CFF
	DEPTH_ATTACHMENT                              = 0x8D00
	STENCIL_ATTACHMENT                            = 0x8D20
	FRAMEBUFFER                                   = 0x8D40
	RENDERBUFFER                                  = 0x8D41
	RENDERBUFFER_WIDTH                            = 0x8D42
	RENDERBUFFER_HEIGHT                           = 0x8D43
	RENDERBUFFER_INTERNAL_FORMAT                  = 0x8D44
	STENCIL_INDEX1                                = 0x8D46
	STENCIL_INDEX4                                = 0x8D47
	STENCIL_INDEX8                                = 0x8D48
	STENCIL_INDEX16                               = 0x8D49
	RENDERBUFFER_RED_SIZE                         = 0x8D50
	RENDERBUFFER_GREEN_SIZE                       = 0x8D51
	RENDERBUFFER_BLUE_SIZE                        = 0x8D52
	RENDERBUFFER_ALPHA_SIZE                       = 0x8D53
	RENDERBUFFER_DEPTH_SIZE                       = 0x8D54
	RENDERBUFFER_STENCIL_SIZE                     = 0x8D55
	FRAMEBUFFER_INCOMPLETE_MULTISAMPLE            = 0x8D56
	MAX_SAMPLES                                   = 0x8D57
	FRAMEBUFFER_SRGB                              = 0x8DB9
	HALF_FLOAT                                    = 0x140B
	MAP_READ_BIT                                  = 0x0001
	MAP_WRITE_BIT                                 = 0x0002
	MAP_INVALIDATE_RANGE_BIT                      = 0x0004
	MAP_INVALIDATE_BUFFER_BIT                     = 0x0008
	MAP_FLUSH_EXPLICIT_BIT                        = 0x0010
	MAP_UNSYNCHRONIZED_BIT                        = 0x0020
	COMPRESSED_RED_RGTC1                          = 0x8DBB
	COMPRESSED_SIGNED_RED_RGTC1                   = 0x8DBC
	COMPRESSED_RG_RGTC2                           = 0x8DBD
	COMPRESSED_SIGNED_RG_RGTC2                    = 0x8DBE
	RG                                            = 0x8227
	RG_INTEGER                                    = 0x8228
	R8                                            = 0x8229
	R16                                           = 0x822A
	RG8                                           = 0x822B
	RG16                                          = 0x822C
	R16F                                          = 0x822D
	R32F                                          = 0x822E
	RG16F                                         = 0x822F
	RG32F                                         = 0x8230
	R8I                                           = 0x8231
	R8UI                                          = 0x8232
	R16I                                          = 0x8233
	R16UI                                         = 0x8234
	R32I                                          = 0x8235
	R32UI                                         = 0x8236
	RG8I                                          = 0x8237
	RG8UI                                         = 0x8238
	RG16I                                         = 0x8239
	RG16UI                                        = 0x823A
	RG32I                                         = 0x823B
	RG32UI                                        = 0x823C
	VERTEX_ARRAY_BINDING                          = 0x85B5
	VERSION_3_1                                   = 1
	SAMPLER_2D_RECT                               = 0x8B63
	SAMPLER_2D_RECT_SHADOW                        = 0x8B64
	SAMPLER_BUFFER                                = 0x8DC2
	INT_SAMPLER_2D_RECT                           = 0x8DCD
	INT_SAMPLER_BUFFER                            = 0x8DD0
	UNSIGNED_INT_SAMPLER_2D_RECT                  = 0x8DD5
	UNSIGNED_INT_SAMPLER_BUFFER                   = 0x8DD8
	TEXTURE_BUFFER                                = 0x8C2A
	MAX_TEXTURE_BUFFER_SIZE                       = 0x8C2B
	TEXTURE_BINDING_BUFFER                        = 0x8C2C
	TEXTURE_BUFFER_DATA_STORE_BINDING             = 0x8C2D
	TEXTURE_RECTANGLE                             = 0x84F5
	TEXTURE_BINDING_RECTANGLE                     = 0x84F6
	PROXY_TEXTURE_RECTANGLE                       = 0x84F7
	MAX_RECTANGLE_TEXTURE_SIZE                    = 0x84F8
	R8_SNORM                                      = 0x8F94
	RG8_SNORM                                     = 0x8F95
	RGB8_SNORM                                    = 0x8F96
	RGBA8_SNORM                                   = 0x8F97
	R16_SNORM                                     = 0x8F98
	RG16_SNORM                                    = 0x8F99
	RGB16_SNORM                                   = 0x8F9A
	RGBA16_SNORM                                  = 0x8F9B
	SIGNED_NORMALIZED                             = 0x8F9C
	PRIMITIVE_RESTART                             = 0x8F9D
	PRIMITIVE_RESTART_INDEX                       = 0x8F9E
	COPY_READ_BUFFER                              = 0x8F36
	COPY_WRITE_BUFFER                             = 0x8F37
	UNIFORM_BUFFER                                = 0x8A11
	UNIFORM_BUFFER_BINDING                        = 0x8A28
	UNIFORM_BUFFER_START                          = 0x8A29
	UNIFORM_BUFFER_SIZE                           = 0x8A2A
	MAX_VERTEX_UNIFORM_BLOCKS                     = 0x8A2B
	MAX_GEOMETRY_UNIFORM_BLOCKS                   = 0x8A2C
	MAX_FRAGMENT_UNIFORM_BLOCKS                   = 0x8A2D
	MAX_COMBINED_UNIFORM_BLOCKS                   = 0x8A2E
	MAX_UNIFORM_BUFFER_BINDINGS                   = 0x8A2F
	MAX_UNIFORM_BLOCK_SIZE                        = 0x8A30
	MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS        = 0x8A31
	MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS      = 0x8A32
	MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS      = 0x8A33
	UNIFORM_BUFFER_OFFSET_ALIGNMENT               = 0x8A34
	ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH          = 0x8A35
	ACTIVE_UNIFORM_BLOCKS                         = 0x8A36
	UNIFORM_TYPE                                  = 0x8A37
	UNIFORM_SIZE                                  = 0x8A38
	UNIFORM_NAME_LENGTH                           = 0x8A39
	UNIFORM_BLOCK_INDEX                           = 0x8A3A
	UNIFORM_OFFSET                                = 0x8A3B
	UNIFORM_ARRAY_STRIDE                          = 0x8A3C
	UNIFORM_MATRIX_STRIDE                         = 0x8A3D
	UNIFORM_IS_ROW_MAJOR                          = 0x8A3E
	UNIFORM_BLOCK_BINDING                         = 0x8A3F
	UNIFORM_BLOCK_DATA_SIZE                       = 0x8A40
	UNIFORM_BLOCK_NAME_LENGTH                     = 0x8A41
	UNIFORM_BLOCK_ACTIVE_UNIFORMS                 = 0x8A42
	UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES          = 0x8A43
	UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER     = 0x8A44
	UNIFORM_BLOCK_REFERENCED_BY_GEOMETRY_SHADER   = 0x8A45
	UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER   = 0x8A46
	INVALID_INDEX                                 = 0xFFFFFFFF
	VERSION_3_2                                   = 1
	CONTEXT_CORE_PROFILE_BIT                      = 0x00000001
	CONTEXT_COMPATIBILITY_PROFILE_BIT             = 0x00000002
	LINES_ADJACENCY                               = 0x000A
	LINE_STRIP_ADJACENCY                          = 0x000B
	TRIANGLES_ADJACENCY                           = 0x000C
	TRIANGLE_STRIP_ADJACENCY                      = 0x000D
	PROGRAM_POINT_SIZE                            = 0x8642
	MAX_GEOMETRY_TEXTURE_IMAGE_UNITS              = 0x8C29
	FRAMEBUFFER_ATTACHMENT_LAYERED                = 0x8DA7
	FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS          = 0x8DA8
	GEOMETRY_SHADER                               = 0x8DD9
	GEOMETRY_VERTICES_OUT                         = 0x8916
	GEOMETRY_INPUT_TYPE                           = 0x8917
	GEOMETRY_OUTPUT_TYPE                          = 0x8918
	MAX_GEOMETRY_UNIFORM_COMPONENTS               = 0x8DDF
	MAX_GEOMETRY_OUTPUT_VERTICES                  = 0x8DE0
	MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS          = 0x8DE1
	MAX_VERTEX_OUTPUT_COMPONENTS                  = 0x9122
	MAX_GEOMETRY_INPUT_COMPONENTS                 = 0x9123
	MAX_GEOMETRY_OUTPUT_COMPONENTS                = 0x9124
	MAX_FRAGMENT_INPUT_COMPONENTS                 = 0x9125
	CONTEXT_PROFILE_MASK                          = 0x9126
	DEPTH_CLAMP                                   = 0x864F
	QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION      = 0x8E4C
	FIRST_VERTEX_CONVENTION                       = 0x8E4D
	LAST_VERTEX_CONVENTION                        = 0x8E4E
	PROVOKING_VERTEX                              = 0x8E4F
	TEXTURE_CUBE_MAP_SEAMLESS                     = 0x884F
	MAX_SERVER_WAIT_TIMEOUT                       = 0x9111
	OBJECT_TYPE                                   = 0x9112
	SYNC_CONDITION                                = 0x9113
	SYNC_STATUS                                   = 0x9114
	SYNC_FLAGS                                    = 0x9115
	SYNC_FENCE                                    = 0x9116
	SYNC_GPU_COMMANDS_COMPLETE                    = 0x9117
	UNSIGNALED                                    = 0x9118
	SIGNALED                                      = 0x9119
	ALREADY_SIGNALED                              = 0x911A
	TIMEOUT_EXPIRED                               = 0x911B
	CONDITION_SATISFIED                           = 0x911C
	WAIT_FAILED                                   = 0x911D
	TIMEOUT_IGNORED                               = 0xFFFFFFFFFFFFFFFF
	SYNC_FLUSH_COMMANDS_BIT                       = 0x00000001
	SAMPLE_POSITION                               = 0x8E50
	SAMPLE_MASK                                   = 0x8E51
	SAMPLE_MASK_VALUE                             = 0x8E52
	MAX_SAMPLE_MASK_WORDS                         = 0x8E59
	TEXTURE_2D_MULTISAMPLE                        = 0x9100
	PROXY_TEXTURE_2D_MULTISAMPLE                  = 0x9101
	TEXTURE_2D_MULTISAMPLE_ARRAY                  = 0x9102
	PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY            = 0x9103
	TEXTURE_BINDING_2D_MULTISAMPLE                = 0x9104
	TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY          = 0x9105
	TEXTURE_SAMPLES                               = 0x9106
	TEXTURE_FIXED_SAMPLE_LOCATIONS                = 0x9107
	SAMPLER_2D_MULTISAMPLE                        = 0x9108
	INT_SAMPLER_2D_MULTISAMPLE                    = 0x9109
	UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE           = 0x910A
	SAMPLER_2D_MULTISAMPLE_ARRAY                  = 0x910B
	INT_SAMPLER_2D_MULTISAMPLE_ARRAY              = 0x910C
	UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY     = 0x910D
	MAX_COLOR_TEXTURE_SAMPLES                     = 0x910E
	MAX_DEPTH_TEXTURE_SAMPLES                     = 0x910F
	MAX_INTEGER_SAMPLES                           = 0x9110
	VERSION_3_3                                   = 1
	VERTEX_ATTRIB_ARRAY_DIVISOR                   = 0x88FE
	SRC1_COLOR                                    = 0x88F9
	ONE_MINUS_SRC1_COLOR                          = 0x88FA
	ONE_MINUS_SRC1_ALPHA                          = 0x88FB
	MAX_DUAL_SOURCE_DRAW_BUFFERS                  = 0x88FC
	ANY_SAMPLES_PASSED                            = 0x8C2F
	SAMPLER_BINDING                               = 0x8919
	RGB10_A2UI                                    = 0x906F
	TEXTURE_SWIZZLE_R                             = 0x8E42
	TEXTURE_SWIZZLE_G                             = 0x8E43
	TEXTURE_SWIZZLE_B                             = 0x8E44
	TEXTURE_SWIZZLE_A                             = 0x8E45
	TEXTURE_SWIZZLE_RGBA                          = 0x8E46
	TIME_ELAPSED                                  = 0x88BF
	TIMESTAMP                                     = 0x8E28
	INT_2_10_10_10_REV                            = 0x8D9F
)
View Source
const (
	Undefined = AttribType(iota)
	VertexPosition
	VertexNormal
	VertexTangent
	VertexColor
	VertexTexcoord
	VertexTexcoord2
	SkinWeight
	SkinIndex
)
View Source
const (
	FloatSize = int32(unsafe.Sizeof(float32(0)))
)

Variables

This section is empty.

Functions

func FormatSource

func FormatSource(source string) string

FormatSource returns the supplied program source code with line numbers prepended.

Types

type AttribType

type AttribType int

AttribType is the functional type of a vbo attribute.

type GLS

type GLS struct {
	// contains filtered or unexported fields
}

GLS encapsulates the state of an OpenGL context and contains methods to call OpenGL functions.

func New

func New() (*GLS, error)

New creates and returns a new instance of a GLS object, which encapsulates the state of an OpenGL context. This should be called only after an active OpenGL context is established, such as by creating a new window.

func (*GLS) ActiveTexture

func (gs *GLS) ActiveTexture(texture uint32)

ActiveTexture selects which texture unit subsequent texture state calls will affect. The number of texture units an implementation supports is implementation dependent, but must be at least 48 in GL 3.3.

func (*GLS) AttachShader

func (gs *GLS) AttachShader(program, shader uint32)

AttachShader attaches the specified shader object to the specified program object.

func (*GLS) BindBuffer

func (gs *GLS) BindBuffer(target int, vbo uint32)

BindBuffer binds a buffer object to the specified buffer binding point.

func (*GLS) BindFramebuffer

func (gs *GLS) BindFramebuffer(fb uint32)

BindFramebuffer sets the current framebuffer.

func (*GLS) BindRenderbuffer

func (gs *GLS) BindRenderbuffer(rb uint32)

BindRenderbuffer sets the current render buffer.

func (*GLS) BindTexture

func (gs *GLS) BindTexture(target int, tex uint32)

BindTexture lets you create or use a named texture.

func (*GLS) BindVertexArray

func (gs *GLS) BindVertexArray(vao uint32)

BindVertexArray binds the vertex array object.

func (*GLS) BlendEquation

func (gs *GLS) BlendEquation(mode uint32)

BlendEquation sets the blend equations for all draw buffers.

func (*GLS) BlendEquationSeparate

func (gs *GLS) BlendEquationSeparate(modeRGB uint32, modeAlpha uint32)

BlendEquationSeparate sets the blend equations for all draw buffers allowing different equations for the RGB and alpha components.

func (*GLS) BlendFunc

func (gs *GLS) BlendFunc(sfactor, dfactor uint32)

BlendFunc defines the operation of blending for all draw buffers when blending is enabled.

func (*GLS) BlendFuncSeparate

func (gs *GLS) BlendFuncSeparate(srcRGB uint32, dstRGB uint32, srcAlpha uint32, dstAlpha uint32)

BlendFuncSeparate defines the operation of blending for all draw buffers when blending is enabled, allowing different operations for the RGB and alpha components.

func (*GLS) BufferData

func (gs *GLS) BufferData(target uint32, size int, data interface{}, usage uint32)

BufferData creates a new data store for the buffer object currently bound to target, deleting any pre-existing data store.

func (*GLS) CheckErrors

func (gs *GLS) CheckErrors() bool

CheckErrors returns if error checking is enabled or not.

func (*GLS) CheckFramebufferStatus

func (gs *GLS) CheckFramebufferStatus() uint32

CheckFramebufferStatus get the framebuffer status

func (*GLS) Clear

func (gs *GLS) Clear(mask uint)

Clear sets the bitplane area of the window to values previously selected by ClearColor, ClearDepth, and ClearStencil.

func (*GLS) ClearColor

func (gs *GLS) ClearColor(r, g, b, a float32)

ClearColor specifies the red, green, blue, and alpha values used by glClear to clear the color buffers.

func (*GLS) ClearDepth

func (gs *GLS) ClearDepth(v float32)

ClearDepth specifies the depth value used by Clear to clear the depth buffer.

func (*GLS) ClearStencil

func (gs *GLS) ClearStencil(v int32)

ClearStencil specifies the index used by Clear to clear the stencil buffer.

func (*GLS) CompileShader

func (gs *GLS) CompileShader(shader uint32)

CompileShader compiles the source code strings that have been stored in the specified shader object.

func (*GLS) CompressedTexImage2D

func (gs *GLS) CompressedTexImage2D(target uint32, level uint32, iformat uint32, width int32, height int32, size int32, data interface{})

CompressedTexImage2D specifies a two-dimensional compressed texture image.

func (*GLS) CreateProgram

func (gs *GLS) CreateProgram() uint32

CreateProgram creates an empty program object and returns a non-zero value by which it can be referenced.

func (*GLS) CreateShader

func (gs *GLS) CreateShader(stype uint32) uint32

CreateShader creates an empty shader object and returns a non-zero value by which it can be referenced.

func (*GLS) CullFace

func (gs *GLS) CullFace(mode uint32)

CullFace specifies whether front- or back-facing facets can be culled.

func (*GLS) DeleteBuffers

func (gs *GLS) DeleteBuffers(bufs ...uint32)

DeleteBuffers deletes n​buffer objects named by the elements of the provided array.

func (*GLS) DeleteProgram

func (gs *GLS) DeleteProgram(program uint32)

DeleteProgram frees the memory and invalidates the name associated with the specified program object.

func (*GLS) DeleteShader

func (gs *GLS) DeleteShader(shader uint32)

DeleteShader frees the memory and invalidates the name associated with the specified shader object.

func (*GLS) DeleteTextures

func (gs *GLS) DeleteTextures(tex ...uint32)

DeleteTextures deletes n​textures named by the elements of the provided array.

func (*GLS) DeleteVertexArrays

func (gs *GLS) DeleteVertexArrays(vaos ...uint32)

DeleteVertexArrays deletes n​vertex array objects named by the elements of the provided array.

func (*GLS) DepthFunc

func (gs *GLS) DepthFunc(mode uint32)

DepthFunc specifies the function used to compare each incoming pixel depth value with the depth value present in the depth buffer.

func (*GLS) DepthMask

func (gs *GLS) DepthMask(flag bool)

DepthMask enables or disables writing into the depth buffer.

func (*GLS) Disable

func (gs *GLS) Disable(cap int)

Disable disables the specified capability.

func (*GLS) DrawArrays

func (gs *GLS) DrawArrays(mode uint32, first int32, count int32)

DrawArrays renders primitives from array data.

func (*GLS) DrawBuffer

func (gs *GLS) DrawBuffer(mode uint)

DrawBuffer sets which color buffers are to be drawn into. Mode is one of NONE, FRONT_LEFT, FRONT_RIGHT, BACK_LEFT, BACK_RIGHT, FRONT, BACK, LEFT, RIGHT, and FRONT_AND_BACK.

func (*GLS) DrawElements

func (gs *GLS) DrawElements(mode uint32, count int32, itype uint32, start uint32)

DrawElements renders primitives from array data.

func (*GLS) Enable

func (gs *GLS) Enable(cap int)

Enable enables the specified capability.

func (*GLS) EnableVertexAttribArray

func (gs *GLS) EnableVertexAttribArray(index uint32)

EnableVertexAttribArray enables a generic vertex attribute array.

func (*GLS) FramebufferRenderbuffer

func (gs *GLS) FramebufferRenderbuffer(attachment uint, rb uint32)

FramebufferRenderbuffer attaches a renderbuffer object to the bound framebuffer object. Attachment is one of COLOR_ATTACHMENT0, DEPTH_ATTACHMENT, or STENCIL_ATTACHMENT.

func (*GLS) FramebufferTexture

func (gs *GLS) FramebufferTexture(attachment uint, tex uint32)

FramebufferTexture attaches a level of a texture object as a logical buffer of a framebuffer object.

func (*GLS) FramebufferTexture1D

func (gs *GLS) FramebufferTexture1D(attachment uint, textarget uint, tex uint32)

FramebufferTexture1D attaches a level of a texture object as a logical buffer to the currently bound framebuffer object

func (*GLS) FramebufferTexture2D

func (gs *GLS) FramebufferTexture2D(attachment uint, textarget uint, tex uint32)

FramebufferTexture2D attaches a level of a texture object as a logical buffer to the currently bound framebuffer object

func (*GLS) FramebufferTexture3D

func (gs *GLS) FramebufferTexture3D(attachment uint, textarget uint, tex uint32, layer int)

FramebufferTexture3D attaches a level of a texture object as a logical buffer to the currently bound framebuffer object

func (*GLS) FrontFace

func (gs *GLS) FrontFace(mode uint32)

FrontFace defines front- and back-facing polygons.

func (*GLS) GenBuffer

func (gs *GLS) GenBuffer() uint32

GenBuffer generates a ​buffer object name.

func (*GLS) GenFramebuffer

func (gs *GLS) GenFramebuffer() uint32

GenFramebuffer creates a new framebuffer. Framebuffers store (usually two) render buffers.

func (*GLS) GenRenderbuffer

func (gs *GLS) GenRenderbuffer() uint32

GenRenderbuffer creates a new render buffer.

func (*GLS) GenTexture

func (gs *GLS) GenTexture() uint32

GenTexture generates a texture object name.

func (*GLS) GenVertexArray

func (gs *GLS) GenVertexArray() uint32

GenVertexArray generates a vertex array object name.

func (*GLS) GenerateMipmap

func (gs *GLS) GenerateMipmap(target uint32)

GenerateMipmap generates mipmaps for the specified texture target.

func (*GLS) GetAttribLocation

func (gs *GLS) GetAttribLocation(program uint32, name string) int32

GetAttribLocation returns the location of the specified attribute variable.

func (*GLS) GetProgramInfoLog

func (gs *GLS) GetProgramInfoLog(program uint32) string

GetProgramInfoLog returns the information log for the specified program object.

func (*GLS) GetProgramiv

func (gs *GLS) GetProgramiv(program, pname uint32, params *int32)

GetProgramiv returns the specified parameter from the specified program object.

func (*GLS) GetShaderInfoLog

func (gs *GLS) GetShaderInfoLog(shader uint32) string

GetShaderInfoLog returns the information log for the specified shader object.

func (*GLS) GetShaderiv

func (gs *GLS) GetShaderiv(shader, pname uint32, params *int32)

GetShaderiv returns the specified parameter from the specified shader object.

func (*GLS) GetString

func (gs *GLS) GetString(name uint32) string

GetString returns a string describing the specified aspect of the current GL connection.

func (*GLS) GetUniformLocation

func (gs *GLS) GetUniformLocation(program uint32, name string) int32

GetUniformLocation returns the location of a uniform variable for the specified program.

func (*GLS) GetViewport

func (gs *GLS) GetViewport() (x, y, width, height int32)

GetViewport returns the current viewport information.

func (*GLS) LineWidth

func (gs *GLS) LineWidth(width float32)

LineWidth specifies the rasterized width of both aliased and antialiased lines.

func (*GLS) LinkProgram

func (gs *GLS) LinkProgram(program uint32)

LinkProgram links the specified program object.

func (*GLS) NewProgram

func (gs *GLS) NewProgram() *Program

NewProgram creates and returns a new empty shader program object. Use this type methods to add shaders and build the final program.

func (*GLS) PolygonMode

func (gs *GLS) PolygonMode(face, mode uint32)

PolygonMode controls the interpretation of polygons for rasterization.

func (*GLS) PolygonOffset

func (gs *GLS) PolygonOffset(factor float32, units float32)

PolygonOffset sets the scale and units used to calculate depth values.

func (*GLS) ReadBuffer

func (gs *GLS) ReadBuffer(attachment uint)

ReadBuffer sets the buffer for reading using ReadPixels. Attachment is one of COLOR_ATTACHMENT0, DEPTH_ATTACHMENT, or STENCIL_ATTACHMENT.

func (*GLS) ReadPixels

func (gs *GLS) ReadPixels(x, y, width, height, format, formatType int) []byte

ReadPixels returns the current rendered image. x, y: specifies the window coordinates of the first pixel that is read from the frame buffer. width, height: specifies the dimensions of the pixel rectangle. format: specifies the format of the pixel data. format_type: specifies the data type of the pixel data. more information: http://docs.gl/gl3/glReadPixels

func (*GLS) RenderbufferStorage

func (gs *GLS) RenderbufferStorage(format uint, width int, height int)

RenderbufferStorage allocates space for the bound render buffer. Format is the internal storage format, e.g. RGBA32F

func (*GLS) Scissor

func (gs *GLS) Scissor(x, y int32, width, height uint32)

Scissor defines the scissor box rectangle in window coordinates.

func (*GLS) SetCheckErrors

func (gs *GLS) SetCheckErrors(enable bool)

SetCheckErrors enables/disables checking for errors after the call of any OpenGL function. It is enabled by default but could be disabled after an application is stable to improve the performance.

func (*GLS) ShaderSource

func (gs *GLS) ShaderSource(shader uint32, src string)

ShaderSource sets the source code for the specified shader object.

func (*GLS) Stats

func (gs *GLS) Stats(s *Stats)

Stats copy the current values of the internal statistics structure to the specified pointer.

func (*GLS) StencilFunc

func (gs *GLS) StencilFunc(mode uint32, ref int32, mask uint32)

func (*GLS) StencilMask

func (gs *GLS) StencilMask(mask uint32)

TODO doc StencilMask enables or disables writing into the stencil buffer.

func (*GLS) StencilOp

func (gs *GLS) StencilOp(fail, zfail, zpass uint32)

func (*GLS) TexImage2D

func (gs *GLS) TexImage2D(target uint32, level int32, iformat int32, width int32, height int32, format uint32, itype uint32, data interface{})

TexImage2D specifies a two-dimensional texture image.

func (*GLS) TexParameteri

func (gs *GLS) TexParameteri(target uint32, pname uint32, param int32)

TexParameteri sets the specified texture parameter on the specified texture.

func (*GLS) Uniform1f

func (gs *GLS) Uniform1f(location int32, v0 float32)

Uniform1f sets the value of a float uniform variable for the current program object.

func (*GLS) Uniform1fv

func (gs *GLS) Uniform1fv(location int32, count int32, v *float32)

Uniform1fv sets the value of one or many float uniform variables for the current program object.

func (*GLS) Uniform1i

func (gs *GLS) Uniform1i(location int32, v0 int32)

Uniform1i sets the value of an int uniform variable for the current program object.

func (*GLS) Uniform2f

func (gs *GLS) Uniform2f(location int32, v0, v1 float32)

Uniform2f sets the value of a vec2 uniform variable for the current program object.

func (*GLS) Uniform2fv

func (gs *GLS) Uniform2fv(location int32, count int32, v *float32)

Uniform2fv sets the value of one or many vec2 uniform variables for the current program object.

func (*GLS) Uniform3f

func (gs *GLS) Uniform3f(location int32, v0, v1, v2 float32)

Uniform3f sets the value of a vec3 uniform variable for the current program object.

func (*GLS) Uniform3fv

func (gs *GLS) Uniform3fv(location int32, count int32, v *float32)

Uniform3fv sets the value of one or many vec3 uniform variables for the current program object.

func (*GLS) Uniform4f

func (gs *GLS) Uniform4f(location int32, v0, v1, v2, v3 float32)

Uniform4f sets the value of a vec4 uniform variable for the current program object.

func (*GLS) Uniform4fv

func (gs *GLS) Uniform4fv(location int32, count int32, v *float32)

Uniform4fv sets the value of one or many vec4 uniform variables for the current program object.

func (*GLS) UniformMatrix3fv

func (gs *GLS) UniformMatrix3fv(location int32, count int32, transpose bool, pm *float32)

UniformMatrix3fv sets the value of one or many 3x3 float matrices for the current program object.

func (*GLS) UniformMatrix4fv

func (gs *GLS) UniformMatrix4fv(location int32, count int32, transpose bool, pm *float32)

UniformMatrix4fv sets the value of one or many 4x4 float matrices for the current program object.

func (*GLS) UseProgram

func (gs *GLS) UseProgram(prog *Program)

UseProgram sets the specified program as the current program.

func (*GLS) VertexAttribPointer

func (gs *GLS) VertexAttribPointer(index uint32, size int32, xtype uint32, normalized bool, stride int32, offset uint32)

VertexAttribPointer defines an array of generic vertex attribute data.

func (*GLS) Viewport

func (gs *GLS) Viewport(x, y, width, height int32)

Viewport sets the viewport.

type Program

type Program struct {
	ShowSource bool // Show source code in error messages
	// contains filtered or unexported fields
}

Program represents an OpenGL program. It must have Vertex and Fragment shaders. It can also have a Geometry shader.

func (*Program) AddShader

func (prog *Program) AddShader(stype uint32, source string)

AddShader adds a shader to this program. This must be done before the program is built.

func (*Program) Build

func (prog *Program) Build() error

Build builds the program, compiling and linking the previously supplied shaders.

func (*Program) CompileShader

func (prog *Program) CompileShader(stype uint32, source string) (uint32, error)

CompileShader creates and compiles an OpenGL shader of the specified type, with the specified source code, and returns a non-zero value by which it can be referenced.

func (*Program) DeleteShaders

func (prog *Program) DeleteShaders()

DeleteShaders deletes all of this program's shaders from OpenGL.

func (*Program) GetAttribLocation

func (prog *Program) GetAttribLocation(name string) int32

GetAttribLocation returns the location of the specified attribute in this program. This location is internally cached.

func (*Program) GetUniformLocation

func (prog *Program) GetUniformLocation(name string) int32

GetUniformLocation returns the location of the specified uniform in this program. This location is internally cached.

func (*Program) Handle

func (prog *Program) Handle() uint32

Handle returns the OpenGL handle of this program.

type ShaderDefines

type ShaderDefines map[string]string

ShaderDefines is a store of shader defines ("#define <key> <value>").

func NewShaderDefines

func NewShaderDefines() *ShaderDefines

NewShaderDefines creates and returns a pointer to a ShaderDefines object.

func (*ShaderDefines) Add

func (sd *ShaderDefines) Add(other *ShaderDefines)

Add adds to this ShaderDefines all the key-value pairs in the specified ShaderDefines.

func (*ShaderDefines) Equals

func (sd *ShaderDefines) Equals(other *ShaderDefines) bool

Equals compares two ShaderDefines and return true if they contain the same key-value pairs.

func (*ShaderDefines) Set

func (sd *ShaderDefines) Set(name, value string)

Set sets a shader define with the specified value.

func (*ShaderDefines) Unset

func (sd *ShaderDefines) Unset(name string)

Unset removes the specified name from the shader defines.

type Stats

type Stats struct {
	Shaders    int    // Current number of shader programs
	Vaos       int    // Number of Vertex Array Objects
	Buffers    int    // Number of Buffer Objects
	Textures   int    // Number of Textures
	Caphits    uint64 // Cumulative number of hits for Enable/Disable
	UnilocHits uint64 // Cumulative number of uniform location cache hits
	UnilocMiss uint64 // Cumulative number of uniform location cache misses
	Unisets    uint64 // Cumulative number of uniform sets
	Drawcalls  uint64 // Cumulative number of draw calls
	Fbos       uint64 // Number of frame buffer objects
	Rbos       uint64 // Number of render buffer objects
}

Stats contains counters of WebGL resources being used as well the cumulative numbers of some WebGL calls for performance evaluation.

type Uniform

type Uniform struct {
	// contains filtered or unexported fields
}

Uniform represents an OpenGL uniform.

func (*Uniform) Init

func (u *Uniform) Init(name string)

Init initializes this uniform location cache and sets its name.

func (*Uniform) Location

func (u *Uniform) Location(gs *GLS) int32

Location returns the location of this uniform for the current shader program. The returned location can be -1 if not found.

func (*Uniform) LocationIdx

func (u *Uniform) LocationIdx(gs *GLS, idx int32) int32

LocationIdx returns the location of this indexed uniform for the current shader program. The returned location can be -1 if not found.

func (*Uniform) Name

func (u *Uniform) Name() string

Name returns the uniform name.

type VBO

type VBO struct {
	// contains filtered or unexported fields
}

VBO abstracts an OpenGL Vertex Buffer Object.

func NewVBO

func NewVBO(buffer math32.ArrayF32) *VBO

NewVBO creates and returns a pointer to a new OpenGL Vertex Buffer Object.

func (*VBO) AddAttrib

func (vbo *VBO) AddAttrib(atype AttribType) *VBO

AddAttrib adds a new attribute to the VBO with the specified type. The attribute's ByteOffset is computed automatically based on the existing attributes.

func (*VBO) AddAttribOffset

func (vbo *VBO) AddAttribOffset(atype AttribType, byteOffset uint32) *VBO

AddAttribOffset adds a new attribute to the VBO with the specified type and byteOffset.

func (*VBO) AddCustomAttrib

func (vbo *VBO) AddCustomAttrib(name string, itemSize int32) *VBO

AddCustomAttrib adds a new attribute to the VBO with the specified name and itemSize.

func (*VBO) AddCustomAttribOffset

func (vbo *VBO) AddCustomAttribOffset(name string, itemSize int32, byteOffset uint32) *VBO

AddCustomAttribOffset adds a new attribute to the VBO with the specified name, itemSize and byteOffset.

func (*VBO) Attrib

func (vbo *VBO) Attrib(atype AttribType) *VBOattrib

Attrib finds and returns a pointer to the VBO attribute with the specified type. Returns nil if not found.

func (*VBO) AttribAt

func (vbo *VBO) AttribAt(idx int) *VBOattrib

AttribAt returns a pointer to the VBO attribute at the specified index.

func (*VBO) AttribCount

func (vbo *VBO) AttribCount() int

AttribCount returns the current number of attributes for this VBO.

func (*VBO) AttribName

func (vbo *VBO) AttribName(name string) *VBOattrib

AttribName finds and returns a pointer to the VBO attribute with the specified name. Returns nil if not found.

func (*VBO) AttribOffset

func (vbo *VBO) AttribOffset(attribType AttribType) int

AttribOffset returns the total number of elements from all attributes preceding the attribute specified by type.

func (*VBO) AttribOffsetName

func (vbo *VBO) AttribOffsetName(name string) int

AttribOffsetName returns the total number of elements from all attributes preceding the attribute specified by name.

func (*VBO) Attributes

func (vbo *VBO) Attributes() []VBOattrib

Attributes returns the attributes for this VBO.

func (*VBO) Buffer

func (vbo *VBO) Buffer() *math32.ArrayF32

Buffer returns a pointer to the VBO buffer.

func (*VBO) Dispose

func (vbo *VBO) Dispose()

Dispose disposes of the OpenGL resources used by the VBO. As currently the VBO is used only by Geometry objects it is not referenced counted.

func (*VBO) OperateOnVectors3

func (vbo *VBO) OperateOnVectors3(attribType AttribType, cb func(vec *math32.Vector3) bool)

OperateOnVectors3 iterates over all 3-float32 items for the specified attribute and calls the specified callback function with a pointer to each item as a Vector3. The vector pointers can be modified inside the callback and the modifications will be applied to the buffer at each iteration. The callback function returns false to continue or true to break.

func (*VBO) ReadTripleVectors3

func (vbo *VBO) ReadTripleVectors3(attribType AttribType, cb func(vec1, vec2, vec3 math32.Vector3) bool)

Read3Vectors3 iterates over all 3-float32 items (3 items at a time) for the specified attribute and calls the specified callback function with the value of each of the 3 items as Vector3. The callback function returns false to continue or true to break.

func (*VBO) ReadVectors3

func (vbo *VBO) ReadVectors3(attribType AttribType, cb func(vec math32.Vector3) bool)

ReadVectors3 iterates over all 3-float32 items for the specified attribute and calls the specified callback function with the value of each item as a Vector3. The callback function returns false to continue or true to break.

func (*VBO) SetBuffer

func (vbo *VBO) SetBuffer(buffer math32.ArrayF32) *VBO

SetBuffer sets the VBO buffer.

func (*VBO) SetUsage

func (vbo *VBO) SetUsage(usage uint32)

SetUsage sets the expected usage pattern of the buffer. The default value is GL_STATIC_DRAW.

func (*VBO) Stride

func (vbo *VBO) Stride() int

Stride returns the stride of the VBO, which is the number of elements in one complete set of group attributes. E.g. for an interleaved VBO with two attributes: "VertexPosition" (3 elements) and "VertexTexcoord" (2 elements), the stride would be 5: [X, Y, Z, U, V], X, Y, Z, U, V, X, Y, Z, U, V... X, Y, Z, U, V.

func (*VBO) StrideSize

func (vbo *VBO) StrideSize() int

StrideSize returns the number of bytes used by one complete set of group attributes. E.g. for an interleaved VBO with two attributes: "VertexPosition" (3 elements) and "VertexTexcoord" (2 elements), the stride would be 5: [X, Y, Z, U, V], X, Y, Z, U, V, X, Y, Z, U, V... X, Y, Z, U, V and the stride size would be: sizeof(float)*stride = 4*5 = 20

func (*VBO) Transfer

func (vbo *VBO) Transfer(gs *GLS)

Transfer (called internally) transfers the data from the VBO buffer to OpenGL if necessary.

func (*VBO) Update

func (vbo *VBO) Update()

Update sets the update flag to force the VBO update.

type VBOattrib

type VBOattrib struct {
	Type        AttribType // Type of the attribute
	Name        string     // Name of the attribute
	ByteOffset  uint32     // Byte offset from the start of the VBO
	NumElements int32      // Number of elements
	ElementType uint32     // Type of the element (e.g. FLOAT, INT, UNSIGNED_SHORT, etc...)
}

VBOattrib describes one attribute of an OpenGL Vertex Buffer Object.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL