gls

package
v0.0.0-...-c2c5ea0 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2017 License: BSD-2-Clause Imports: 12 Imported by: 0

Documentation

Overview

Copyright 2016 The G3N Authors. All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.

This file was generated automatically by "glapi2go" and contains all OpenGL constants specified by "#define GL_*" directives contained in "glcorearb.h" for an specific OpenGL version converted to Go constants.

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.

Copyright 2016 The G3N Authors. All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.

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 (
	FrontSide = iota + 1
	BackSide
	DoubleSide
)

Polygon side view.

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 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 an GLS object which encapsulates the state of an OpenGL context This should be called only after an active OpenGL context was established, such as by creating a new window.

func (*GLS) ActiveTexture

func (gs *GLS) ActiveTexture(texture uint32)

func (*GLS) AttachShader

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

func (*GLS) BindBuffer

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

func (*GLS) BindTexture

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

func (*GLS) BindVertexArray

func (gs *GLS) BindVertexArray(vao uint32)

func (*GLS) BlendEquation

func (gs *GLS) BlendEquation(mode uint32)

func (*GLS) BlendEquationSeparate

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

func (*GLS) BlendFunc

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

func (*GLS) BlendFuncSeparate

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

func (*GLS) BufferData

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

func (*GLS) CheckErrors

func (gs *GLS) CheckErrors() bool

ChecksErrors returns if error checking is enabled or not.

func (*GLS) Clear

func (gs *GLS) Clear(mask uint)

func (*GLS) ClearColor

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

func (*GLS) CompileShader

func (gs *GLS) CompileShader(shader uint32)

func (*GLS) CreateProgram

func (gs *GLS) CreateProgram() uint32

func (*GLS) CreateShader

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

func (*GLS) CullFace

func (gs *GLS) CullFace(mode uint32)

func (*GLS) DeleteBuffers

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

func (*GLS) DeleteProgram

func (gs *GLS) DeleteProgram(program uint32)

func (*GLS) DeleteShader

func (gs *GLS) DeleteShader(shader uint32)

func (*GLS) DeleteTextures

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

func (*GLS) DeleteVertexArrays

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

func (*GLS) DepthFunc

func (gs *GLS) DepthFunc(mode uint32)

func (*GLS) DepthMask

func (gs *GLS) DepthMask(flag bool)

func (*GLS) Disable

func (gs *GLS) Disable(cap int)

func (*GLS) DrawArrays

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

func (*GLS) DrawElements

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

func (*GLS) Enable

func (gs *GLS) Enable(cap int)

func (*GLS) EnableVertexAttribArray

func (gs *GLS) EnableVertexAttribArray(index uint32)

func (*GLS) FrontFace

func (gs *GLS) FrontFace(mode uint32)

func (*GLS) GenBuffer

func (gs *GLS) GenBuffer() uint32

func (*GLS) GenTexture

func (gs *GLS) GenTexture() uint32

func (*GLS) GenVertexArray

func (gs *GLS) GenVertexArray() uint32

func (*GLS) GenerateMipmap

func (gs *GLS) GenerateMipmap(target uint32)

func (*GLS) GetAttribLocation

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

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)

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)

func (*GLS) GetString

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

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)

func (*GLS) LineWidth

func (gs *GLS) LineWidth(width float32)

func (*GLS) LinkProgram

func (gs *GLS) LinkProgram(program uint32)

func (*GLS) NewProgram

func (gs *GLS) NewProgram() *Program

NewProgram creates 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)

func (*GLS) PolygonOffset

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

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)

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) TexImage2D

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

func (*GLS) TexParameteri

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

func (*GLS) Uniform1f

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

func (*GLS) Uniform1fv

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

func (*GLS) Uniform1i

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

func (*GLS) Uniform2f

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

func (*GLS) Uniform2fv

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

func (*GLS) Uniform3f

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

func (*GLS) Uniform3fv

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

func (*GLS) Uniform4f

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

func (*GLS) Uniform4fv

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

func (*GLS) UniformMatrix3fv

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

func (*GLS) UniformMatrix4fv

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

func (*GLS) UseProgram

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

Use set this program as the current program.

func (*GLS) VertexAttribPointer

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

func (*GLS) Viewport

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

type Program

type Program struct {
	// Shows source code in error messages
	ShowSource bool

	Specs interface{}
	// contains filtered or unexported fields
}

Shader Program Object

func (*Program) AddShader

func (prog *Program) AddShader(stype uint32, source string, defines map[string]interface{})

AddShaders 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 a shader of the specified type and with the specified source code and returns a non-zero value by which it can be referenced.

func (*Program) GetAttribLocation

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

GetAttributeLocation 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 handle of this program

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 // Cummulative number of hits for Enable/Disable
	UnilocHits uint64 // Cummulative number of uniform location cache hits
	UnilocMiss uint64 // Cummulative number of uniform location cache misses
	Unisets    uint64 // Cummulative number of uniform sets
	Drawcalls  uint64 // Cummulative number of draw calls
}

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

type Uniform

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

Type Uniform is the type for all uniforms

func (*Uniform) Location

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

Location returns the current location of the uniform for the current active program

func (*Uniform) LocationIdx

func (uni *Uniform) LocationIdx(gs *GLS, idx int) int32

Location returns the current location of the uniform for the current active program and index

type Uniform1f

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

Type Uniform1f is a Uniform containing one float32 value

func NewUniform1f

func NewUniform1f(name string) *Uniform1f

func (*Uniform1f) Get

func (uni *Uniform1f) Get() float32

func (*Uniform1f) Init

func (uni *Uniform1f) Init(name string)

func (*Uniform1f) Set

func (uni *Uniform1f) Set(v float32)

func (*Uniform1f) Transfer

func (uni *Uniform1f) Transfer(gs *GLS)

func (*Uniform1f) TransferIdx

func (uni *Uniform1f) TransferIdx(gs *GLS, idx int)

type Uniform1fv

type Uniform1fv struct {
	Uniform // embedded uniform
	// contains filtered or unexported fields
}

Type Uniform1fv is a uniform containing an array of float32 values

func NewUniform1fv

func NewUniform1fv(name string, count int) *Uniform1fv

NewUniform1fv creates and returns an uniform with array of float32 values with the specified size

func (*Uniform1fv) Get

func (uni *Uniform1fv) Get(pos int, v float32) float32

Get gets the value of the element at the specified position

func (*Uniform1fv) GetColor

func (uni *Uniform1fv) GetColor(pos int) math32.Color

GetColor gets the value of the elements of the uniform starting at pos as a Color object.

func (*Uniform1fv) GetVector3

func (uni *Uniform1fv) GetVector3(pos int) math32.Vector3

GetVector3 gets the value of the elements of the uniform starting at pos as a Vector3 object.

func (*Uniform1fv) Init

func (uni *Uniform1fv) Init(name string, count int)

Init initializes an Uniform1fv object with the specified name and count of float32 values. It is normally used when the uniform is embedded in another object.

func (*Uniform1fv) Set

func (uni *Uniform1fv) Set(pos int, v float32)

Set sets the value of the element at the specified position

func (*Uniform1fv) SetColor

func (uni *Uniform1fv) SetColor(pos int, color *math32.Color)

SetColor sets the value of the elements of the uniform starting at pos from the specified Color object.

func (*Uniform1fv) SetVector3

func (uni *Uniform1fv) SetVector3(pos int, v *math32.Vector3)

SetVector3 sets the value of the elements of uniform starting at pos from the specified Vector3 object.

func (*Uniform1fv) TransferIdx

func (uni *Uniform1fv) TransferIdx(gl *GLS, pos, count int)

TransferIdx transfer a block of 'count' values of this uniform starting at 'pos'.

type Uniform1i

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

Type Uniform1i is a Uniform containing one int value

func NewUniform1i

func NewUniform1i(name string) *Uniform1i

func (*Uniform1i) Get

func (uni *Uniform1i) Get() int32

func (*Uniform1i) Init

func (uni *Uniform1i) Init(name string)

func (*Uniform1i) Set

func (uni *Uniform1i) Set(v int32)

func (*Uniform1i) Transfer

func (uni *Uniform1i) Transfer(gs *GLS)

func (*Uniform1i) TransferIdx

func (uni *Uniform1i) TransferIdx(gs *GLS, idx int)

type Uniform2f

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

Type Uniform2f is a Uniform containing two float32 values

func NewUniform2f

func NewUniform2f(name string) *Uniform2f

func (*Uniform2f) Get

func (uni *Uniform2f) Get() (float32, float32)

func (*Uniform2f) GetVector2

func (uni *Uniform2f) GetVector2() math32.Vector2

func (*Uniform2f) Init

func (uni *Uniform2f) Init(name string)

func (*Uniform2f) Set

func (uni *Uniform2f) Set(v0, v1 float32)

func (*Uniform2f) SetVector2

func (uni *Uniform2f) SetVector2(v *math32.Vector2)

func (*Uniform2f) Transfer

func (uni *Uniform2f) Transfer(gs *GLS)

func (*Uniform2f) TransferIdx

func (uni *Uniform2f) TransferIdx(gs *GLS, idx int)

type Uniform3f

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

Type Uniform3f is a Uniform containing three float32 values

func NewUniform3f

func NewUniform3f(name string) *Uniform3f

func (*Uniform3f) Get

func (uni *Uniform3f) Get() (float32, float32, float32)

func (*Uniform3f) GetColor

func (uni *Uniform3f) GetColor() math32.Color

func (*Uniform3f) GetVector3

func (uni *Uniform3f) GetVector3() math32.Vector3

func (*Uniform3f) Init

func (uni *Uniform3f) Init(name string)

func (*Uniform3f) Set

func (uni *Uniform3f) Set(v0, v1, v2 float32)

func (*Uniform3f) SetColor

func (uni *Uniform3f) SetColor(color *math32.Color)

func (*Uniform3f) SetVector3

func (uni *Uniform3f) SetVector3(v *math32.Vector3)

func (*Uniform3f) Transfer

func (uni *Uniform3f) Transfer(gl *GLS)

func (*Uniform3f) TransferIdx

func (uni *Uniform3f) TransferIdx(gl *GLS, idx int)

type Uniform3fv

type Uniform3fv struct {
	Uniform // embedded uniform
	// contains filtered or unexported fields
}

Type Uniform3fv is a uniform containing an array of three float32 values

func NewUniform3fv

func NewUniform3fv(name string, count int) *Uniform3fv

NewUniform3fv creates and returns an uniform array with the specified size of 3 float values

func (*Uniform3fv) Get

func (uni *Uniform3fv) Get(idx int) (v0, v1, v2 float32)

Get gets the value of all elements of the specified group of 3 floats for this uniform array

func (*Uniform3fv) GetColor

func (uni *Uniform3fv) GetColor(idx int) math32.Color

GetColor gets the value of all elements of the specified group of 3 float for this uniform array as a Color object.

func (*Uniform3fv) GetPos

func (uni *Uniform3fv) GetPos(pos int) float32

GetPos gets the value at the specified position in the uniform array.

func (*Uniform3fv) GetVector3

func (uni *Uniform3fv) GetVector3(idx int) math32.Vector3

GetVector3 gets the value of all elements of the specified group of 3 float for this uniform array as a Vector3 object.

func (*Uniform3fv) Init

func (uni *Uniform3fv) Init(name string, count int)

Init initializes an Uniform3fv object with the specified name and count of 3 float32 groups. It is normally used when the uniform is embedded in another object.

func (*Uniform3fv) Set

func (uni *Uniform3fv) Set(idx int, v0, v1, v2 float32)

Set sets the value of all elements of the specified group of 3 floats for this uniform array

func (*Uniform3fv) SetColor

func (uni *Uniform3fv) SetColor(idx int, color *math32.Color)

SetColor sets the value of all elements of the specified group of 3 floats for this uniform array form the specified Color object.

func (*Uniform3fv) SetPos

func (uni *Uniform3fv) SetPos(pos int, v float32)

SetPos sets the value at the specified position in the uniform array.

func (*Uniform3fv) SetVector3

func (uni *Uniform3fv) SetVector3(idx int, v *math32.Vector3)

SetVector3 sets the value of all elements for the specified group of 3 float for this uniform array from the specified Vector3 object.

func (*Uniform3fv) Transfer

func (uni *Uniform3fv) Transfer(gl *GLS)

Transfer transfers the current values of this uniform to the current shader program

func (*Uniform3fv) TransferIdx

func (uni *Uniform3fv) TransferIdx(gl *GLS, idx int)

Transfer transfers the current values of this uniform to a specified start position in the target uniform array.

type Uniform4f

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

Type Uniform4f is a Uniform containing four float32 values

func NewUniform4f

func NewUniform4f(name string) *Uniform4f

func (*Uniform4f) Get

func (uni *Uniform4f) Get() (float32, float32, float32, float32)

func (*Uniform4f) GetColor4

func (uni *Uniform4f) GetColor4() math32.Color4

func (*Uniform4f) GetVector4

func (uni *Uniform4f) GetVector4() math32.Vector4

func (*Uniform4f) Init

func (uni *Uniform4f) Init(name string)

func (*Uniform4f) Set

func (uni *Uniform4f) Set(v0, v1, v2, v3 float32)

func (*Uniform4f) SetColor4

func (uni *Uniform4f) SetColor4(c *math32.Color4)

func (*Uniform4f) SetVector4

func (uni *Uniform4f) SetVector4(v *math32.Vector4)

func (*Uniform4f) Transfer

func (uni *Uniform4f) Transfer(gl *GLS)

func (*Uniform4f) TransferIdx

func (uni *Uniform4f) TransferIdx(gl *GLS, idx int)

type Uniform4fv

type Uniform4fv struct {
	Uniform // embedded uniform
	// contains filtered or unexported fields
}

Type Uniform4fv is a Uniform containing an array of four float32 values

func NewUniform4fv

func NewUniform4fv(name string, count int) *Uniform4fv

NewUniform4fv creates and returns an uniform array with the specified size of 4 float values

func (*Uniform4fv) Get

func (uni *Uniform4fv) Get(idx int) (v0, v1, v2, v3 float32)

Get gets the value of all elements of the specified group of 4 floats for this uniform array

func (*Uniform4fv) GetColor4

func (uni *Uniform4fv) GetColor4(idx int) math32.Color4

GetColor4 gets the value of all elements of the specified group of 4 float for this uniform array as a Color4 object.

func (*Uniform4fv) GetPos

func (uni *Uniform4fv) GetPos(pos int) float32

GetPos gets the value at the specified position in the uniform array.

func (*Uniform4fv) GetVector4

func (uni *Uniform4fv) GetVector4(idx int) math32.Vector4

GetVector4 gets the value of all elements of the specified group of 4 float for this uniform array as a Vector4 object.

func (*Uniform4fv) Init

func (uni *Uniform4fv) Init(name string, count int)

Init initializes an Uniform4fv object with the specified name and count of 4 float32 groups. It is normally used when the uniform is embedded in another object.

func (*Uniform4fv) Set

func (uni *Uniform4fv) Set(idx int, v0, v1, v2, v3 float32)

Set sets the value of all elements of the specified group of 4 floats for this uniform array

func (*Uniform4fv) SetColor4

func (uni *Uniform4fv) SetColor4(idx int, color *math32.Color4)

SetColor4 sets the value of all elements of the specified group of 4 floats for this uniform array form the specified Color4 object.

func (*Uniform4fv) SetPos

func (uni *Uniform4fv) SetPos(pos int, v float32)

SetPos sets the value at the specified position in the uniform array.

func (*Uniform4fv) SetVector4

func (uni *Uniform4fv) SetVector4(idx int, v *math32.Vector4)

SetVector4 sets the value of all elements for the specified group of 4 float for this uniform array from the specified Vector4 object.

func (*Uniform4fv) Transfer

func (uni *Uniform4fv) Transfer(gl *GLS)

Transfer transfers the current values of this uniform to the current shader program

type UniformMatrix3f

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

Type UniformMatrix3f is a Uniform containing nine float32 values organized as 3x3 matrix

func NewUniformMatrix3f

func NewUniformMatrix3f(name string) *UniformMatrix3f

NewUniformMatrix3 creates and returns a pointer to a new UniformMatrix3f with the specified name

func (*UniformMatrix3f) Get

func (uni *UniformMatrix3f) Get(pos int) float32

Get gets the value of the matrix element by its position starting from 0 for col0, row0 to 8 from col2, row2. This way the matrix can be considered as a vector of 9 elements

func (*UniformMatrix3f) GetElement

func (uni *UniformMatrix3f) GetElement(col, row int, v float32) float32

GetElement gets the value of the matrix element at the specified column and row

func (*UniformMatrix3f) GetMatrix3

func (uni *UniformMatrix3f) GetMatrix3() math32.Matrix3

GetMatrix3 gets the matrix stored by the uniform

func (*UniformMatrix3f) Init

func (uni *UniformMatrix3f) Init(name string)

Init initializes this uniform the specified name It is normally used when the uniform is embedded in another object.

func (*UniformMatrix3f) Set

func (uni *UniformMatrix3f) Set(pos int, v float32)

Set sets the value of the matrix element by its position starting from 0 for col0, row0 to 8 from col2, row2. This way the matrix can be considered as a vector of 9 elements

func (*UniformMatrix3f) SetElement

func (uni *UniformMatrix3f) SetElement(col, row int, v float32)

SetElement sets the value of the matrix element at the specified column and row

func (*UniformMatrix3f) SetMatrix3

func (uni *UniformMatrix3f) SetMatrix3(m *math32.Matrix3)

SetMatrix3 sets the matrix stored by the uniform

func (*UniformMatrix3f) Transfer

func (uni *UniformMatrix3f) Transfer(gl *GLS)

Transfer transfer the uniform matrix data to the graphics library

func (*UniformMatrix3f) TransferIdx

func (uni *UniformMatrix3f) TransferIdx(gl *GLS, idx int)

TransferIdx transfer the uniform matrix data to a specified destination index of an uniform array to the graphics library

type UniformMatrix4f

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

Type UniformMatrix4f is a Uniform containing sixteen float32 values organized as 4x4 matrix

func NewUniformMatrix4f

func NewUniformMatrix4f(name string) *UniformMatrix4f

func (*UniformMatrix4f) GetMatrix4

func (uni *UniformMatrix4f) GetMatrix4() math32.Matrix4

func (*UniformMatrix4f) Init

func (uni *UniformMatrix4f) Init(name string)

func (*UniformMatrix4f) SetMatrix4

func (uni *UniformMatrix4f) SetMatrix4(m *math32.Matrix4)

func (*UniformMatrix4f) Transfer

func (uni *UniformMatrix4f) Transfer(gl *GLS)

func (*UniformMatrix4f) TransferIdx

func (uni *UniformMatrix4f) TransferIdx(gl *GLS, idx int)

type VBO

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

VBO abstracts an OpenGL Vertex Buffer Object

func NewVBO

func NewVBO() *VBO

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

func (*VBO) AddAttrib

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

AddAttrib adds a new attribute to this VBO

func (*VBO) Attrib

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

Attrib finds and returns pointer the attribute with the specified name or nil if not found

func (*VBO) AttribAt

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

AttribAt returns 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) Buffer

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

Buffer returns pointer to the VBO buffer

func (*VBO) Dispose

func (vbo *VBO) Dispose()

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

func (*VBO) SetBuffer

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

Sets the VBO buffer

func (*VBO) SetUsage

func (vbo *VBO) SetUsage(usage uint32)

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 this VBO which is the number of bytes used by one group attributes side by side in the buffer Ex: x y z r g b x y z r g b ...x y z r g b The stride will be: sizeof(float) * 6 = 24

func (*VBO) Transfer

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

Transfer is called internally and transfer the data in the VBO buffer to OpenGL if necessary

func (*VBO) Update

func (vbo *VBO) Update()

Updates sets the update flag to force the VBO update

type VBOattrib

type VBOattrib struct {
	Name     string // Name of of the attribute
	ItemSize int32  // Number of elements for each item
}

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