1
0
mirror of https://github.com/lxsang/Diya-API.git synced 2024-12-27 03:48:21 +01:00
Diya-API/Diya/OpenGLConstants.class.st
2022-02-14 00:02:14 +01:00

136 lines
3.3 KiB
Smalltalk

Class {
#name : #OpenGLConstants,
#superclass : #SharedPool,
#classVars : [
'GL_ACCUM_BUFFER_BIT',
'GL_ACTIVE_ATTRIBUTES',
'GL_ACTIVE_ATTRIBUTE_MAX_LENGTH',
'GL_ACTIVE_UNIFORMS',
'GL_ACTIVE_UNIFORM_MAX_LENGTH',
'GL_ARRAY_BUFFER',
'GL_ARRAY_BUFFER_BINDING',
'GL_ATTACHED_SHADERS',
'GL_BYTE',
'GL_COLOR_BUFFER_BIT',
'GL_COMPILE_STATUS',
'GL_COMPUTE_SHADER',
'GL_DELETE_STATUS',
'GL_DEPTH_BUFFER_BIT',
'GL_DOUBLE',
'GL_FALSE',
'GL_FIXED',
'GL_FLOAT',
'GL_FRAGMENT_SHADER',
'GL_GEOMETRY_SHADER',
'GL_HALF_FLOAT',
'GL_INFO_LOG_LENGTH',
'GL_INT',
'GL_INT_2_10_10_10_REV',
'GL_LINES',
'GL_LINE_LOOP',
'GL_LINE_STRIP',
'GL_LINK_STATUS',
'GL_POINTS',
'GL_POLYGON',
'GL_QUADS',
'GL_QUAD_STRIP',
'GL_SHADER_SOURCE_LENGTH',
'GL_SHADER_TYPE',
'GL_SHORT',
'GL_STATIC_DRAW',
'GL_STENCIL_BUFFER_BIT',
'GL_TESS_CONTROL_SHADER',
'GL_TESS_EVALUATION_SHADER',
'GL_TEXTURE_BUFFER',
'GL_TRIANGLES',
'GL_TRIANGLE_FAN',
'GL_TRIANGLE_STRIP',
'GL_TRUE',
'GL_UNIFORM_BUFFER',
'GL_UNSIGNED_BYTE',
'GL_UNSIGNED_INT',
'GL_UNSIGNED_INT_10F_11F_11F_REV',
'GL_UNSIGNED_INT_2_10_10_10_REV',
'GL_UNSIGNED_SHORT',
'GL_VALIDATE_STATUS',
'GL_VERTEX_SHADER'
],
#category : #'Diya-OpenGL'
}
{ #category : #'class initialization' }
OpenGLConstants class >> initCommonConstants [
GL_BYTE := 16r1400.
GL_UNSIGNED_BYTE := 16r1401.
GL_SHORT := 16r1402.
GL_UNSIGNED_SHORT := 16r1403.
GL_INT := 16r1404.
GL_UNSIGNED_INT := 16r1405.
GL_HALF_FLOAT := 16r140B.
GL_FLOAT := 16r1406.
GL_DOUBLE := 16r140A.
GL_FIXED := 16r140C.
GL_INT_2_10_10_10_REV := 16r8D9F.
GL_UNSIGNED_INT_2_10_10_10_REV := 16r8368.
GL_UNSIGNED_INT_10F_11F_11F_REV := 16r8C3B.
GL_ARRAY_BUFFER := 16r8892.
GL_TEXTURE_BUFFER := 16r8C2A.
GL_UNIFORM_BUFFER := 16r8A11.
GL_STATIC_DRAW := 16r88E4.
GL_FALSE := 0.
GL_TRUE := 1.
GL_ARRAY_BUFFER_BINDING := 16r8894
]
{ #category : #'class initialization' }
OpenGLConstants class >> initCommonMask [
GL_COLOR_BUFFER_BIT := 16r00004000.
GL_DEPTH_BUFFER_BIT := 16r00000100.
GL_ACCUM_BUFFER_BIT := 16r00000200.
GL_STENCIL_BUFFER_BIT := 16r00000400.
]
{ #category : #'class initialization' }
OpenGLConstants class >> initCommonMode [
GL_TRIANGLES := 16r0004.
GL_POINTS := 16r0000.
GL_LINES := 16r0001.
GL_LINE_STRIP := 16r0003.
GL_LINE_LOOP := 16r0002.
GL_TRIANGLE_STRIP := 16r0005.
GL_TRIANGLE_FAN := 16r0006.
GL_QUADS := 16r0007.
GL_QUAD_STRIP := 16r0008.
GL_POLYGON := 16r0009.
]
{ #category : #'class initialization' }
OpenGLConstants class >> initCommonShader [
GL_COMPUTE_SHADER := 16r91B9.
GL_VERTEX_SHADER := 16r8B31.
GL_TESS_CONTROL_SHADER := 16r8E88.
GL_TESS_EVALUATION_SHADER := 16r8E87.
GL_GEOMETRY_SHADER := 16r8DD9.
GL_FRAGMENT_SHADER := 16r8B30.
GL_SHADER_TYPE := 16r8B4F.
GL_DELETE_STATUS := 16r8B80.
GL_COMPILE_STATUS := 16r8B81.
GL_INFO_LOG_LENGTH := 16r8B84.
GL_SHADER_SOURCE_LENGTH := 16r8B88.
GL_LINK_STATUS := 16r8B82.
GL_VALIDATE_STATUS := 16r8B83.
GL_ATTACHED_SHADERS := 16r8B85.
GL_ACTIVE_ATTRIBUTES := 16r8B89.
GL_ACTIVE_ATTRIBUTE_MAX_LENGTH := 16r8B8A.
GL_ACTIVE_UNIFORMS := 16r8B86.
GL_ACTIVE_UNIFORM_MAX_LENGTH := 16r8B87.
]
{ #category : #'class initialization' }
OpenGLConstants class >> initialize [
self initCommonMode.
self initCommonMask.
self initCommonShader.
self initCommonConstants
]