NB. 3D graphics definitions

coclass 'jgl3'

GL_VERSION_1_1=: 1
GL_ACCUM=: 16b0100
GL_LOAD=: 16b0101
GL_RETURN=: 16b0102
GL_MULT=: 16b0103
GL_ADD=: 16b0104
GL_NEVER=: 16b0200
GL_LESS=: 16b0201
GL_EQUAL=: 16b0202
GL_LEQUAL=: 16b0203
GL_GREATER=: 16b0204
GL_NOTEQUAL=: 16b0205
GL_GEQUAL=: 16b0206
GL_ALWAYS=: 16b0207
GL_CURRENT_BIT=: 16b00000001
GL_POINT_BIT=: 16b00000002
GL_LINE_BIT=: 16b00000004
GL_POLYGON_BIT=: 16b00000008
GL_POLYGON_STIPPLE_BIT=: 16b00000010
GL_PIXEL_MODE_BIT=: 16b00000020
GL_LIGHTING_BIT=: 16b00000040
GL_FOG_BIT=: 16b00000080
GL_DEPTH_BUFFER_BIT=: 16b00000100
GL_ACCUM_BUFFER_BIT=: 16b00000200
GL_STENCIL_BUFFER_BIT=: 16b00000400
GL_VIEWPORT_BIT=: 16b00000800
GL_TRANSFORM_BIT=: 16b00001000
GL_ENABLE_BIT=: 16b00002000
GL_COLOR_BUFFER_BIT=: 16b00004000
GL_HINT_BIT=: 16b00008000
GL_EVAL_BIT=: 16b00010000
GL_LIST_BIT=: 16b00020000
GL_TEXTURE_BIT=: 16b00040000
GL_SCISSOR_BIT=: 16b00080000
GL_ALL_ATTRIB_BITS=: 16b000fffff
GL_POINTS=: 16b0000
GL_LINES=: 16b0001
GL_LINE_LOOP=: 16b0002
GL_LINE_STRIP=: 16b0003
GL_TRIANGLES=: 16b0004
GL_TRIANGLE_STRIP=: 16b0005
GL_TRIANGLE_FAN=: 16b0006
GL_QUADS=: 16b0007
GL_QUAD_STRIP=: 16b0008
GL_POLYGON=: 16b0009
GL_ZERO=: 0
GL_ONE=: 1
GL_SRC_COLOR=: 16b0300
GL_ONE_MINUS_SRC_COLOR=: 16b0301
GL_SRC_ALPHA=: 16b0302
GL_ONE_MINUS_SRC_ALPHA=: 16b0303
GL_DST_ALPHA=: 16b0304
GL_ONE_MINUS_DST_ALPHA=: 16b0305
GL_DST_COLOR=: 16b0306
GL_ONE_MINUS_DST_COLOR=: 16b0307
GL_SRC_ALPHA_SATURATE=: 16b0308
GL_TRUE=: 1
GL_FALSE=: 0
GL_CLIP_PLANE0=: 16b3000
GL_CLIP_PLANE1=: 16b3001
GL_CLIP_PLANE2=: 16b3002
GL_CLIP_PLANE3=: 16b3003
GL_CLIP_PLANE4=: 16b3004
GL_CLIP_PLANE5=: 16b3005
GL_BYTE=: 16b1400
GL_UNSIGNED_BYTE=: 16b1401
GL_SHORT=: 16b1402
GL_UNSIGNED_SHORT=: 16b1403
GL_INT=: 16b1404
GL_UNSIGNED_INT=: 16b1405
GL_FLOAT=: 16b1406
GL_2_BYTES=: 16b1407
GL_3_BYTES=: 16b1408
GL_4_BYTES=: 16b1409
GL_DOUBLE=: 16b140a
GL_NONE=: 0
GL_FRONT_LEFT=: 16b0400
GL_FRONT_RIGHT=: 16b0401
GL_BACK_LEFT=: 16b0402
GL_BACK_RIGHT=: 16b0403
GL_FRONT=: 16b0404
GL_BACK=: 16b0405
GL_LEFT=: 16b0406
GL_RIGHT=: 16b0407
GL_FRONT_AND_BACK=: 16b0408
GL_AUX0=: 16b0409
GL_AUX1=: 16b040a
GL_AUX2=: 16b040b
GL_AUX3=: 16b040c
GL_NO_ERROR=: 0
GL_INVALID_ENUM=: 16b0500
GL_INVALID_VALUE=: 16b0501
GL_INVALID_OPERATION=: 16b0502
GL_STACK_OVERFLOW=: 16b0503
GL_STACK_UNDERFLOW=: 16b0504
GL_OUT_OF_MEMORY=: 16b0505
GL_2D=: 16b0600
GL_3D=: 16b0601
GL_3D_COLOR=: 16b0602
GL_3D_COLOR_TEXTURE=: 16b0603
GL_4D_COLOR_TEXTURE=: 16b0604
GL_PASS_THROUGH_TOKEN=: 16b0700
GL_POINT_TOKEN=: 16b0701
GL_LINE_TOKEN=: 16b0702
GL_POLYGON_TOKEN=: 16b0703
GL_BITMAP_TOKEN=: 16b0704
GL_DRAW_PIXEL_TOKEN=: 16b0705
GL_COPY_PIXEL_TOKEN=: 16b0706
GL_LINE_RESET_TOKEN=: 16b0707
GL_EXP=: 16b0800
GL_EXP2=: 16b0801
GL_CW=: 16b0900
GL_CCW=: 16b0901
GL_COEFF=: 16b0a00
GL_ORDER=: 16b0a01
GL_DOMAIN=: 16b0a02
GL_CURRENT_COLOR=: 16b0b00
GL_CURRENT_INDEX=: 16b0b01
GL_CURRENT_NORMAL=: 16b0b02
GL_CURRENT_TEXTURE_COORDS=: 16b0b03
GL_CURRENT_RASTER_COLOR=: 16b0b04
GL_CURRENT_RASTER_INDEX=: 16b0b05
GL_CURRENT_RASTER_TEXTURE_COORDS=: 16b0b06
GL_CURRENT_RASTER_POSITION=: 16b0b07
GL_CURRENT_RASTER_POSITION_VALID=: 16b0b08
GL_CURRENT_RASTER_DISTANCE=: 16b0b09
GL_POINT_SMOOTH=: 16b0b10
GL_POINT_SIZE=: 16b0b11
GL_POINT_SIZE_RANGE=: 16b0b12
GL_POINT_SIZE_GRANULARITY=: 16b0b13
GL_LINE_SMOOTH=: 16b0b20
GL_LINE_WIDTH=: 16b0b21
GL_LINE_WIDTH_RANGE=: 16b0b22
GL_LINE_WIDTH_GRANULARITY=: 16b0b23
GL_LINE_STIPPLE=: 16b0b24
GL_LINE_STIPPLE_PATTERN=: 16b0b25
GL_LINE_STIPPLE_REPEAT=: 16b0b26
GL_LIST_MODE=: 16b0b30
GL_MAX_LIST_NESTING=: 16b0b31
GL_LIST_BASE=: 16b0b32
GL_LIST_INDEX=: 16b0b33
GL_POLYGON_MODE=: 16b0b40
GL_POLYGON_SMOOTH=: 16b0b41
GL_POLYGON_STIPPLE=: 16b0b42
GL_EDGE_FLAG=: 16b0b43
GL_CULL_FACE=: 16b0b44
GL_CULL_FACE_MODE=: 16b0b45
GL_FRONT_FACE=: 16b0b46
GL_LIGHTING=: 16b0b50
GL_LIGHT_MODEL_LOCAL_VIEWER=: 16b0b51
GL_LIGHT_MODEL_TWO_SIDE=: 16b0b52
GL_LIGHT_MODEL_AMBIENT=: 16b0b53
GL_SHADE_MODEL=: 16b0b54
GL_COLOR_MATERIAL_FACE=: 16b0b55
GL_COLOR_MATERIAL_PARAMETER=: 16b0b56
GL_COLOR_MATERIAL=: 16b0b57
GL_FOG=: 16b0b60
GL_FOG_INDEX=: 16b0b61
GL_FOG_DENSITY=: 16b0b62
GL_FOG_START=: 16b0b63
GL_FOG_END=: 16b0b64
GL_FOG_MODE=: 16b0b65
GL_FOG_COLOR=: 16b0b66
GL_DEPTH_RANGE=: 16b0b70
GL_DEPTH_TEST=: 16b0b71
GL_DEPTH_WRITEMASK=: 16b0b72
GL_DEPTH_CLEAR_VALUE=: 16b0b73
GL_DEPTH_FUNC=: 16b0b74
GL_ACCUM_CLEAR_VALUE=: 16b0b80
GL_STENCIL_TEST=: 16b0b90
GL_STENCIL_CLEAR_VALUE=: 16b0b91
GL_STENCIL_FUNC=: 16b0b92
GL_STENCIL_VALUE_MASK=: 16b0b93
GL_STENCIL_FAIL=: 16b0b94
GL_STENCIL_PASS_DEPTH_FAIL=: 16b0b95
GL_STENCIL_PASS_DEPTH_PASS=: 16b0b96
GL_STENCIL_REF=: 16b0b97
GL_STENCIL_WRITEMASK=: 16b0b98
GL_MATRIX_MODE=: 16b0ba0
GL_NORMALIZE=: 16b0ba1
GL_VIEWPORT=: 16b0ba2
GL_MODELVIEW_STACK_DEPTH=: 16b0ba3
GL_PROJECTION_STACK_DEPTH=: 16b0ba4
GL_TEXTURE_STACK_DEPTH=: 16b0ba5
GL_MODELVIEW_MATRIX=: 16b0ba6
GL_PROJECTION_MATRIX=: 16b0ba7
GL_TEXTURE_MATRIX=: 16b0ba8
GL_ATTRIB_STACK_DEPTH=: 16b0bb0
GL_CLIENT_ATTRIB_STACK_DEPTH=: 16b0bb1
GL_ALPHA_TEST=: 16b0bc0
GL_ALPHA_TEST_FUNC=: 16b0bc1
GL_ALPHA_TEST_REF=: 16b0bc2
GL_DITHER=: 16b0bd0
GL_BLEND_DST=: 16b0be0
GL_BLEND_SRC=: 16b0be1
GL_BLEND=: 16b0be2
GL_LOGIC_OP_MODE=: 16b0bf0
GL_INDEX_LOGIC_OP=: 16b0bf1
GL_COLOR_LOGIC_OP=: 16b0bf2
GL_AUX_BUFFERS=: 16b0c00
GL_DRAW_BUFFER=: 16b0c01
GL_READ_BUFFER=: 16b0c02
GL_SCISSOR_BOX=: 16b0c10
GL_SCISSOR_TEST=: 16b0c11
GL_INDEX_CLEAR_VALUE=: 16b0c20
GL_INDEX_WRITEMASK=: 16b0c21
GL_COLOR_CLEAR_VALUE=: 16b0c22
GL_COLOR_WRITEMASK=: 16b0c23
GL_INDEX_MODE=: 16b0c30
GL_RGBA_MODE=: 16b0c31
GL_DOUBLEBUFFER=: 16b0c32
GL_STEREO=: 16b0c33
GL_RENDER_MODE=: 16b0c40
GL_PERSPECTIVE_CORRECTION_HINT=: 16b0c50
GL_POINT_SMOOTH_HINT=: 16b0c51
GL_LINE_SMOOTH_HINT=: 16b0c52
GL_POLYGON_SMOOTH_HINT=: 16b0c53
GL_FOG_HINT=: 16b0c54
GL_TEXTURE_GEN_S=: 16b0c60
GL_TEXTURE_GEN_T=: 16b0c61
GL_TEXTURE_GEN_R=: 16b0c62
GL_TEXTURE_GEN_Q=: 16b0c63
GL_PIXEL_MAP_I_TO_I=: 16b0c70
GL_PIXEL_MAP_S_TO_S=: 16b0c71
GL_PIXEL_MAP_I_TO_R=: 16b0c72
GL_PIXEL_MAP_I_TO_G=: 16b0c73
GL_PIXEL_MAP_I_TO_B=: 16b0c74
GL_PIXEL_MAP_I_TO_A=: 16b0c75
GL_PIXEL_MAP_R_TO_R=: 16b0c76
GL_PIXEL_MAP_G_TO_G=: 16b0c77
GL_PIXEL_MAP_B_TO_B=: 16b0c78
GL_PIXEL_MAP_A_TO_A=: 16b0c79
GL_PIXEL_MAP_I_TO_I_SIZE=: 16b0cb0
GL_PIXEL_MAP_S_TO_S_SIZE=: 16b0cb1
GL_PIXEL_MAP_I_TO_R_SIZE=: 16b0cb2
GL_PIXEL_MAP_I_TO_G_SIZE=: 16b0cb3
GL_PIXEL_MAP_I_TO_B_SIZE=: 16b0cb4
GL_PIXEL_MAP_I_TO_A_SIZE=: 16b0cb5
GL_PIXEL_MAP_R_TO_R_SIZE=: 16b0cb6
GL_PIXEL_MAP_G_TO_G_SIZE=: 16b0cb7
GL_PIXEL_MAP_B_TO_B_SIZE=: 16b0cb8
GL_PIXEL_MAP_A_TO_A_SIZE=: 16b0cb9
GL_UNPACK_SWAP_BYTES=: 16b0cf0
GL_UNPACK_LSB_FIRST=: 16b0cf1
GL_UNPACK_ROW_LENGTH=: 16b0cf2
GL_UNPACK_SKIP_ROWS=: 16b0cf3
GL_UNPACK_SKIP_PIXELS=: 16b0cf4
GL_UNPACK_ALIGNMENT=: 16b0cf5
GL_PACK_SWAP_BYTES=: 16b0d00
GL_PACK_LSB_FIRST=: 16b0d01
GL_PACK_ROW_LENGTH=: 16b0d02
GL_PACK_SKIP_ROWS=: 16b0d03
GL_PACK_SKIP_PIXELS=: 16b0d04
GL_PACK_ALIGNMENT=: 16b0d05
GL_MAP_COLOR=: 16b0d10
GL_MAP_STENCIL=: 16b0d11
GL_INDEX_SHIFT=: 16b0d12
GL_INDEX_OFFSET=: 16b0d13
GL_RED_SCALE=: 16b0d14
GL_RED_BIAS=: 16b0d15
GL_ZOOM_X=: 16b0d16
GL_ZOOM_Y=: 16b0d17
GL_GREEN_SCALE=: 16b0d18
GL_GREEN_BIAS=: 16b0d19
GL_BLUE_SCALE=: 16b0d1a
GL_BLUE_BIAS=: 16b0d1b
GL_ALPHA_SCALE=: 16b0d1c
GL_ALPHA_BIAS=: 16b0d1d
GL_DEPTH_SCALE=: 16b0d1e
GL_DEPTH_BIAS=: 16b0d1f
GL_MAX_EVAL_ORDER=: 16b0d30
GL_MAX_LIGHTS=: 16b0d31
GL_MAX_CLIP_PLANES=: 16b0d32
GL_MAX_TEXTURE_SIZE=: 16b0d33
GL_MAX_PIXEL_MAP_TABLE=: 16b0d34
GL_MAX_ATTRIB_STACK_DEPTH=: 16b0d35
GL_MAX_MODELVIEW_STACK_DEPTH=: 16b0d36
GL_MAX_NAME_STACK_DEPTH=: 16b0d37
GL_MAX_PROJECTION_STACK_DEPTH=: 16b0d38
GL_MAX_TEXTURE_STACK_DEPTH=: 16b0d39
GL_MAX_VIEWPORT_DIMS=: 16b0d3a
GL_MAX_CLIENT_ATTRIB_STACK_DEPTH=: 16b0d3b
GL_SUBPIXEL_BITS=: 16b0d50
GL_INDEX_BITS=: 16b0d51
GL_RED_BITS=: 16b0d52
GL_GREEN_BITS=: 16b0d53
GL_BLUE_BITS=: 16b0d54
GL_ALPHA_BITS=: 16b0d55
GL_DEPTH_BITS=: 16b0d56
GL_STENCIL_BITS=: 16b0d57
GL_ACCUM_RED_BITS=: 16b0d58
GL_ACCUM_GREEN_BITS=: 16b0d59
GL_ACCUM_BLUE_BITS=: 16b0d5a
GL_ACCUM_ALPHA_BITS=: 16b0d5b
GL_NAME_STACK_DEPTH=: 16b0d70
GL_AUTO_NORMAL=: 16b0d80
GL_MAP1_COLOR_4=: 16b0d90
GL_MAP1_INDEX=: 16b0d91
GL_MAP1_NORMAL=: 16b0d92
GL_MAP1_TEXTURE_COORD_1=: 16b0d93
GL_MAP1_TEXTURE_COORD_2=: 16b0d94
GL_MAP1_TEXTURE_COORD_3=: 16b0d95
GL_MAP1_TEXTURE_COORD_4=: 16b0d96
GL_MAP1_VERTEX_3=: 16b0d97
GL_MAP1_VERTEX_4=: 16b0d98
GL_MAP2_COLOR_4=: 16b0db0
GL_MAP2_INDEX=: 16b0db1
GL_MAP2_NORMAL=: 16b0db2
GL_MAP2_TEXTURE_COORD_1=: 16b0db3
GL_MAP2_TEXTURE_COORD_2=: 16b0db4
GL_MAP2_TEXTURE_COORD_3=: 16b0db5
GL_MAP2_TEXTURE_COORD_4=: 16b0db6
GL_MAP2_VERTEX_3=: 16b0db7
GL_MAP2_VERTEX_4=: 16b0db8
GL_MAP1_GRID_DOMAIN=: 16b0dd0
GL_MAP1_GRID_SEGMENTS=: 16b0dd1
GL_MAP2_GRID_DOMAIN=: 16b0dd2
GL_MAP2_GRID_SEGMENTS=: 16b0dd3
GL_TEXTURE_1D=: 16b0de0
GL_TEXTURE_2D=: 16b0de1
GL_FEEDBACK_BUFFER_POINTER=: 16b0df0
GL_FEEDBACK_BUFFER_SIZE=: 16b0df1
GL_FEEDBACK_BUFFER_TYPE=: 16b0df2
GL_SELECTION_BUFFER_POINTER=: 16b0df3
GL_SELECTION_BUFFER_SIZE=: 16b0df4
GL_TEXTURE_WIDTH=: 16b1000
GL_TEXTURE_HEIGHT=: 16b1001
GL_TEXTURE_COMPONENTS=: 16b1003
GL_TEXTURE_BORDER_COLOR=: 16b1004
GL_TEXTURE_BORDER=: 16b1005
GL_DONT_CARE=: 16b1100
GL_FASTEST=: 16b1101
GL_NICEST=: 16b1102
GL_LIGHT0=: 16b4000
GL_LIGHT1=: 16b4001
GL_LIGHT2=: 16b4002
GL_LIGHT3=: 16b4003
GL_LIGHT4=: 16b4004
GL_LIGHT5=: 16b4005
GL_LIGHT6=: 16b4006
GL_LIGHT7=: 16b4007
GL_AMBIENT=: 16b1200
GL_DIFFUSE=: 16b1201
GL_SPECULAR=: 16b1202
GL_POSITION=: 16b1203
GL_SPOT_DIRECTION=: 16b1204
GL_SPOT_EXPONENT=: 16b1205
GL_SPOT_CUTOFF=: 16b1206
GL_CONSTANT_ATTENUATION=: 16b1207
GL_LINEAR_ATTENUATION=: 16b1208
GL_QUADRATIC_ATTENUATION=: 16b1209
GL_COMPILE=: 16b1300
GL_COMPILE_AND_EXECUTE=: 16b1301
GL_CLEAR=: 16b1500
GL_AND=: 16b1501
GL_AND_REVERSE=: 16b1502
GL_COPY=: 16b1503
GL_AND_INVERTED=: 16b1504
GL_NOOP=: 16b1505
GL_XOR=: 16b1506
GL_OR=: 16b1507
GL_NOR=: 16b1508
GL_EQUIV=: 16b1509
GL_INVERT=: 16b150a
GL_OR_REVERSE=: 16b150b
GL_COPY_INVERTED=: 16b150c
GL_OR_INVERTED=: 16b150d
GL_NAND=: 16b150e
GL_SET=: 16b150f
GL_EMISSION=: 16b1600
GL_SHININESS=: 16b1601
GL_AMBIENT_AND_DIFFUSE=: 16b1602
GL_COLOR_INDEXES=: 16b1603
GL_MODELVIEW=: 16b1700
GL_PROJECTION=: 16b1701
GL_TEXTURE=: 16b1702
GL_COLOR=: 16b1800
GL_DEPTH=: 16b1801
GL_STENCIL=: 16b1802
GL_COLOR_INDEX=: 16b1900
GL_STENCIL_INDEX=: 16b1901
GL_DEPTH_COMPONENT=: 16b1902
GL_RED=: 16b1903
GL_GREEN=: 16b1904
GL_BLUE=: 16b1905
GL_ALPHA=: 16b1906
GL_RGB=: 16b1907
GL_RGBA=: 16b1908
GL_LUMINANCE=: 16b1909
GL_LUMINANCE_ALPHA=: 16b190a
GL_BITMAP=: 16b1a00
GL_POINT=: 16b1b00
GL_LINE=: 16b1b01
GL_FILL=: 16b1b02
GL_RENDER=: 16b1c00
GL_FEEDBACK=: 16b1c01
GL_SELECT=: 16b1c02
GL_FLAT=: 16b1d00
GL_SMOOTH=: 16b1d01
GL_KEEP=: 16b1e00
GL_REPLACE=: 16b1e01
GL_INCR=: 16b1e02
GL_DECR=: 16b1e03
GL_VENDOR=: 16b1f00
GL_RENDERER=: 16b1f01
GL_VERSION=: 16b1f02
GL_EXTENSIONS=: 16b1f03
GL_S=: 16b2000
GL_T=: 16b2001
GL_R=: 16b2002
GL_Q=: 16b2003
GL_MODULATE=: 16b2100
GL_DECAL=: 16b2101
GL_TEXTURE_ENV_MODE=: 16b2200
GL_TEXTURE_ENV_COLOR=: 16b2201
GL_TEXTURE_ENV=: 16b2300
GL_EYE_LINEAR=: 16b2400
GL_OBJECT_LINEAR=: 16b2401
GL_SPHERE_MAP=: 16b2402
GL_TEXTURE_GEN_MODE=: 16b2500
GL_OBJECT_PLANE=: 16b2501
GL_EYE_PLANE=: 16b2502
GL_NEAREST=: 16b2600
GL_LINEAR=: 16b2601
GL_NEAREST_MIPMAP_NEAREST=: 16b2700
GL_LINEAR_MIPMAP_NEAREST=: 16b2701
GL_NEAREST_MIPMAP_LINEAR=: 16b2702
GL_LINEAR_MIPMAP_LINEAR=: 16b2703
GL_TEXTURE_MAG_FILTER=: 16b2800
GL_TEXTURE_MIN_FILTER=: 16b2801
GL_TEXTURE_WRAP_S=: 16b2802
GL_TEXTURE_WRAP_T=: 16b2803
GL_CLAMP=: 16b2900
GL_REPEAT=: 16b2901
GL_CLIENT_PIXEL_STORE_BIT=: 16b00000001
GL_CLIENT_VERTEX_ARRAY_BIT=: 16b00000002
GL_CLIENT_ALL_ATTRIB_BITS=: 16bffffffff
GL_POLYGON_OFFSET_FACTOR=: 16b8038
GL_POLYGON_OFFSET_UNITS=: 16b2a00
GL_POLYGON_OFFSET_POINT=: 16b2a01
GL_POLYGON_OFFSET_LINE=: 16b2a02
GL_POLYGON_OFFSET_FILL=: 16b8037
GL_ALPHA4=: 16b803b
GL_ALPHA8=: 16b803c
GL_ALPHA12=: 16b803d
GL_ALPHA16=: 16b803e
GL_LUMINANCE4=: 16b803f
GL_LUMINANCE8=: 16b8040
GL_LUMINANCE12=: 16b8041
GL_LUMINANCE16=: 16b8042
GL_LUMINANCE4_ALPHA4=: 16b8043
GL_LUMINANCE6_ALPHA2=: 16b8044
GL_LUMINANCE8_ALPHA8=: 16b8045
GL_LUMINANCE12_ALPHA4=: 16b8046
GL_LUMINANCE12_ALPHA12=: 16b8047
GL_LUMINANCE16_ALPHA16=: 16b8048
GL_INTENSITY=: 16b8049
GL_INTENSITY4=: 16b804a
GL_INTENSITY8=: 16b804b
GL_INTENSITY12=: 16b804c
GL_INTENSITY16=: 16b804d
GL_R3_G3_B2=: 16b2a10
GL_RGB4=: 16b804f
GL_RGB5=: 16b8050
GL_RGB8=: 16b8051
GL_RGB10=: 16b8052
GL_RGB12=: 16b8053
GL_RGB16=: 16b8054
GL_RGBA2=: 16b8055
GL_RGBA4=: 16b8056
GL_RGB5_A1=: 16b8057
GL_RGBA8=: 16b8058
GL_RGB10_A2=: 16b8059
GL_RGBA12=: 16b805a
GL_RGBA16=: 16b805b
GL_TEXTURE_RED_SIZE=: 16b805c
GL_TEXTURE_GREEN_SIZE=: 16b805d
GL_TEXTURE_BLUE_SIZE=: 16b805e
GL_TEXTURE_ALPHA_SIZE=: 16b805f
GL_TEXTURE_LUMINANCE_SIZE=: 16b8060
GL_TEXTURE_INTENSITY_SIZE=: 16b8061
GL_PROXY_TEXTURE_1D=: 16b8063
GL_PROXY_TEXTURE_2D=: 16b8064
GL_TEXTURE_PRIORITY=: 16b8066
GL_TEXTURE_RESIDENT=: 16b8067
GL_TEXTURE_BINDING_1D=: 16b8068
GL_TEXTURE_BINDING_2D=: 16b8069
GL_VERTEX_ARRAY=: 16b8074
GL_NORMAL_ARRAY=: 16b8075
GL_COLOR_ARRAY=: 16b8076
GL_INDEX_ARRAY=: 16b8077
GL_TEXTURE_COORD_ARRAY=: 16b8078
GL_EDGE_FLAG_ARRAY=: 16b8079
GL_VERTEX_ARRAY_SIZE=: 16b807a
GL_VERTEX_ARRAY_TYPE=: 16b807b
GL_VERTEX_ARRAY_STRIDE=: 16b807c
GL_NORMAL_ARRAY_TYPE=: 16b807e
GL_NORMAL_ARRAY_STRIDE=: 16b807f
GL_COLOR_ARRAY_SIZE=: 16b8081
GL_COLOR_ARRAY_TYPE=: 16b8082
GL_COLOR_ARRAY_STRIDE=: 16b8083
GL_INDEX_ARRAY_TYPE=: 16b8085
GL_INDEX_ARRAY_STRIDE=: 16b8086
GL_TEXTURE_COORD_ARRAY_SIZE=: 16b8088
GL_TEXTURE_COORD_ARRAY_TYPE=: 16b8089
GL_TEXTURE_COORD_ARRAY_STRIDE=: 16b808a
GL_EDGE_FLAG_ARRAY_STRIDE=: 16b808c
GL_VERTEX_ARRAY_POINTER=: 16b808e
GL_NORMAL_ARRAY_POINTER=: 16b808f
GL_COLOR_ARRAY_POINTER=: 16b8090
GL_INDEX_ARRAY_POINTER=: 16b8091
GL_TEXTURE_COORD_ARRAY_POINTER=: 16b8092
GL_EDGE_FLAG_ARRAY_POINTER=: 16b8093
GL_V2F=: 16b2a20
GL_V3F=: 16b2a21
GL_C4UB_V2F=: 16b2a22
GL_C4UB_V3F=: 16b2a23
GL_C3F_V3F=: 16b2a24
GL_N3F_V3F=: 16b2a25
GL_C4F_N3F_V3F=: 16b2a26
GL_T2F_V3F=: 16b2a27
GL_T4F_V4F=: 16b2a28
GL_T2F_C4UB_V3F=: 16b2a29
GL_T2F_C3F_V3F=: 16b2a2a
GL_T2F_N3F_V3F=: 16b2a2b
GL_T2F_C4F_N3F_V3F=: 16b2a2c
GL_T4F_C4F_N3F_V4F=: 16b2a2d
GL_EXT_vertex_array=: 1
GL_WIN_swap_hint=: 1
GL_EXT_bgra=: 1
GL_EXT_paletted_texture=: 1
GL_EXT_clip_disable=: 1
GL_VERTEX_ARRAY_EXT=: 16b8074
GL_NORMAL_ARRAY_EXT=: 16b8075
GL_COLOR_ARRAY_EXT=: 16b8076
GL_INDEX_ARRAY_EXT=: 16b8077
GL_TEXTURE_COORD_ARRAY_EXT=: 16b8078
GL_EDGE_FLAG_ARRAY_EXT=: 16b8079
GL_VERTEX_ARRAY_SIZE_EXT=: 16b807a
GL_VERTEX_ARRAY_TYPE_EXT=: 16b807b
GL_VERTEX_ARRAY_STRIDE_EXT=: 16b807c
GL_VERTEX_ARRAY_COUNT_EXT=: 16b807d
GL_NORMAL_ARRAY_TYPE_EXT=: 16b807e
GL_NORMAL_ARRAY_STRIDE_EXT=: 16b807f
GL_NORMAL_ARRAY_COUNT_EXT=: 16b8080
GL_COLOR_ARRAY_SIZE_EXT=: 16b8081
GL_COLOR_ARRAY_TYPE_EXT=: 16b8082
GL_COLOR_ARRAY_STRIDE_EXT=: 16b8083
GL_COLOR_ARRAY_COUNT_EXT=: 16b8084
GL_INDEX_ARRAY_TYPE_EXT=: 16b8085
GL_INDEX_ARRAY_STRIDE_EXT=: 16b8086
GL_INDEX_ARRAY_COUNT_EXT=: 16b8087
GL_TEXTURE_COORD_ARRAY_SIZE_EXT=: 16b8088
GL_TEXTURE_COORD_ARRAY_TYPE_EXT=: 16b8089
GL_TEXTURE_COORD_ARRAY_STRIDE_EXT=: 16b808a
GL_TEXTURE_COORD_ARRAY_COUNT_EXT=: 16b808b
GL_EDGE_FLAG_ARRAY_STRIDE_EXT=: 16b808c
GL_EDGE_FLAG_ARRAY_COUNT_EXT=: 16b808d
GL_VERTEX_ARRAY_POINTER_EXT=: 16b808e
GL_NORMAL_ARRAY_POINTER_EXT=: 16b808f
GL_COLOR_ARRAY_POINTER_EXT=: 16b8090
GL_INDEX_ARRAY_POINTER_EXT=: 16b8091
GL_TEXTURE_COORD_ARRAY_POINTER_EXT=: 16b8092
GL_EDGE_FLAG_ARRAY_POINTER_EXT=: 16b8093
GL_DOUBLE_EXT=: gl_double
GL_BGR_EXT=: 16b80e0
GL_BGRA_EXT=: 16b80e1
GL_COLOR_TABLE_FORMAT_EXT=: 16b80d8
GL_COLOR_TABLE_WIDTH_EXT=: 16b80d9
GL_COLOR_TABLE_RED_SIZE_EXT=: 16b80da
GL_COLOR_TABLE_GREEN_SIZE_EXT=: 16b80db
GL_COLOR_TABLE_BLUE_SIZE_EXT=: 16b80dc
GL_COLOR_TABLE_ALPHA_SIZE_EXT=: 16b80dd
GL_COLOR_TABLE_LUMINANCE_SIZE_EXT=: 16b80de
GL_COLOR_TABLE_INTENSITY_SIZE_EXT=: 16b80df
GL_COLOR_INDEX1_EXT=: 16b80e2
GL_COLOR_INDEX2_EXT=: 16b80e3
GL_COLOR_INDEX4_EXT=: 16b80e4
GL_COLOR_INDEX8_EXT=: 16b80e5
GL_COLOR_INDEX12_EXT=: 16b80e6
GL_COLOR_INDEX16_EXT=: 16b80e7
GL_CLIP_EXT=: 16b80f0
GL_LOGIC_OP=: gl_index_logic_op

WGL_FONT_LINES=: 0
WGL_FONT_POLYGONS=: 1

GLU_VERSION_1_1=: 1
GLU_VERSION_1_2=: 1
GLU_INVALID_ENUM=: 100900
GLU_INVALID_VALUE=: 100901
GLU_OUT_OF_MEMORY=: 100902
GLU_INCOMPATIBLE_GL_VERSION=: 100903
GLU_VERSION=: 100800
GLU_EXTENSIONS=: 100801
GLU_TRUE=: GL_TRUE
GLU_FALSE=: GL_FALSE
GLU_SMOOTH=: 100000
GLU_FLAT=: 100001
GLU_NONE=: 100002
GLU_POINT=: 100010
GLU_LINE=: 100011
GLU_FILL=: 100012
GLU_SILHOUETTE=: 100013
GLU_OUTSIDE=: 100020
GLU_INSIDE=: 100021
GLU_TESS_MAX_COORD=: 1.0e150
GLU_TESS_WINDING_RULE=: 100140
GLU_TESS_BOUNDARY_ONLY=: 100141
GLU_TESS_TOLERANCE=: 100142
GLU_TESS_WINDING_ODD=: 100130
GLU_TESS_WINDING_NONZERO=: 100131
GLU_TESS_WINDING_POSITIVE=: 100132
GLU_TESS_WINDING_NEGATIVE=: 100133
GLU_TESS_WINDING_ABS_GEQ_TWO=: 100134
GLU_TESS_BEGIN=: 100100
GLU_TESS_VERTEX=: 100101
GLU_TESS_END=: 100102
GLU_TESS_ERROR=: 100103
GLU_TESS_EDGE_FLAG=: 100104
GLU_TESS_COMBINE=: 100105
GLU_TESS_BEGIN_DATA=: 100106
GLU_TESS_VERTEX_DATA=: 100107
GLU_TESS_END_DATA=: 100108
GLU_TESS_ERROR_DATA=: 100109
GLU_TESS_EDGE_FLAG_DATA=: 100110
GLU_TESS_COMBINE_DATA=: 100111
GLU_TESS_ERROR1=: 100151
GLU_TESS_ERROR2=: 100152
GLU_TESS_ERROR3=: 100153
GLU_TESS_ERROR4=: 100154
GLU_TESS_ERROR5=: 100155
GLU_TESS_ERROR6=: 100156
GLU_TESS_ERROR7=: 100157
GLU_TESS_ERROR8=: 100158
GLU_TESS_MISSING_BEGIN_POLYGON=: GLU_TESS_ERROR1
GLU_TESS_MISSING_BEGIN_CONTOUR=: GLU_TESS_ERROR2
GLU_TESS_MISSING_END_POLYGON=: GLU_TESS_ERROR3
GLU_TESS_MISSING_END_CONTOUR=: GLU_TESS_ERROR4
GLU_TESS_COORD_TOO_LARGE=: GLU_TESS_ERROR5
GLU_TESS_NEED_COMBINE_CALLBACK=: GLU_TESS_ERROR6
GLU_AUTO_LOAD_MATRIX=: 100200
GLU_CULLING=: 100201
GLU_SAMPLING_TOLERANCE=: 100203
GLU_DISPLAY_MODE=: 100204
GLU_PARAMETRIC_TOLERANCE=: 100202
GLU_SAMPLING_METHOD=: 100205
GLU_U_STEP=: 100206
GLU_V_STEP=: 100207
GLU_PATH_LENGTH=: 100215
GLU_PARAMETRIC_ERROR=: 100216
GLU_DOMAIN_DISTANCE=: 100217
GLU_MAP1_TRIM_2=: 100210
GLU_MAP1_TRIM_3=: 100211
GLU_OUTLINE_POLYGON=: 100240
GLU_OUTLINE_PATCH=: 100241
GLU_NURBS_ERROR1=: 100251
GLU_NURBS_ERROR2=: 100252
GLU_NURBS_ERROR3=: 100253
GLU_NURBS_ERROR4=: 100254
GLU_NURBS_ERROR5=: 100255
GLU_NURBS_ERROR6=: 100256
GLU_NURBS_ERROR7=: 100257
GLU_NURBS_ERROR8=: 100258
GLU_NURBS_ERROR9=: 100259
GLU_NURBS_ERROR10=: 100260
GLU_NURBS_ERROR11=: 100261
GLU_NURBS_ERROR12=: 100262
GLU_NURBS_ERROR13=: 100263
GLU_NURBS_ERROR14=: 100264
GLU_NURBS_ERROR15=: 100265
GLU_NURBS_ERROR16=: 100266
GLU_NURBS_ERROR17=: 100267
GLU_NURBS_ERROR18=: 100268
GLU_NURBS_ERROR19=: 100269
GLU_NURBS_ERROR20=: 100270
GLU_NURBS_ERROR21=: 100271
GLU_NURBS_ERROR22=: 100272
GLU_NURBS_ERROR23=: 100273
GLU_NURBS_ERROR24=: 100274
GLU_NURBS_ERROR25=: 100275
GLU_NURBS_ERROR26=: 100276
GLU_NURBS_ERROR27=: 100277
GLU_NURBS_ERROR28=: 100278
GLU_NURBS_ERROR29=: 100279
GLU_NURBS_ERROR30=: 100280
GLU_NURBS_ERROR31=: 100281
GLU_NURBS_ERROR32=: 100282
GLU_NURBS_ERROR33=: 100283
GLU_NURBS_ERROR34=: 100284
GLU_NURBS_ERROR35=: 100285
GLU_NURBS_ERROR36=: 100286
GLU_NURBS_ERROR37=: 100287
GLU_CW=: 100120
GLU_CCW=: 100121
GLU_INTERIOR=: 100122
GLU_EXTERIOR=: 100123
GLU_UNKNOWN=: 100124
GLU_BEGIN=: GLU_TESS_BEGIN
GLU_VERTEX=: GLU_TESS_VERTEX
GLU_END=: GLU_TESS_END
GLU_ERROR=: GLU_TESS_ERROR
GLU_EDGE_FLAG=: GLU_TESS_EDGE_FLAG

glpaint=: 11!:2020
glpaintx=: 11!:2021
glshow=: 11!:2036
glshowx=: 11!:2037
glqwh=: 11!:2059
glcapture=: 11!:2062
glbmp=: 11!:2063
glbmpxywh=: 11!:2064
glfile=: 11!:2066
glsavebmp=: 11!:2067

glAccum=: 11!:3001
glAlphaFunc=: 11!:3002
glAreTexturesResident=: 11!:3003
glArrayElement=: 11!:3004
glBegin=: 11!:3005
glBindTexture=: 11!:3006
glBitmap=: 11!:3007
glBlendFunc=: 11!:3008
glCallList=: 11!:3009
glCallLists=: 11!:3010
glClear=: 11!:3011
glClearAccum=: 11!:3012
glClearColor=: 11!:3013
glClearDepth=: 11!:3014
glClearIndex=: 11!:3015
glClearStencil=: 11!:3016
glClipPlane=: 11!:3017
glColor=: 11!:3018
glColorMask=: 11!:3019
glColorMaterial=: 11!:3020
glColorPointer=: 11!:3021
glCopyPixels=: 11!:3022
glCopyTexImage=: 11!:3023
glCopyTexSubImage=: 11!:3024
glCullFace=: 11!:3025
glDeleteLists=: 11!:3026
glDeleteTextures=: 11!:3027
glDepthFunc=: 11!:3028
glDepthMask=: 11!:3029
glDepthRange=: 11!:3030
glDisable=: 11!:3031
glDisableClientState=: 11!:3032
glDrawArrays=: 11!:3033
glDrawBuffer=: 11!:3034
glDrawElements=: 11!:3035
glDrawPixels=: 11!:3036
glEdgeFlag=: 11!:3037
glEdgeFlagPointer=: 11!:3038
glEnable=: 11!:3039
glEnableClientState=: 11!:3040
glEnd=: 11!:3041
glEndList=: 11!:3042
glEvalCoord1=: 11!:3043
glEvalCoord2=: 11!:3044
glEvalMesh1=: 11!:3045
glEvalMesh2=: 11!:3046
glEvalPoint1=: 11!:3047
glEvalPoint2=: 11!:3048
glFeedbackBuffer=: 11!:3049
glFinish=: 11!:3050
glFlush=: 11!:3051
glFog=: 11!:3052
glFrontFace=: 11!:3053
glFrustum=: 11!:3054
glGenLists=: 11!:3055
glGenTextures=: 11!:3056
glGetClipPlane=: 11!:3058
glGetDouble=: 11!:3059
glGetError=: 11!:3060
glGetInteger=: 11!:3061
glGetLight=: 11!:3062
glGetMap=: 11!:3063
glGetMaterial=: 11!:3064
glGetPixelMap=: 11!:3065
glGetPolygonStipple=: 11!:3068
glGetString=: 11!:3069
glGetTexEnv=: 11!:3070
glGetTexGen=: 11!:3071
glGetTexImage=: 11!:3072
glGetTexLevelParameter=: 11!:3074
glGetTexParameter=: 11!:3075
glHint=: 11!:3076
glIndexMask=: 11!:3077
glIndexPointer=: 11!:3078
glIndex=: 11!:3079
glInitNames=: 11!:3082
glInterleavedArrays=: 11!:3083
glIsEnabled=: 11!:3084
glIsList=: 11!:3085
glIsTexture=: 11!:3086
glLightModel=: 11!:3087
glLight=: 11!:3088
glLineStipple=: 11!:3089
glLineWidth=: 11!:3090
glListBase=: 11!:3091
glLoadIdentity=: 11!:3092
glLoadMatrix=: 11!:3093
glLoadName=: 11!:3094
glLogicOp=: 11!:3095
glMap1=: 11!:3096
glMap2=: 11!:3097
glMapGrid1=: 11!:3098
glMapGrid2=: 11!:3099
glMaterial=: 11!:3100
glMatrixMode=: 11!:3101
glMultMatrix=: 11!:3102
glNewList=: 11!:3103
glNormal=: 11!:3104
glNormalPointer=: 11!:3105
glOrtho=: 11!:3106
glPassThrough=: 11!:3107
glPixelMap=: 11!:3108
glPixelStore=: 11!:3110
glPixelTransfer=: 11!:3111
glPixelZoom=: 11!:3112
glPointSize=: 11!:3113
glPolygonMode=: 11!:3114
glPolygonOffset=: 11!:3115
glPolygonStipple=: 11!:3116
glPopAttrib=: 11!:3117
glPopClientAttrib=: 11!:3118
glPopMatrix=: 11!:3119
glPopName=: 11!:3120
glPrioritizeTextures=: 11!:3121
glPushAttrib=: 11!:3122
glPushClientAttrib=: 11!:3123
glPushMatrix=: 11!:3124
glPushName=: 11!:3125
glRasterPos=: 11!:3126
glReadBuffer=: 11!:3127
glReadPixels=: 11!:3128
glRect=: 11!:3129
glRects=: 11!:3130
glRenderMode=: 11!:3131
glRotate=: 11!:3132
glScale=: 11!:3133
glScissor=: 11!:3134
glSelectBuffer=: 11!:3135
glShadeModel=: 11!:3136
glStencilFunc=: 11!:3137
glStencilMask=: 11!:3138
glStencilOp=: 11!:3139
glTexCoord=: 11!:3140
glTexCoordPointer=: 11!:3141
glTexEnv=: 11!:3142
glTexGen=: 11!:3143
glTexImage1D=: 11!:3144
glTexImage2D=: 11!:3145
glTexParameter=: 11!:3146
glTexSubImage=: 11!:3147
glTranslate=: 11!:3148
glVertex=: 11!:3149
glVertexPointer=: 11!:3150
glViewport=: 11!:3151
gluErrorString=: 11!:3152
gluGetString=: 11!:3153
gluOrtho2D=: 11!:3154
gluPerspective=: 11!:3155
gluPickMatrix=: 11!:3156
gluLookAt=: 11!:3157
gluProject=: 11!:3158
gluUnProject=: 11!:3159
gluScaleImage=: 11!:3160
gluBuild1DMipmaps=: 11!:3161
gluBuild2DMipmaps=: 11!:3162
gluNewQuadric=: 11!:3163
gluDeleteQuadric=: 11!:3164
gluQuadricNormals=: 11!:3165
gluQuadricTexture=: 11!:3166
gluQuadricOrientation=: 11!:3167
gluQuadricDrawStyle=: 11!:3168
gluCylinder=: 11!:3169
gluDisk=: 11!:3170
gluPartialDisk=: 11!:3171
gluSphere=: 11!:3172
gluQuadricCallback=: 11!:3173
gluNewTess=: 11!:3174
gluDeleteTess=: 11!:3175
gluTessBeginPolygon=: 11!:3176
gluTessBeginContour=: 11!:3177
gluTessVertex=: 11!:3178
gluTessEndContour=: 11!:3179
gluTessEndPolygon=: 11!:3180
gluTessProperty=: 11!:3181
gluTessNormal=: 11!:3182
gluTessCallback=: 11!:3183
gluGetTessProperty=: 11!:3184
gluNewNurbsRenderer=: 11!:3185
gluDeleteNurbsRenderer=: 11!:3186
gluBeginSurface=: 11!:3187
gluBeginCurve=: 11!:3188
gluEndCurve=: 11!:3189
gluEndSurface=: 11!:3190
gluBeginTrim=: 11!:3191
gluEndTrim=: 11!:3192
gluPwlCurve=: 11!:3193
gluNurbsCurve=: 11!:3194
gluNurbsSurface=: 11!:3195
gluLoadSamplingMatrices=: 11!:3196
gluNurbsProperty=: 11!:3197
gluGetNurbsProperty=: 11!:3198
gluNurbsCallback=: 11!:3199
glaSwapBuffers=: 11!:3207
glaRC=: 11!:3208
glaUseFontBitmaps=: 11!:3209
glaUseFontOutlines=: 11!:3210
glaFont=: 11!:3211
glaGetErrors=: 11!:3212

require jpath'~system/packages/graphics/bmp.ijs'

glaSaveBMP=: 3 : 0
(2}.glGetInteger GL_VIEWPORT) glaSaveBMP y.
:
if. ''-:y. do. 'clipboard not supported' 13!:8]3 end.
glPushAttrib GL_PIXEL_MODE_BIT
b2=. glGetInteger GL_MAP_COLOR
glPushClientAttrib GL_CLIENT_PIXEL_STORE_BIT

glPixelTransfer ,.&1 GL_RED_SCALE,GL_GREEN_SCALE,GL_BLUE_SCALE,GL_ALPHA_SCALE
glPixelTransfer ,.&0 GL_RED_BIAS,GL_GREEN_BIAS,GL_BLUE_BIAS,GL_ALPHA_BIAS
glPixelTransfer GL_MAP_COLOR,0
glPixelStore GL_PACK_ALIGNMENT, 4

p=. glReadPixels 0 0,x.,GL_RGBA,GL_UNSIGNED_BYTE

glPopClientAttrib ''
glPixelTransfer GL_MAP_COLOR,b2
glPopAttrib ''

p=. 256 256 256#.a.i.|."1 }:"1 |. (4,~|.x.)$p

p writebmp_z_ y.;24
)
