1
0
mirror of https://github.com/lxsang/Diya-API.git synced 2024-12-26 11:28:22 +01:00
Diya-API/Diya/OpenGLConstants.class.st

201 lines
4.7 KiB
Smalltalk
Raw Normal View History

2021-12-20 01:14:35 +01:00
Class {
#name : #OpenGLConstants,
#superclass : #SharedPool,
#classVars : [
'GL_ACCUM_BUFFER_BIT',
2021-12-20 18:32:08 +01:00
'GL_ACTIVE_ATTRIBUTES',
'GL_ACTIVE_ATTRIBUTE_MAX_LENGTH',
'GL_ACTIVE_UNIFORMS',
'GL_ACTIVE_UNIFORM_MAX_LENGTH',
2022-03-03 19:19:40 +01:00
'GL_ALPHA',
2022-02-13 17:15:23 +01:00
'GL_ARRAY_BUFFER',
2022-02-14 00:02:14 +01:00
'GL_ARRAY_BUFFER_BINDING',
2021-12-20 18:32:08 +01:00
'GL_ATTACHED_SHADERS',
2022-08-09 00:22:18 +02:00
'GL_BGR',
'GL_BGRA',
2022-03-03 19:19:40 +01:00
'GL_BLEND',
'GL_BLUE',
2022-02-13 17:15:23 +01:00
'GL_BYTE',
2022-03-06 18:33:10 +01:00
'GL_CLAMP_TO_BORDER',
2022-03-03 19:19:40 +01:00
'GL_CLAMP_TO_EDGE',
2021-12-20 01:14:35 +01:00
'GL_COLOR_BUFFER_BIT',
2021-12-20 18:32:08 +01:00
'GL_COMPILE_STATUS',
'GL_COMPUTE_SHADER',
2022-03-03 19:19:40 +01:00
'GL_CULL_FACE',
2021-12-20 18:32:08 +01:00
'GL_DELETE_STATUS',
2021-12-20 01:14:35 +01:00
'GL_DEPTH_BUFFER_BIT',
2022-02-13 17:15:23 +01:00
'GL_DOUBLE',
'GL_DYNAMIC_DRAW',
2022-02-13 17:15:23 +01:00
'GL_FALSE',
'GL_FIXED',
'GL_FLOAT',
2021-12-20 18:32:08 +01:00
'GL_FRAGMENT_SHADER',
'GL_GEOMETRY_SHADER',
2022-03-03 19:19:40 +01:00
'GL_GREEN',
2022-02-13 17:15:23 +01:00
'GL_HALF_FLOAT',
2021-12-20 18:32:08 +01:00
'GL_INFO_LOG_LENGTH',
2022-02-13 17:15:23 +01:00
'GL_INT',
'GL_INT_2_10_10_10_REV',
2022-03-03 19:19:40 +01:00
'GL_LINEAR',
2021-12-20 01:14:35 +01:00
'GL_LINES',
'GL_LINE_LOOP',
2022-03-16 01:32:01 +01:00
'GL_LINE_SMOOTH',
'GL_LINE_SMOOTH_HINT',
2021-12-20 01:14:35 +01:00
'GL_LINE_STRIP',
2021-12-20 18:32:08 +01:00
'GL_LINK_STATUS',
2022-03-04 20:28:38 +01:00
'GL_MAX_TEXTURE_SIZE',
2022-03-16 01:32:01 +01:00
'GL_MULTISAMPLE',
2022-03-06 18:33:10 +01:00
'GL_NEAREST',
2022-03-16 01:32:01 +01:00
'GL_NICEST',
2022-03-03 19:19:40 +01:00
'GL_ONE_MINUS_SRC_ALPHA',
'GL_PACK_ALIGNMENT',
2021-12-20 01:14:35 +01:00
'GL_POINTS',
'GL_POLYGON',
'GL_QUADS',
'GL_QUAD_STRIP',
2022-03-03 19:19:40 +01:00
'GL_RED',
2022-03-04 20:28:38 +01:00
'GL_RGB',
2022-03-08 23:30:01 +01:00
'GL_RGBA',
2021-12-20 18:32:08 +01:00
'GL_SHADER_SOURCE_LENGTH',
'GL_SHADER_TYPE',
2022-02-13 17:15:23 +01:00
'GL_SHORT',
2022-03-03 19:19:40 +01:00
'GL_SRC_ALPHA',
2022-02-13 17:15:23 +01:00
'GL_STATIC_DRAW',
2021-12-20 01:14:35 +01:00
'GL_STENCIL_BUFFER_BIT',
2021-12-20 18:32:08 +01:00
'GL_TESS_CONTROL_SHADER',
'GL_TESS_EVALUATION_SHADER',
2022-03-03 19:19:40 +01:00
'GL_TEXTURE_2D',
2022-02-13 17:15:23 +01:00
'GL_TEXTURE_BUFFER',
2022-03-03 19:19:40 +01:00
'GL_TEXTURE_MAG_FILTER',
'GL_TEXTURE_MIN_FILTER',
'GL_TEXTURE_UNIT_BASE',
'GL_TEXTURE_WRAP_S',
'GL_TEXTURE_WRAP_T',
2021-12-20 01:14:35 +01:00
'GL_TRIANGLES',
'GL_TRIANGLE_FAN',
2021-12-20 18:32:08 +01:00
'GL_TRIANGLE_STRIP',
2022-02-13 17:15:23 +01:00
'GL_TRUE',
'GL_UNIFORM_BUFFER',
2022-03-03 19:19:40 +01:00
'GL_UNPACK_ALIGNMENT',
2022-02-13 17:15:23 +01:00
'GL_UNSIGNED_BYTE',
'GL_UNSIGNED_INT',
'GL_UNSIGNED_INT_10F_11F_11F_REV',
'GL_UNSIGNED_INT_2_10_10_10_REV',
'GL_UNSIGNED_SHORT',
2021-12-20 18:32:08 +01:00
'GL_VALIDATE_STATUS',
'GL_VERTEX_SHADER'
2021-12-20 01:14:35 +01:00
],
#category : #'Diya-OpenGL'
}
2022-02-13 17:15:23 +01:00
{ #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_DYNAMIC_DRAW := 16r88E8.
2022-02-13 17:15:23 +01:00
GL_FALSE := 0.
2022-02-14 00:02:14 +01:00
GL_TRUE := 1.
2022-03-03 19:19:40 +01:00
GL_ARRAY_BUFFER_BINDING := 16r8894.
GL_RED := 16r1903.
GL_BLUE := 16r1905.
GL_GREEN := 16r1904.
2022-03-04 20:28:38 +01:00
GL_ALPHA := 16r1906.
GL_RGB := 16r1907.
2022-03-08 23:30:01 +01:00
GL_RGBA := 16r1908.
2022-08-09 00:22:18 +02:00
GL_BGR := 16r80E0.
GL_BGRA := 16r80E1.
2022-03-16 01:32:01 +01:00
GL_LINE_SMOOTH := 16r0B20.
GL_LINE_SMOOTH_HINT := 16r0C52
2022-02-13 17:15:23 +01:00
]
2021-12-20 01:14:35 +01:00
{ #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.
2022-03-03 19:19:40 +01:00
GL_BLEND := 16r0BE2.
GL_SRC_ALPHA := 16r0302.
GL_ONE_MINUS_SRC_ALPHA := 16r0303.
GL_CULL_FACE := 16r0B44.
GL_PACK_ALIGNMENT := 16r0D05.
2022-03-16 01:32:01 +01:00
GL_UNPACK_ALIGNMENT := 16r0CF5.
GL_NICEST := 16r1102.
GL_MULTISAMPLE := 16r809D
2021-12-20 01:14:35 +01:00
]
2021-12-20 18:32:08 +01:00
{ #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.
]
2022-03-03 19:19:40 +01:00
{ #category : #'class initialization' }
OpenGLConstants class >> initTextureConstants [
GL_TEXTURE_WRAP_S := 16r2802.
GL_TEXTURE_2D := 16r0DE1.
GL_CLAMP_TO_EDGE := 16r812F.
GL_TEXTURE_WRAP_T := 16r2803.
GL_TEXTURE_MIN_FILTER := 16r2801.
GL_TEXTURE_MAG_FILTER := 16r2800.
GL_LINEAR := 16r2601.
2022-03-06 18:33:10 +01:00
GL_NEAREST := 16r2600.
2022-03-03 19:19:40 +01:00
GL_TEXTURE_UNIT_BASE := 16r84C0.
2022-03-06 18:33:10 +01:00
GL_MAX_TEXTURE_SIZE := 16r0D33.
GL_CLAMP_TO_BORDER := 16r812D
2022-03-03 19:19:40 +01:00
]
2021-12-20 01:14:35 +01:00
{ #category : #'class initialization' }
OpenGLConstants class >> initialize [
self initCommonMode.
self initCommonMask.
2021-12-20 18:32:08 +01:00
self initCommonShader.
2022-03-03 19:19:40 +01:00
self initCommonConstants.
self initTextureConstants.
2021-12-20 01:14:35 +01:00
]