mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-24 00:53:47 +00:00
Remove old/unused OpenGL files.
This commit is contained in:
parent
c354f59b72
commit
417a7ec4c4
21 changed files with 0 additions and 11339 deletions
|
|
@ -1,666 +0,0 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Copyright (c) 2012 GarageGames, LLC
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to
|
||||
// deal in the Software without restriction, including without limitation the
|
||||
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
// sell copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
// IN THE SOFTWARE.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
/*
|
||||
** License Applicability. Except to the extent portions of this file are
|
||||
** made subject to an alternative license as permitted in the SGI Free
|
||||
** Software License B, Version 1.1 (the "License"), the contents of this
|
||||
** file are subject only to the provisions of the License. You may not use
|
||||
** this file except in compliance with the License. You may obtain a copy
|
||||
** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
|
||||
** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
|
||||
**
|
||||
** http://oss.sgi.com/projects/FreeB
|
||||
**
|
||||
** Note that, as provided in the License, the Software is distributed on an
|
||||
** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
|
||||
** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
|
||||
** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
|
||||
** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
|
||||
**
|
||||
** Original Code. The Original Code is: OpenGL Sample Private,
|
||||
** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
|
||||
** Inc. The Original Code is Copyright (c) 1991-2002 Silicon Graphics, Inc.
|
||||
** Copyright in any portions created by third parties is as indicated
|
||||
** elsewhere herein. All Rights Reserved.
|
||||
**
|
||||
** Additional Notice Provisions: This software was created using the
|
||||
** OpenGL(R) version 1.2.1 Sample Private published by SGI, but has
|
||||
** not been independently verified as being compliant with the OpenGL(R)
|
||||
** version 1.2.1 Specification.
|
||||
*/
|
||||
|
||||
typedef unsigned int GLenum;
|
||||
typedef unsigned char GLboolean;
|
||||
typedef unsigned int GLbitfield;
|
||||
typedef void GLvoid;
|
||||
typedef signed char GLbyte; /* 1-byte signed */
|
||||
typedef short GLshort; /* 2-byte signed */
|
||||
typedef int GLint; /* 4-byte signed */
|
||||
typedef unsigned char GLubyte; /* 1-byte unsigned */
|
||||
typedef unsigned short GLushort; /* 2-byte unsigned */
|
||||
typedef unsigned int GLuint; /* 4-byte unsigned */
|
||||
typedef int GLsizei; /* 4-byte signed */
|
||||
typedef float GLfloat; /* single precision float */
|
||||
typedef float GLclampf; /* single precision float in [0,1] */
|
||||
typedef double GLdouble; /* double precision float */
|
||||
typedef double GLclampd; /* double precision float in [0,1] */
|
||||
|
||||
/* Boolean values */
|
||||
#define GL_FALSE 0x0
|
||||
#define GL_TRUE 0x1
|
||||
|
||||
/* Data types */
|
||||
#define GL_BYTE 0x1400
|
||||
#define GL_UNSIGNED_BYTE 0x1401
|
||||
#define GL_SHORT 0x1402
|
||||
#define GL_UNSIGNED_SHORT 0x1403
|
||||
#define GL_INT 0x1404
|
||||
#define GL_UNSIGNED_INT 0x1405
|
||||
#define GL_FLOAT 0x1406
|
||||
#define GL_DOUBLE 0x140A
|
||||
#define GL_2_BYTES 0x1407
|
||||
#define GL_3_BYTES 0x1408
|
||||
#define GL_4_BYTES 0x1409
|
||||
|
||||
/* Primitives */
|
||||
#define GL_POINTS 0x0000
|
||||
#define GL_LINES 0x0001
|
||||
#define GL_LINE_LOOP 0x0002
|
||||
#define GL_LINE_STRIP 0x0003
|
||||
#define GL_TRIANGLES 0x0004
|
||||
#define GL_TRIANGLE_STRIP 0x0005
|
||||
#define GL_TRIANGLE_FAN 0x0006
|
||||
#define GL_QUADS 0x0007
|
||||
#define GL_QUAD_STRIP 0x0008
|
||||
#define GL_POLYGON 0x0009
|
||||
|
||||
/* Vertex Arrays */
|
||||
#define GL_VERTEX_ARRAY 0x8074
|
||||
#define GL_NORMAL_ARRAY 0x8075
|
||||
#define GL_COLOR_ARRAY 0x8076
|
||||
#define GL_INDEX_ARRAY 0x8077
|
||||
#define GL_TEXTURE_COORD_ARRAY 0x8078
|
||||
#define GL_EDGE_FLAG_ARRAY 0x8079
|
||||
#define GL_VERTEX_ARRAY_SIZE 0x807A
|
||||
#define GL_VERTEX_ARRAY_TYPE 0x807B
|
||||
#define GL_VERTEX_ARRAY_STRIDE 0x807C
|
||||
#define GL_NORMAL_ARRAY_TYPE 0x807E
|
||||
#define GL_NORMAL_ARRAY_STRIDE 0x807F
|
||||
#define GL_COLOR_ARRAY_SIZE 0x8081
|
||||
#define GL_COLOR_ARRAY_TYPE 0x8082
|
||||
#define GL_COLOR_ARRAY_STRIDE 0x8083
|
||||
#define GL_INDEX_ARRAY_TYPE 0x8085
|
||||
#define GL_INDEX_ARRAY_STRIDE 0x8086
|
||||
#define GL_TEXTURE_COORD_ARRAY_SIZE 0x8088
|
||||
#define GL_TEXTURE_COORD_ARRAY_TYPE 0x8089
|
||||
#define GL_TEXTURE_COORD_ARRAY_STRIDE 0x808A
|
||||
#define GL_EDGE_FLAG_ARRAY_STRIDE 0x808C
|
||||
#define GL_VERTEX_ARRAY_POINTER 0x808E
|
||||
#define GL_NORMAL_ARRAY_POINTER 0x808F
|
||||
#define GL_COLOR_ARRAY_POINTER 0x8090
|
||||
#define GL_INDEX_ARRAY_POINTER 0x8091
|
||||
#define GL_TEXTURE_COORD_ARRAY_POINTER 0x8092
|
||||
#define GL_EDGE_FLAG_ARRAY_POINTER 0x8093
|
||||
#define GL_V2F 0x2A20
|
||||
#define GL_V3F 0x2A21
|
||||
#define GL_C4UB_V2F 0x2A22
|
||||
#define GL_C4UB_V3F 0x2A23
|
||||
#define GL_C3F_V3F 0x2A24
|
||||
#define GL_N3F_V3F 0x2A25
|
||||
#define GL_C4F_N3F_V3F 0x2A26
|
||||
#define GL_T2F_V3F 0x2A27
|
||||
#define GL_T4F_V4F 0x2A28
|
||||
#define GL_T2F_C4UB_V3F 0x2A29
|
||||
#define GL_T2F_C3F_V3F 0x2A2A
|
||||
#define GL_T2F_N3F_V3F 0x2A2B
|
||||
#define GL_T2F_C4F_N3F_V3F 0x2A2C
|
||||
#define GL_T4F_C4F_N3F_V4F 0x2A2D
|
||||
|
||||
/* Matrix Mode */
|
||||
#define GL_MATRIX_MODE 0x0BA0
|
||||
#define GL_MODELVIEW 0x1700
|
||||
#define GL_PROJECTION 0x1701
|
||||
#define GL_TEXTURE 0x1702
|
||||
|
||||
/* Points */
|
||||
#define GL_POINT_SMOOTH 0x0B10
|
||||
#define GL_POINT_SIZE 0x0B11
|
||||
#define GL_POINT_SIZE_GRANULARITY 0x0B13
|
||||
#define GL_POINT_SIZE_RANGE 0x0B12
|
||||
|
||||
/* Lines */
|
||||
#define GL_LINE_SMOOTH 0x0B20
|
||||
#define GL_LINE_STIPPLE 0x0B24
|
||||
#define GL_LINE_STIPPLE_PATTERN 0x0B25
|
||||
#define GL_LINE_STIPPLE_REPEAT 0x0B26
|
||||
#define GL_LINE_WIDTH 0x0B21
|
||||
#define GL_LINE_WIDTH_GRANULARITY 0x0B23
|
||||
#define GL_LINE_WIDTH_RANGE 0x0B22
|
||||
|
||||
/* Polygons */
|
||||
#define GL_POINT 0x1B00
|
||||
#define GL_LINE 0x1B01
|
||||
#define GL_FILL 0x1B02
|
||||
#define GL_CW 0x0900
|
||||
#define GL_CCW 0x0901
|
||||
#define GL_FRONT 0x0404
|
||||
#define GL_BACK 0x0405
|
||||
#define GL_POLYGON_MODE 0x0B40
|
||||
#define GL_POLYGON_SMOOTH 0x0B41
|
||||
#define GL_POLYGON_STIPPLE 0x0B42
|
||||
#define GL_EDGE_FLAG 0x0B43
|
||||
#define GL_CULL_FACE 0x0B44
|
||||
#define GL_CULL_FACE_MODE 0x0B45
|
||||
#define GL_FRONT_FACE 0x0B46
|
||||
#define GL_POLYGON_OFFSET_FACTOR 0x8038
|
||||
#define GL_POLYGON_OFFSET_UNITS 0x2A00
|
||||
#define GL_POLYGON_OFFSET_POINT 0x2A01
|
||||
#define GL_POLYGON_OFFSET_LINE 0x2A02
|
||||
#define GL_POLYGON_OFFSET_FILL 0x8037
|
||||
|
||||
/* Display Lists */
|
||||
#define GL_COMPILE 0x1300
|
||||
#define GL_COMPILE_AND_EXECUTE 0x1301
|
||||
#define GL_LIST_BASE 0x0B32
|
||||
#define GL_LIST_INDEX 0x0B33
|
||||
#define GL_LIST_MODE 0x0B30
|
||||
|
||||
/* Depth buffer */
|
||||
#define GL_NEVER 0x0200
|
||||
#define GL_LESS 0x0201
|
||||
#define GL_EQUAL 0x0202
|
||||
#define GL_LEQUAL 0x0203
|
||||
#define GL_GREATER 0x0204
|
||||
#define GL_NOTEQUAL 0x0205
|
||||
#define GL_GEQUAL 0x0206
|
||||
#define GL_ALWAYS 0x0207
|
||||
#define GL_DEPTH_TEST 0x0B71
|
||||
#define GL_DEPTH_BITS 0x0D56
|
||||
#define GL_DEPTH_CLEAR_VALUE 0x0B73
|
||||
#define GL_DEPTH_FUNC 0x0B74
|
||||
#define GL_DEPTH_RANGE 0x0B70
|
||||
#define GL_DEPTH_WRITEMASK 0x0B72
|
||||
#define GL_DEPTH_COMPONENT 0x1902
|
||||
|
||||
/* Lighting */
|
||||
#define GL_LIGHTING 0x0B50
|
||||
#define GL_LIGHT0 0x4000
|
||||
#define GL_LIGHT1 0x4001
|
||||
#define GL_LIGHT2 0x4002
|
||||
#define GL_LIGHT3 0x4003
|
||||
#define GL_LIGHT4 0x4004
|
||||
#define GL_LIGHT5 0x4005
|
||||
#define GL_LIGHT6 0x4006
|
||||
#define GL_LIGHT7 0x4007
|
||||
#define GL_SPOT_EXPONENT 0x1205
|
||||
#define GL_SPOT_CUTOFF 0x1206
|
||||
#define GL_CONSTANT_ATTENUATION 0x1207
|
||||
#define GL_LINEAR_ATTENUATION 0x1208
|
||||
#define GL_QUADRATIC_ATTENUATION 0x1209
|
||||
#define GL_AMBIENT 0x1200
|
||||
#define GL_DIFFUSE 0x1201
|
||||
#define GL_SPECULAR 0x1202
|
||||
#define GL_SHININESS 0x1601
|
||||
#define GL_EMISSION 0x1600
|
||||
#define GL_POSITION 0x1203
|
||||
#define GL_SPOT_DIRECTION 0x1204
|
||||
#define GL_AMBIENT_AND_DIFFUSE 0x1602
|
||||
#define GL_COLOR_INDEXES 0x1603
|
||||
#define GL_LIGHT_MODEL_TWO_SIDE 0x0B52
|
||||
#define GL_LIGHT_MODEL_LOCAL_VIEWER 0x0B51
|
||||
#define GL_LIGHT_MODEL_AMBIENT 0x0B53
|
||||
#define GL_FRONT_AND_BACK 0x0408
|
||||
#define GL_SHADE_MODEL 0x0B54
|
||||
#define GL_FLAT 0x1D00
|
||||
#define GL_SMOOTH 0x1D01
|
||||
#define GL_COLOR_MATERIAL 0x0B57
|
||||
#define GL_COLOR_MATERIAL_FACE 0x0B55
|
||||
#define GL_COLOR_MATERIAL_PARAMETER 0x0B56
|
||||
#define GL_NORMALIZE 0x0BA1
|
||||
|
||||
/* User clipping planes */
|
||||
#define GL_CLIP_PLANE0 0x3000
|
||||
#define GL_CLIP_PLANE1 0x3001
|
||||
#define GL_CLIP_PLANE2 0x3002
|
||||
#define GL_CLIP_PLANE3 0x3003
|
||||
#define GL_CLIP_PLANE4 0x3004
|
||||
#define GL_CLIP_PLANE5 0x3005
|
||||
|
||||
/* Accumulation buffer */
|
||||
#define GL_ACCUM_RED_BITS 0x0D58
|
||||
#define GL_ACCUM_GREEN_BITS 0x0D59
|
||||
#define GL_ACCUM_BLUE_BITS 0x0D5A
|
||||
#define GL_ACCUM_ALPHA_BITS 0x0D5B
|
||||
#define GL_ACCUM_CLEAR_VALUE 0x0B80
|
||||
#define GL_ACCUM 0x0100
|
||||
#define GL_ADD 0x0104
|
||||
#define GL_LOAD 0x0101
|
||||
#define GL_MULT 0x0103
|
||||
#define GL_RETURN 0x0102
|
||||
|
||||
/* Alpha testing */
|
||||
#define GL_ALPHA_TEST 0x0BC0
|
||||
#define GL_ALPHA_TEST_REF 0x0BC2
|
||||
#define GL_ALPHA_TEST_FUNC 0x0BC1
|
||||
|
||||
/* Blending */
|
||||
#define GL_BLEND 0x0BE2
|
||||
#define GL_BLEND_SRC 0x0BE1
|
||||
#define GL_BLEND_DST 0x0BE0
|
||||
#define GL_ZERO 0x0
|
||||
#define GL_ONE 0x1
|
||||
#define GL_SRC_COLOR 0x0300
|
||||
#define GL_ONE_MINUS_SRC_COLOR 0x0301
|
||||
#define GL_SRC_ALPHA 0x0302
|
||||
#define GL_ONE_MINUS_SRC_ALPHA 0x0303
|
||||
#define GL_DST_ALPHA 0x0304
|
||||
#define GL_ONE_MINUS_DST_ALPHA 0x0305
|
||||
#define GL_DST_COLOR 0x0306
|
||||
#define GL_ONE_MINUS_DST_COLOR 0x0307
|
||||
#define GL_SRC_ALPHA_SATURATE 0x0308
|
||||
|
||||
/* Render Mode */
|
||||
#define GL_FEEDBACK 0x1C01
|
||||
#define GL_RENDER 0x1C00
|
||||
#define GL_SELECT 0x1C02
|
||||
|
||||
/* Feedback */
|
||||
#define GL_2D 0x0600
|
||||
#define GL_3D 0x0601
|
||||
#define GL_3D_COLOR 0x0602
|
||||
#define GL_3D_COLOR_TEXTURE 0x0603
|
||||
#define GL_4D_COLOR_TEXTURE 0x0604
|
||||
#define GL_POINT_TOKEN 0x0701
|
||||
#define GL_LINE_TOKEN 0x0702
|
||||
#define GL_LINE_RESET_TOKEN 0x0707
|
||||
#define GL_POLYGON_TOKEN 0x0703
|
||||
#define GL_BITMAP_TOKEN 0x0704
|
||||
#define GL_DRAW_PIXEL_TOKEN 0x0705
|
||||
#define GL_COPY_PIXEL_TOKEN 0x0706
|
||||
#define GL_PASS_THROUGH_TOKEN 0x0700
|
||||
#define GL_FEEDBACK_BUFFER_POINTER 0x0DF0
|
||||
#define GL_FEEDBACK_BUFFER_SIZE 0x0DF1
|
||||
#define GL_FEEDBACK_BUFFER_TYPE 0x0DF2
|
||||
|
||||
/* Selection */
|
||||
#define GL_SELECTION_BUFFER_POINTER 0x0DF3
|
||||
#define GL_SELECTION_BUFFER_SIZE 0x0DF4
|
||||
|
||||
/* Fog */
|
||||
#define GL_FOG 0x0B60
|
||||
#define GL_FOG_MODE 0x0B65
|
||||
#define GL_FOG_DENSITY 0x0B62
|
||||
#define GL_FOG_COLOR 0x0B66
|
||||
#define GL_FOG_INDEX 0x0B61
|
||||
#define GL_FOG_START 0x0B63
|
||||
#define GL_FOG_END 0x0B64
|
||||
#define GL_LINEAR 0x2601
|
||||
#define GL_EXP 0x0800
|
||||
#define GL_EXP2 0x0801
|
||||
|
||||
/* Logic Ops */
|
||||
#define GL_LOGIC_OP 0x0BF1
|
||||
#define GL_INDEX_LOGIC_OP 0x0BF1
|
||||
#define GL_COLOR_LOGIC_OP 0x0BF2
|
||||
#define GL_LOGIC_OP_MODE 0x0BF0
|
||||
#define GL_CLEAR 0x1500
|
||||
#define GL_SET 0x150F
|
||||
#define GL_COPY 0x1503
|
||||
#define GL_COPY_INVERTED 0x150C
|
||||
#define GL_NOOP 0x1505
|
||||
#define GL_INVERT 0x150A
|
||||
#define GL_AND 0x1501
|
||||
#define GL_NAND 0x150E
|
||||
#define GL_OR 0x1507
|
||||
#define GL_NOR 0x1508
|
||||
#define GL_XOR 0x1506
|
||||
#define GL_EQUIV 0x1509
|
||||
#define GL_AND_REVERSE 0x1502
|
||||
#define GL_AND_INVERTED 0x1504
|
||||
#define GL_OR_REVERSE 0x150B
|
||||
#define GL_OR_INVERTED 0x150D
|
||||
|
||||
/* Stencil */
|
||||
#define GL_STENCIL_TEST 0x0B90
|
||||
#define GL_STENCIL_WRITEMASK 0x0B98
|
||||
#define GL_STENCIL_BITS 0x0D57
|
||||
#define GL_STENCIL_FUNC 0x0B92
|
||||
#define GL_STENCIL_VALUE_MASK 0x0B93
|
||||
#define GL_STENCIL_REF 0x0B97
|
||||
#define GL_STENCIL_FAIL 0x0B94
|
||||
#define GL_STENCIL_PASS_DEPTH_PASS 0x0B96
|
||||
#define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95
|
||||
#define GL_STENCIL_CLEAR_VALUE 0x0B91
|
||||
#define GL_STENCIL_INDEX 0x1901
|
||||
#define GL_KEEP 0x1E00
|
||||
#define GL_REPLACE 0x1E01
|
||||
#define GL_INCR 0x1E02
|
||||
#define GL_DECR 0x1E03
|
||||
|
||||
/* Buffers, Pixel Drawing/Reading */
|
||||
#define GL_NONE 0x0
|
||||
#define GL_LEFT 0x0406
|
||||
#define GL_RIGHT 0x0407
|
||||
/*GL_FRONT 0x0404 */
|
||||
/*GL_BACK 0x0405 */
|
||||
/*GL_FRONT_AND_BACK 0x0408 */
|
||||
#define GL_FRONT_LEFT 0x0400
|
||||
#define GL_FRONT_RIGHT 0x0401
|
||||
#define GL_BACK_LEFT 0x0402
|
||||
#define GL_BACK_RIGHT 0x0403
|
||||
#define GL_AUX0 0x0409
|
||||
#define GL_AUX1 0x040A
|
||||
#define GL_AUX2 0x040B
|
||||
#define GL_AUX3 0x040C
|
||||
#define GL_COLOR_INDEX 0x1900
|
||||
#define GL_RED 0x1903
|
||||
#define GL_GREEN 0x1904
|
||||
#define GL_BLUE 0x1905
|
||||
#define GL_ALPHA 0x1906
|
||||
#define GL_LUMINANCE 0x1909
|
||||
#define GL_LUMINANCE_ALPHA 0x190A
|
||||
#define GL_ALPHA_BITS 0x0D55
|
||||
#define GL_RED_BITS 0x0D52
|
||||
#define GL_GREEN_BITS 0x0D53
|
||||
#define GL_BLUE_BITS 0x0D54
|
||||
#define GL_INDEX_BITS 0x0D51
|
||||
#define GL_SUBPIXEL_BITS 0x0D50
|
||||
#define GL_AUX_BUFFERS 0x0C00
|
||||
#define GL_READ_BUFFER 0x0C02
|
||||
#define GL_DRAW_BUFFER 0x0C01
|
||||
#define GL_DOUBLEBUFFER 0x0C32
|
||||
#define GL_STEREO 0x0C33
|
||||
#define GL_BITMAP 0x1A00
|
||||
#define GL_COLOR 0x1800
|
||||
#define GL_DEPTH 0x1801
|
||||
#define GL_STENCIL 0x1802
|
||||
#define GL_DITHER 0x0BD0
|
||||
#define GL_RGB 0x1907
|
||||
#define GL_RGBA 0x1908
|
||||
#define GL_ALPHA4 0x803B
|
||||
#define GL_ALPHA8 0x803C
|
||||
#define GL_ALPHA12 0x803D
|
||||
#define GL_ALPHA16 0x803E
|
||||
#define GL_LUMINANCE4 0x803F
|
||||
#define GL_LUMINANCE8 0x8040
|
||||
#define GL_LUMINANCE12 0x8041
|
||||
#define GL_LUMINANCE16 0x8042
|
||||
#define GL_LUMINANCE4_ALPHA4 0x8043
|
||||
#define GL_LUMINANCE6_ALPHA2 0x8044
|
||||
#define GL_LUMINANCE8_ALPHA8 0x8045
|
||||
#define GL_LUMINANCE12_ALPHA4 0x8046
|
||||
#define GL_LUMINANCE12_ALPHA12 0x8047
|
||||
#define GL_LUMINANCE16_ALPHA16 0x8048
|
||||
#define GL_INTENSITY 0x8049
|
||||
#define GL_INTENSITY4 0x804A
|
||||
#define GL_INTENSITY8 0x804B
|
||||
#define GL_INTENSITY12 0x804C
|
||||
#define GL_INTENSITY16 0x804D
|
||||
#define GL_RGB2 0x804E
|
||||
#define GL_RGB4 0x804F
|
||||
#define GL_RGB5 0x8050
|
||||
#define GL_RGB8 0x8051
|
||||
#define GL_RGB10 0x8052
|
||||
#define GL_RGB12 0x8053
|
||||
#define GL_RGB16 0x8054
|
||||
#define GL_RGBA2 0x8055
|
||||
#define GL_RGBA4 0x8056
|
||||
#define GL_RGB5_A1 0x8057
|
||||
#define GL_RGBA8 0x8058
|
||||
#define GL_RGB10_A2 0x8059
|
||||
#define GL_RGBA12 0x805A
|
||||
#define GL_RGBA16 0x805B
|
||||
#define GL_TEXTURE_RED_SIZE 0x805C
|
||||
#define GL_TEXTURE_GREEN_SIZE 0x805D
|
||||
#define GL_TEXTURE_BLUE_SIZE 0x805E
|
||||
#define GL_TEXTURE_ALPHA_SIZE 0x805F
|
||||
#define GL_TEXTURE_LUMINANCE_SIZE 0x8060
|
||||
#define GL_TEXTURE_INTENSITY_SIZE 0x8061
|
||||
/*#define GL_REPLACE 0x8062*/
|
||||
#define GL_PROXY_TEXTURE_1D 0x8063
|
||||
#define GL_PROXY_TEXTURE_2D 0x8064
|
||||
|
||||
/* Private limits */
|
||||
#define GL_MAX_LIST_NESTING 0x0B31
|
||||
#define GL_MAX_ATTRIB_STACK_DEPTH 0x0D35
|
||||
#define GL_MAX_MODELVIEW_STACK_DEPTH 0x0D36
|
||||
#define GL_MAX_NAME_STACK_DEPTH 0x0D37
|
||||
#define GL_MAX_PROJECTION_STACK_DEPTH 0x0D38
|
||||
#define GL_MAX_TEXTURE_STACK_DEPTH 0x0D39
|
||||
#define GL_MAX_EVAL_ORDER 0x0D30
|
||||
#define GL_MAX_LIGHTS 0x0D31
|
||||
#define GL_MAX_CLIP_PLANES 0x0D32
|
||||
#define GL_MAX_TEXTURE_SIZE 0x0D33
|
||||
#define GL_MAX_PIXEL_MAP_TABLE 0x0D34
|
||||
#define GL_MAX_VIEWPORT_DIMS 0x0D3A
|
||||
#define GL_MAX_CLIENT_ATTRIB_STACK_DEPTH 0x0D3B
|
||||
|
||||
/* Gets */
|
||||
#define GL_ATTRIB_STACK_DEPTH 0x0BB0
|
||||
#define GL_CLIENT_ATTRIB_STACK_DEPTH 0x0BB1
|
||||
#define GL_COLOR_CLEAR_VALUE 0x0C22
|
||||
#define GL_COLOR_WRITEMASK 0x0C23
|
||||
#define GL_CURRENT_INDEX 0x0B01
|
||||
#define GL_CURRENT_COLOR 0x0B00
|
||||
#define GL_CURRENT_NORMAL 0x0B02
|
||||
#define GL_CURRENT_RASTER_COLOR 0x0B04
|
||||
#define GL_CURRENT_RASTER_DISTANCE 0x0B09
|
||||
#define GL_CURRENT_RASTER_INDEX 0x0B05
|
||||
#define GL_CURRENT_RASTER_POSITION 0x0B07
|
||||
#define GL_CURRENT_RASTER_TEXTURE_COORDS 0x0B06
|
||||
#define GL_CURRENT_RASTER_POSITION_VALID 0x0B08
|
||||
#define GL_CURRENT_TEXTURE_COORDS 0x0B03
|
||||
#define GL_INDEX_CLEAR_VALUE 0x0C20
|
||||
#define GL_INDEX_MODE 0x0C30
|
||||
#define GL_INDEX_WRITEMASK 0x0C21
|
||||
#define GL_MODELVIEW_MATRIX 0x0BA6
|
||||
#define GL_MODELVIEW_STACK_DEPTH 0x0BA3
|
||||
#define GL_NAME_STACK_DEPTH 0x0D70
|
||||
#define GL_PROJECTION_MATRIX 0x0BA7
|
||||
#define GL_PROJECTION_STACK_DEPTH 0x0BA4
|
||||
#define GL_RENDER_MODE 0x0C40
|
||||
#define GL_RGBA_MODE 0x0C31
|
||||
#define GL_TEXTURE_MATRIX 0x0BA8
|
||||
#define GL_TEXTURE_STACK_DEPTH 0x0BA5
|
||||
#define GL_VIEWPORT 0x0BA2
|
||||
|
||||
/* Evaluators */
|
||||
#define GL_AUTO_NORMAL 0x0D80
|
||||
#define GL_MAP1_COLOR_4 0x0D90
|
||||
#define GL_MAP1_INDEX 0x0D91
|
||||
#define GL_MAP1_NORMAL 0x0D92
|
||||
#define GL_MAP1_TEXTURE_COORD_1 0x0D93
|
||||
#define GL_MAP1_TEXTURE_COORD_2 0x0D94
|
||||
#define GL_MAP1_TEXTURE_COORD_3 0x0D95
|
||||
#define GL_MAP1_TEXTURE_COORD_4 0x0D96
|
||||
#define GL_MAP1_VERTEX_3 0x0D97
|
||||
#define GL_MAP1_VERTEX_4 0x0D98
|
||||
#define GL_MAP2_COLOR_4 0x0DB0
|
||||
#define GL_MAP2_INDEX 0x0DB1
|
||||
#define GL_MAP2_NORMAL 0x0DB2
|
||||
#define GL_MAP2_TEXTURE_COORD_1 0x0DB3
|
||||
#define GL_MAP2_TEXTURE_COORD_2 0x0DB4
|
||||
#define GL_MAP2_TEXTURE_COORD_3 0x0DB5
|
||||
#define GL_MAP2_TEXTURE_COORD_4 0x0DB6
|
||||
#define GL_MAP2_VERTEX_3 0x0DB7
|
||||
#define GL_MAP2_VERTEX_4 0x0DB8
|
||||
#define GL_MAP1_GRID_DOMAIN 0x0DD0
|
||||
#define GL_MAP1_GRID_SEGMENTS 0x0DD1
|
||||
#define GL_MAP2_GRID_DOMAIN 0x0DD2
|
||||
#define GL_MAP2_GRID_SEGMENTS 0x0DD3
|
||||
#define GL_COEFF 0x0A00
|
||||
#define GL_DOMAIN 0x0A02
|
||||
#define GL_ORDER 0x0A01
|
||||
|
||||
/* Hints */
|
||||
#define GL_FOG_HINT 0x0C54
|
||||
#define GL_LINE_SMOOTH_HINT 0x0C52
|
||||
#define GL_PERSPECTIVE_CORRECTION_HINT 0x0C50
|
||||
#define GL_POINT_SMOOTH_HINT 0x0C51
|
||||
#define GL_POLYGON_SMOOTH_HINT 0x0C53
|
||||
#define GL_DONT_CARE 0x1100
|
||||
#define GL_FASTEST 0x1101
|
||||
#define GL_NICEST 0x1102
|
||||
|
||||
/* Scissor box */
|
||||
#define GL_SCISSOR_TEST 0x0C11
|
||||
#define GL_SCISSOR_BOX 0x0C10
|
||||
|
||||
/* Pixel Mode / Transfer */
|
||||
#define GL_MAP_COLOR 0x0D10
|
||||
#define GL_MAP_STENCIL 0x0D11
|
||||
#define GL_INDEX_SHIFT 0x0D12
|
||||
#define GL_INDEX_OFFSET 0x0D13
|
||||
#define GL_RED_SCALE 0x0D14
|
||||
#define GL_RED_BIAS 0x0D15
|
||||
#define GL_GREEN_SCALE 0x0D18
|
||||
#define GL_GREEN_BIAS 0x0D19
|
||||
#define GL_BLUE_SCALE 0x0D1A
|
||||
#define GL_BLUE_BIAS 0x0D1B
|
||||
#define GL_ALPHA_SCALE 0x0D1C
|
||||
#define GL_ALPHA_BIAS 0x0D1D
|
||||
#define GL_DEPTH_SCALE 0x0D1E
|
||||
#define GL_DEPTH_BIAS 0x0D1F
|
||||
#define GL_PIXEL_MAP_S_TO_S_SIZE 0x0CB1
|
||||
#define GL_PIXEL_MAP_I_TO_I_SIZE 0x0CB0
|
||||
#define GL_PIXEL_MAP_I_TO_R_SIZE 0x0CB2
|
||||
#define GL_PIXEL_MAP_I_TO_G_SIZE 0x0CB3
|
||||
#define GL_PIXEL_MAP_I_TO_B_SIZE 0x0CB4
|
||||
#define GL_PIXEL_MAP_I_TO_A_SIZE 0x0CB5
|
||||
#define GL_PIXEL_MAP_R_TO_R_SIZE 0x0CB6
|
||||
#define GL_PIXEL_MAP_G_TO_G_SIZE 0x0CB7
|
||||
#define GL_PIXEL_MAP_B_TO_B_SIZE 0x0CB8
|
||||
#define GL_PIXEL_MAP_A_TO_A_SIZE 0x0CB9
|
||||
#define GL_PIXEL_MAP_S_TO_S 0x0C71
|
||||
#define GL_PIXEL_MAP_I_TO_I 0x0C70
|
||||
#define GL_PIXEL_MAP_I_TO_R 0x0C72
|
||||
#define GL_PIXEL_MAP_I_TO_G 0x0C73
|
||||
#define GL_PIXEL_MAP_I_TO_B 0x0C74
|
||||
#define GL_PIXEL_MAP_I_TO_A 0x0C75
|
||||
#define GL_PIXEL_MAP_R_TO_R 0x0C76
|
||||
#define GL_PIXEL_MAP_G_TO_G 0x0C77
|
||||
#define GL_PIXEL_MAP_B_TO_B 0x0C78
|
||||
#define GL_PIXEL_MAP_A_TO_A 0x0C79
|
||||
#define GL_PACK_ALIGNMENT 0x0D05
|
||||
#define GL_PACK_LSB_FIRST 0x0D01
|
||||
#define GL_PACK_ROW_LENGTH 0x0D02
|
||||
#define GL_PACK_SKIP_PIXELS 0x0D04
|
||||
#define GL_PACK_SKIP_ROWS 0x0D03
|
||||
#define GL_PACK_SWAP_BYTES 0x0D00
|
||||
#define GL_UNPACK_ALIGNMENT 0x0CF5
|
||||
#define GL_UNPACK_LSB_FIRST 0x0CF1
|
||||
#define GL_UNPACK_ROW_LENGTH 0x0CF2
|
||||
#define GL_UNPACK_SKIP_PIXELS 0x0CF4
|
||||
#define GL_UNPACK_SKIP_ROWS 0x0CF3
|
||||
#define GL_UNPACK_SWAP_BYTES 0x0CF0
|
||||
#define GL_ZOOM_X 0x0D16
|
||||
#define GL_ZOOM_Y 0x0D17
|
||||
|
||||
/* Texture mapping */
|
||||
#define GL_TEXTURE_ENV 0x2300
|
||||
#define GL_TEXTURE_ENV_MODE 0x2200
|
||||
#define GL_TEXTURE_1D 0x0DE0
|
||||
#define GL_TEXTURE_2D 0x0DE1
|
||||
#define GL_TEXTURE_WRAP_S 0x2802
|
||||
#define GL_TEXTURE_WRAP_T 0x2803
|
||||
#define GL_TEXTURE_MAG_FILTER 0x2800
|
||||
#define GL_TEXTURE_MIN_FILTER 0x2801
|
||||
#define GL_TEXTURE_ENV_COLOR 0x2201
|
||||
#define GL_TEXTURE_GEN_S 0x0C60
|
||||
#define GL_TEXTURE_GEN_T 0x0C61
|
||||
#define GL_TEXTURE_GEN_MODE 0x2500
|
||||
#define GL_TEXTURE_BORDER_COLOR 0x1004
|
||||
#define GL_TEXTURE_WIDTH 0x1000
|
||||
#define GL_TEXTURE_HEIGHT 0x1001
|
||||
#define GL_TEXTURE_BORDER 0x1005
|
||||
#define GL_TEXTURE_COMPONENTS 0x1003
|
||||
#define GL_TEXTURE_RED_SIZE 0x805C
|
||||
#define GL_TEXTURE_GREEN_SIZE 0x805D
|
||||
#define GL_TEXTURE_BLUE_SIZE 0x805E
|
||||
#define GL_TEXTURE_ALPHA_SIZE 0x805F
|
||||
#define GL_TEXTURE_LUMINANCE_SIZE 0x8060
|
||||
#define GL_TEXTURE_INTENSITY_SIZE 0x8061
|
||||
#define GL_NEAREST_MIPMAP_NEAREST 0x2700
|
||||
#define GL_NEAREST_MIPMAP_LINEAR 0x2702
|
||||
#define GL_LINEAR_MIPMAP_NEAREST 0x2701
|
||||
#define GL_LINEAR_MIPMAP_LINEAR 0x2703
|
||||
#define GL_OBJECT_LINEAR 0x2401
|
||||
#define GL_OBJECT_PLANE 0x2501
|
||||
#define GL_EYE_LINEAR 0x2400
|
||||
#define GL_EYE_PLANE 0x2502
|
||||
#define GL_SPHERE_MAP 0x2402
|
||||
#define GL_DECAL 0x2101
|
||||
#define GL_MODULATE 0x2100
|
||||
#define GL_NEAREST 0x2600
|
||||
#define GL_REPEAT 0x2901
|
||||
#define GL_CLAMP 0x2900
|
||||
#define GL_S 0x2000
|
||||
#define GL_T 0x2001
|
||||
#define GL_R 0x2002
|
||||
#define GL_Q 0x2003
|
||||
#define GL_TEXTURE_GEN_R 0x0C62
|
||||
#define GL_TEXTURE_GEN_Q 0x0C63
|
||||
#define GL_TEXTURE_PRIORITY 0x8066
|
||||
#define GL_TEXTURE_RESIDENT 0x8067
|
||||
#define GL_TEXTURE_BINDING_1D 0x8068
|
||||
#define GL_TEXTURE_BINDING_2D 0x8069
|
||||
#define GL_TEXTURE_BINDING_3D 0x806A
|
||||
|
||||
/* Utility */
|
||||
#define GL_VENDOR 0x1F00
|
||||
#define GL_RENDERER 0x1F01
|
||||
#define GL_VERSION 0x1F02
|
||||
#define GL_EXTENSIONS 0x1F03
|
||||
|
||||
/* Errors */
|
||||
#define GL_NO_ERROR 0x0
|
||||
#define GL_INVALID_VALUE 0x0501
|
||||
#define GL_INVALID_ENUM 0x0500
|
||||
#define GL_INVALID_OPERATION 0x0502
|
||||
#define GL_STACK_OVERFLOW 0x0503
|
||||
#define GL_STACK_UNDERFLOW 0x0504
|
||||
#define GL_OUT_OF_MEMORY 0x0505
|
||||
|
||||
/* glPush/PopAttrib bits */
|
||||
#define GL_CURRENT_BIT 0x00000001
|
||||
#define GL_POINT_BIT 0x00000002
|
||||
#define GL_LINE_BIT 0x00000004
|
||||
#define GL_POLYGON_BIT 0x00000008
|
||||
#define GL_POLYGON_STIPPLE_BIT 0x00000010
|
||||
#define GL_PIXEL_MODE_BIT 0x00000020
|
||||
#define GL_LIGHTING_BIT 0x00000040
|
||||
#define GL_FOG_BIT 0x00000080
|
||||
#define GL_DEPTH_BUFFER_BIT 0x00000100
|
||||
#define GL_ACCUM_BUFFER_BIT 0x00000200
|
||||
#define GL_STENCIL_BUFFER_BIT 0x00000400
|
||||
#define GL_VIEWPORT_BIT 0x00000800
|
||||
#define GL_TRANSFORM_BIT 0x00001000
|
||||
#define GL_ENABLE_BIT 0x00002000
|
||||
#define GL_COLOR_BUFFER_BIT 0x00004000
|
||||
#define GL_HINT_BIT 0x00008000
|
||||
#define GL_EVAL_BIT 0x00010000
|
||||
#define GL_LIST_BIT 0x00020000
|
||||
#define GL_TEXTURE_BIT 0x00040000
|
||||
#define GL_SCISSOR_BIT 0x00080000
|
||||
#define GL_ALL_ATTRIB_BITS 0x000FFFFF
|
||||
|
||||
|
|
@ -1,347 +0,0 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Copyright (c) 2012 GarageGames, LLC
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to
|
||||
// deal in the Software without restriction, including without limitation the
|
||||
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
// sell copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
// IN THE SOFTWARE.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
// OpenGL 1.1 core functions
|
||||
GL_GROUP_BEGIN(GL_VERSION_1_1)
|
||||
GL_FUNCTION(glAccum, void, (GLenum op, GLfloat value))
|
||||
GL_FUNCTION(glAlphaFunc, void, (GLenum func, GLclampf ref))
|
||||
GL_FUNCTION(glAreTexturesResident, void, (GLsizei n, const GLuint *textures, GLboolean *residences))
|
||||
GL_FUNCTION(glArrayElement, void, (GLint i))
|
||||
GL_FUNCTION(glBegin, void, (GLenum mode))
|
||||
GL_FUNCTION(glBindTexture, void, (GLenum target, GLuint texture))
|
||||
GL_FUNCTION(glBitmap, void, (GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte *bitmap))
|
||||
GL_FUNCTION(glBlendFunc, void, (GLenum sfactor, GLenum dfactor))
|
||||
GL_FUNCTION(glCallList, void, (GLuint list))
|
||||
GL_FUNCTION(glCallLists, void, (GLsizei n, GLenum type, const GLvoid *lists))
|
||||
GL_FUNCTION(glClear, void, (GLbitfield mask))
|
||||
GL_FUNCTION(glClearAccum, void, (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha))
|
||||
GL_FUNCTION(glClearColor, void, (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha))
|
||||
GL_FUNCTION(glClearDepth, void, (GLclampd depth))
|
||||
GL_FUNCTION(glClearIndex, void, (GLfloat c))
|
||||
GL_FUNCTION(glClearStencil, void, (GLint s))
|
||||
GL_FUNCTION(glClipPlane, void, (GLenum plane, const GLdouble *equation))
|
||||
GL_FUNCTION(glColor3b, void, (GLbyte red, GLbyte green, GLbyte blue))
|
||||
GL_FUNCTION(glColor3bv, void, (const GLbyte *v))
|
||||
GL_FUNCTION(glColor3d, void, (GLdouble red, GLdouble green, GLdouble blue))
|
||||
GL_FUNCTION(glColor3dv, void, (const GLdouble *v))
|
||||
GL_FUNCTION(glColor3f, void, (GLfloat red, GLfloat green, GLfloat blue))
|
||||
GL_FUNCTION(glColor3fv, void, (const GLfloat *v))
|
||||
GL_FUNCTION(glColor3i, void, (GLint red, GLint green, GLint blue))
|
||||
GL_FUNCTION(glColor3iv, void, (const GLint *v))
|
||||
GL_FUNCTION(glColor3s, void, (GLshort red, GLshort green, GLshort blue))
|
||||
GL_FUNCTION(glColor3sv, void, (const GLshort *v))
|
||||
GL_FUNCTION(glColor3ub, void, (GLubyte red, GLubyte green, GLubyte blue))
|
||||
GL_FUNCTION(glColor3ubv, void, (const GLubyte *v))
|
||||
GL_FUNCTION(glColor3ui, void, (GLuint red, GLuint green, GLuint blue))
|
||||
GL_FUNCTION(glColor3uiv, void, (const GLuint *v))
|
||||
GL_FUNCTION(glColor3us, void, (GLushort red, GLushort green, GLushort blue))
|
||||
GL_FUNCTION(glColor3usv, void, (const GLushort *v))
|
||||
GL_FUNCTION(glColor4b, void, (GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha))
|
||||
GL_FUNCTION(glColor4bv, void, (const GLbyte *v))
|
||||
GL_FUNCTION(glColor4d, void, (GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha))
|
||||
GL_FUNCTION(glColor4dv, void, (const GLdouble *v))
|
||||
GL_FUNCTION(glColor4f, void, (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha))
|
||||
GL_FUNCTION(glColor4fv, void, (const GLfloat *v))
|
||||
GL_FUNCTION(glColor4i, void, (GLint red, GLint green, GLint blue, GLint alpha))
|
||||
GL_FUNCTION(glColor4iv, void, (const GLint *v))
|
||||
GL_FUNCTION(glColor4s, void, (GLshort red, GLshort green, GLshort blue, GLshort alpha))
|
||||
GL_FUNCTION(glColor4sv, void, (const GLshort *v))
|
||||
GL_FUNCTION(glColor4ub, void, (GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha))
|
||||
GL_FUNCTION(glColor4ubv, void, (const GLubyte *v))
|
||||
GL_FUNCTION(glColor4ui, void, (GLuint red, GLuint green, GLuint blue, GLuint alpha))
|
||||
GL_FUNCTION(glColor4uiv, void, (const GLuint *v))
|
||||
GL_FUNCTION(glColor4us, void, (GLushort red, GLushort green, GLushort blue, GLushort alpha))
|
||||
GL_FUNCTION(glColor4usv, void, (const GLushort *v))
|
||||
GL_FUNCTION(glColorMask, void, (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha))
|
||||
GL_FUNCTION(glColorMaterial, void, (GLenum face, GLenum mode))
|
||||
GL_FUNCTION(glCopyPixels, void, (GLint x, GLint y, GLsizei width, GLsizei height, GLenum type))
|
||||
GL_FUNCTION(glCopyTexImage1D, void, (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border))
|
||||
GL_FUNCTION(glCopyTexImage2D, void, (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border))
|
||||
GL_FUNCTION(glCopyTexSubImage1D, void, (GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width))
|
||||
GL_FUNCTION(glCopyTexSubImage2D, void, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height))
|
||||
GL_FUNCTION(glCullFace, void, (GLenum mode))
|
||||
GL_FUNCTION(glDeleteLists, void, (GLuint list, GLsizei range))
|
||||
GL_FUNCTION(glDeleteTextures, void, (GLsizei n, const GLuint *textures))
|
||||
GL_FUNCTION(glDepthFunc, void, (GLenum func))
|
||||
GL_FUNCTION(glDepthMask, void, (GLboolean flag))
|
||||
GL_FUNCTION(glDepthRange, void, (GLclampd zNear, GLclampd zFar))
|
||||
GL_FUNCTION(glDisable, void, (GLenum cap))
|
||||
GL_FUNCTION(glDisableClientState, void, (GLenum array))
|
||||
GL_FUNCTION(glDrawArrays, void, (GLenum mode, GLint first, GLsizei count))
|
||||
GL_FUNCTION(glDrawBuffer, void, (GLenum mode))
|
||||
GL_FUNCTION(glDrawElements, void, (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices))
|
||||
GL_FUNCTION(glDrawPixels, void, (GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels))
|
||||
GL_FUNCTION(glEdgeFlag, void, (GLboolean flag))
|
||||
GL_FUNCTION(glEdgeFlagPointer, void, (GLsizei stride, const GLboolean *pointer))
|
||||
GL_FUNCTION(glEnable, void, (GLenum cap))
|
||||
GL_FUNCTION(glEndList, void, (void))
|
||||
GL_FUNCTION(glEnableClientState, void, (GLenum array))
|
||||
GL_FUNCTION(glEnd, void, (void))
|
||||
GL_FUNCTION(glEvalCoord1d, void, (GLdouble u))
|
||||
GL_FUNCTION(glEvalCoord1f, void, (GLfloat u))
|
||||
GL_FUNCTION(glEvalCoord2d, void, (GLdouble u, GLdouble v))
|
||||
GL_FUNCTION(glEvalCoord2f, void, (GLfloat u, GLfloat v))
|
||||
GL_FUNCTION(glEvalMesh1, void, (GLenum mode, GLint i1, GLint i2))
|
||||
GL_FUNCTION(glEvalMesh2, void, (GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2))
|
||||
GL_FUNCTION(glEvalPoint1, void, (GLint i))
|
||||
GL_FUNCTION(glEvalPoint2, void, (GLint i, GLint j))
|
||||
GL_FUNCTION(glFeedbackBuffer, void, (GLsizei size, GLenum type, GLfloat *buffer))
|
||||
GL_FUNCTION(glFinish, void, (void))
|
||||
GL_FUNCTION(glFlush, void, (void))
|
||||
GL_FUNCTION(glFogf, void, (GLenum pname, GLfloat param))
|
||||
GL_FUNCTION(glFogfv, void, (GLenum pname, const GLfloat *params))
|
||||
GL_FUNCTION(glFogi, void, (GLenum pname, GLint param))
|
||||
GL_FUNCTION(glFogiv, void, (GLenum pname, const GLint *params))
|
||||
GL_FUNCTION(glFrontFace, void, (GLenum mode))
|
||||
GL_FUNCTION(glFrustum, void, (GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar))
|
||||
GL_FUNCTION(glGenLists, GLuint, (GLsizei range))
|
||||
GL_FUNCTION(glGenTextures, void, (GLsizei n, GLuint *textures))
|
||||
GL_FUNCTION(glGetBooleanv, void, (GLenum pname, GLboolean *params))
|
||||
GL_FUNCTION(glGetClipPlane, void, (GLenum plane, GLdouble *equation))
|
||||
GL_FUNCTION(glColorPointer, void, (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer))
|
||||
GL_FUNCTION(glGetDoublev, void, (GLenum pname, GLdouble *params))
|
||||
GL_FUNCTION(glGetFloatv, void, (GLenum pname, GLfloat *params))
|
||||
GL_FUNCTION(glGetError, GLuint, (void))
|
||||
GL_FUNCTION(glGetIntegerv, void, (GLenum pname, GLint *params))
|
||||
GL_FUNCTION(glGetLightfv, void, (GLenum light, GLenum pname, GLfloat *params))
|
||||
GL_FUNCTION(glGetLightiv, void, (GLenum light, GLenum pname, GLint *params))
|
||||
GL_FUNCTION(glGetMapdv, void, (GLenum target, GLenum query, GLdouble *v))
|
||||
GL_FUNCTION(glGetMapfv, void, (GLenum target, GLenum query, GLfloat *v))
|
||||
GL_FUNCTION(glGetMapiv, void, (GLenum target, GLenum query, GLint *v))
|
||||
GL_FUNCTION(glGetMaterialfv, void, (GLenum face, GLenum pname, GLfloat *params))
|
||||
GL_FUNCTION(glGetMaterialiv, void, (GLenum face, GLenum pname, GLint *params))
|
||||
GL_FUNCTION(glGetPixelMapfv, void, (GLenum map, GLfloat *values))
|
||||
GL_FUNCTION(glGetPixelMapuiv, void, (GLenum map, GLuint *values))
|
||||
GL_FUNCTION(glGetPixelMapusv, void, (GLenum map, GLushort *values))
|
||||
GL_FUNCTION(glGetPointerv, void, (GLenum pname, GLvoid* *params))
|
||||
GL_FUNCTION(glGetPolygonStipple, void, (GLubyte *mask))
|
||||
GL_FUNCTION(glGetString, const GLubyte*, (GLenum name))
|
||||
GL_FUNCTION(glGetTexEnvfv, void, (GLenum target, GLenum pname, GLfloat *params))
|
||||
GL_FUNCTION(glGetTexEnviv, void, (GLenum target, GLenum pname, GLint *params))
|
||||
GL_FUNCTION(glGetTexGendv, void, (GLenum coord, GLenum pname, GLdouble *params))
|
||||
GL_FUNCTION(glGetTexGenfv, void, (GLenum coord, GLenum pname, GLfloat *params))
|
||||
GL_FUNCTION(glGetTexGeniv, void, (GLenum coord, GLenum pname, GLint *params))
|
||||
GL_FUNCTION(glGetTexImage, void, (GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels))
|
||||
GL_FUNCTION(glGetTexLevelParameterfv, void, (GLenum target, GLint level, GLenum pname, GLfloat *params))
|
||||
GL_FUNCTION(glGetTexLevelParameteriv, void, (GLenum target, GLint level, GLenum pname, GLint *params))
|
||||
GL_FUNCTION(glGetTexParameterfv, void, (GLenum target, GLenum pname, GLfloat *params))
|
||||
GL_FUNCTION(glGetTexParameteriv, void, (GLenum target, GLenum pname, GLint *params))
|
||||
GL_FUNCTION(glHint, void, (GLenum target, GLenum mode))
|
||||
GL_FUNCTION(glIndexd, void, (GLdouble c))
|
||||
GL_FUNCTION(glIndexf, void, (GLfloat c))
|
||||
GL_FUNCTION(glIndexi, void, (GLint c))
|
||||
GL_FUNCTION(glIndexs, void, (GLshort c))
|
||||
GL_FUNCTION(glIndexub, void, (GLubyte c))
|
||||
GL_FUNCTION(glIndexMask, void, (GLuint mask))
|
||||
GL_FUNCTION(glIndexPointer, void, (GLenum type, GLsizei stride, const GLvoid *pointer))
|
||||
GL_FUNCTION(glInitNames, void, (void))
|
||||
GL_FUNCTION(glInterleavedArrays, void, (GLenum format, GLsizei stride, const GLvoid *pointer))
|
||||
GL_FUNCTION(glIsEnabled, GLboolean, (GLenum cap))
|
||||
GL_FUNCTION(glIsList, GLboolean, (GLuint list))
|
||||
GL_FUNCTION(glIsTexture, GLboolean, (GLuint texture))
|
||||
GL_FUNCTION(glLightf, void, (GLenum light, GLenum pname, GLfloat param))
|
||||
GL_FUNCTION(glLightfv, void, (GLenum light, GLenum pname, const GLfloat *params))
|
||||
GL_FUNCTION(glLighti, void, (GLenum light, GLenum pname, GLint param))
|
||||
GL_FUNCTION(glLightiv, void, (GLenum light, GLenum pname, const GLint *params))
|
||||
GL_FUNCTION(glLightModelf, void, (GLenum pname, GLfloat param))
|
||||
GL_FUNCTION(glLightModelfv, void, (GLenum pname, const GLfloat *params))
|
||||
GL_FUNCTION(glLightModeli, void, (GLenum pname, GLint param))
|
||||
GL_FUNCTION(glLightModeliv, void, (GLenum pname, const GLint *params))
|
||||
GL_FUNCTION(glLineStipple, void, (GLint factor, GLushort pattern))
|
||||
GL_FUNCTION(glLineWidth, void, (GLfloat width))
|
||||
GL_FUNCTION(glListBase, void, (GLuint base))
|
||||
GL_FUNCTION(glLoadIdentity, void, (void))
|
||||
GL_FUNCTION(glLoadMatrixd, void, (const GLdouble *m))
|
||||
GL_FUNCTION(glLoadMatrixf, void, (const GLfloat *m))
|
||||
GL_FUNCTION(glLoadName, void, (GLuint name))
|
||||
GL_FUNCTION(glLogicOp, void, (GLenum opcode))
|
||||
GL_FUNCTION(glMap1d, void, (GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points))
|
||||
GL_FUNCTION(glMap1f, void, (GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLdouble *points))
|
||||
GL_FUNCTION(glMap2d, void, (GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points))
|
||||
GL_FUNCTION(glMap2f, void, (GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points))
|
||||
GL_FUNCTION(glMapGrid1d, void, (GLint un, GLdouble u1, GLdouble u2))
|
||||
GL_FUNCTION(glMapGrid1f, void, (GLint un, GLfloat u1, GLfloat u2))
|
||||
GL_FUNCTION(glMapGrid2d, void, (GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2))
|
||||
GL_FUNCTION(glMapGrid2f, void, (GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2))
|
||||
GL_FUNCTION(glMaterialf, void, (GLenum face, GLenum pname, GLfloat param))
|
||||
GL_FUNCTION(glMaterialfv, void, (GLenum face, GLenum pname, const GLfloat* params))
|
||||
GL_FUNCTION(glMateriali, void, (GLenum face, GLenum pname, GLint param))
|
||||
GL_FUNCTION(glMaterialiv, void, (GLenum face, GLenum pname, const GLint* params))
|
||||
GL_FUNCTION(glMatrixMode, void, (GLenum mode))
|
||||
GL_FUNCTION(glMultMatrixd, void, (const GLdouble *m))
|
||||
GL_FUNCTION(glMultMatrixf, void, (const GLfloat *m))
|
||||
GL_FUNCTION(glNewList, void, (GLuint list, GLenum mode))
|
||||
GL_FUNCTION(glNormal3b, void, (GLbyte nx, GLbyte ny, GLbyte nz))
|
||||
GL_FUNCTION(glNormal3bv, void, (const GLbyte *v))
|
||||
GL_FUNCTION(glNormal3d, void, (GLdouble nx, GLdouble ny, GLdouble nz))
|
||||
GL_FUNCTION(glNormal3dv, void, (const GLdouble *v))
|
||||
GL_FUNCTION(glNormal3f, void, (GLfloat nx, GLfloat ny, GLfloat nz))
|
||||
GL_FUNCTION(glNormal3fv, void, (const GLfloat *v))
|
||||
GL_FUNCTION(glNormal3i, void, (GLint nx, GLint ny, GLint nz))
|
||||
GL_FUNCTION(glNormal3iv, void, (const GLint *v))
|
||||
GL_FUNCTION(glNormal3s, void, (GLshort nx, GLshort ny, GLshort nz))
|
||||
GL_FUNCTION(glNormal3sv, void, (const GLshort *v))
|
||||
GL_FUNCTION(glNormalPointer, void, (GLenum type, GLsizei stride, const GLvoid *pointer))
|
||||
GL_FUNCTION(glOrtho, void, (GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar))
|
||||
GL_FUNCTION(glPassThrough, void, (GLfloat token))
|
||||
GL_FUNCTION(glPixelMapfv, void, (GLenum map, GLint mapSize, const GLfloat *values))
|
||||
GL_FUNCTION(glPixelMapuiv, void, (GLenum map, GLint mapSize, const GLuint *values))
|
||||
GL_FUNCTION(glPixelMapusv, void, (GLenum map, GLint mapSize, const GLushort *values))
|
||||
GL_FUNCTION(glPixelStoref, void, (GLenum pname, GLfloat param))
|
||||
GL_FUNCTION(glPixelStorei, void, (GLenum pname, GLint param))
|
||||
GL_FUNCTION(glPixelTransferf, void, (GLenum pname, GLfloat param))
|
||||
GL_FUNCTION(glPixelTransferi, void, (GLenum pname, GLint param))
|
||||
GL_FUNCTION(glPixelZoom, void, (GLfloat xfactor, GLfloat yfactor))
|
||||
GL_FUNCTION(glPointSize, void, (GLfloat size))
|
||||
GL_FUNCTION(glPolygonMode, void, (GLenum face, GLenum mode))
|
||||
GL_FUNCTION(glPolygonOffset, void, (GLfloat factor, GLfloat units))
|
||||
GL_FUNCTION(glPopAttrib, void, (void))
|
||||
GL_FUNCTION(glPopMatrix, void, (void))
|
||||
GL_FUNCTION(glPopName, void, (void))
|
||||
GL_FUNCTION(glPrioritizeTextures, void, (GLsizei n, const GLuint *textures, const GLclampf *priorities))
|
||||
GL_FUNCTION(glPushAttrib, void, (GLbitfield mask))
|
||||
GL_FUNCTION(glPushMatrix, void, (void))
|
||||
GL_FUNCTION(glPushName, void, (GLuint name))
|
||||
GL_FUNCTION(glRasterPos2d, void, (GLdouble x, GLdouble y))
|
||||
GL_FUNCTION(glRasterPos2dv, void, (const GLdouble *v))
|
||||
GL_FUNCTION(glRasterPos2f, void, (GLfloat x, GLfloat y))
|
||||
GL_FUNCTION(glRasterPos2fv, void, (const GLfloat *v))
|
||||
GL_FUNCTION(glRasterPos2i, void, (GLint x, GLint y))
|
||||
GL_FUNCTION(glRasterPos2iv, void, (const GLint *v))
|
||||
GL_FUNCTION(glRasterPos2s, void, (GLshort x, GLshort y))
|
||||
GL_FUNCTION(glRasterPos2sv, void, (const GLshort *v))
|
||||
GL_FUNCTION(glRasterPos3d, void, (GLdouble x, GLdouble y, GLdouble z))
|
||||
GL_FUNCTION(glRasterPos3dv, void, (const GLdouble *v))
|
||||
GL_FUNCTION(glRasterPos3f, void, (GLfloat x, GLfloat y, GLfloat z))
|
||||
GL_FUNCTION(glRasterPos3fv, void, (const GLfloat *v))
|
||||
GL_FUNCTION(glRasterPos3i, void, (GLint x, GLint y, GLint z))
|
||||
GL_FUNCTION(glRasterPos3iv, void, (const GLint *v))
|
||||
GL_FUNCTION(glRasterPos3s, void, (GLshort x, GLshort y, GLshort z))
|
||||
GL_FUNCTION(glRasterPos3sv, void, (const GLshort *v))
|
||||
GL_FUNCTION(glRasterPos4d, void, (GLdouble x, GLdouble y, GLdouble z, GLdouble w))
|
||||
GL_FUNCTION(glRasterPos4dv, void, (const GLdouble *v))
|
||||
GL_FUNCTION(glRasterPos4f, void, (GLfloat x, GLfloat y, GLfloat z, GLfloat w))
|
||||
GL_FUNCTION(glRasterPos4fv, void, (const GLfloat *v))
|
||||
GL_FUNCTION(glRasterPos4i, void, (GLint x, GLint y, GLint z, GLint w))
|
||||
GL_FUNCTION(glRasterPos4iv, void, (const GLint *v))
|
||||
GL_FUNCTION(glRasterPos4s, void, (GLshort x, GLshort y, GLshort z, GLshort w))
|
||||
GL_FUNCTION(glRasterPos4sv, void, (const GLshort *v))
|
||||
GL_FUNCTION(glReadBuffer, void, (GLenum mode))
|
||||
GL_FUNCTION(glReadPixels, void, (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels))
|
||||
GL_FUNCTION(glRectd, void, (GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2))
|
||||
GL_FUNCTION(glRectdv, void, (const GLdouble *v))
|
||||
GL_FUNCTION(glRectf, void, (GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2))
|
||||
GL_FUNCTION(glRectfv, void, (const GLfloat *v))
|
||||
GL_FUNCTION(glRecti, void, (GLint x1, GLint y1, GLint x2, GLint y2))
|
||||
GL_FUNCTION(glRectiv, void, (const GLint *v))
|
||||
GL_FUNCTION(glRects, void, (GLshort x1, GLshort y1, GLshort x2, GLshort y2))
|
||||
GL_FUNCTION(glRectsv, void, (const GLshort *v))
|
||||
GL_FUNCTION(glRenderMode, void, (GLenum mode))
|
||||
GL_FUNCTION(glRotated, void, (GLdouble angle, GLdouble x, GLdouble y, GLdouble z))
|
||||
GL_FUNCTION(glRotatef, void, (GLfloat angle, GLfloat x, GLfloat y, GLfloat z))
|
||||
GL_FUNCTION(glScaled, void, (GLdouble x, GLdouble y, GLdouble z))
|
||||
GL_FUNCTION(glScalef, void, (GLfloat x, GLfloat y, GLfloat z))
|
||||
GL_FUNCTION(glScissor, void, (GLint x, GLint y, GLsizei width, GLsizei height))
|
||||
GL_FUNCTION(glSelectBuffer, void, (GLsizei size, GLuint *buffer))
|
||||
GL_FUNCTION(glShadeModel, void, (GLenum mode))
|
||||
GL_FUNCTION(glStencilFunc, void, (GLenum func, GLint ref, GLuint mask))
|
||||
GL_FUNCTION(glStencilMask, void, (GLuint mask))
|
||||
GL_FUNCTION(glStencilOp, void, (GLenum fail, GLenum zfail, GLenum zpass))
|
||||
GL_FUNCTION(glTexCoord1d, void, (GLdouble s))
|
||||
GL_FUNCTION(glTexCoord1dv, void, (const GLdouble *v))
|
||||
GL_FUNCTION(glTexCoord1f, void, (GLfloat s))
|
||||
GL_FUNCTION(glTexCoord1fv, void, (const GLfloat *v))
|
||||
GL_FUNCTION(glTexCoord1i, void, (GLint s))
|
||||
GL_FUNCTION(glTexCoord1iv, void, (const GLint *v))
|
||||
GL_FUNCTION(glTexCoord1s, void, (GLshort s))
|
||||
GL_FUNCTION(glTexCoord1sv, void, (const GLshort *v))
|
||||
GL_FUNCTION(glTexCoord2d, void, (GLdouble s, GLdouble t))
|
||||
GL_FUNCTION(glTexCoord2dv, void, (const GLdouble *v))
|
||||
GL_FUNCTION(glTexCoord2f, void, (GLfloat s, GLfloat t))
|
||||
GL_FUNCTION(glTexCoord2fv, void, (const GLfloat *v))
|
||||
GL_FUNCTION(glTexCoord2i, void, (GLint s, GLint t))
|
||||
GL_FUNCTION(glTexCoord2iv, void, (const GLint *v))
|
||||
GL_FUNCTION(glTexCoord2s, void, (GLshort s, GLshort t))
|
||||
GL_FUNCTION(glTexCoord2sv, void, (const GLshort *v))
|
||||
GL_FUNCTION(glTexCoord3d, void, (GLdouble s, GLdouble t, GLdouble r))
|
||||
GL_FUNCTION(glTexCoord3dv, void, (const GLdouble *v))
|
||||
GL_FUNCTION(glTexCoord3f, void, (GLfloat s, GLfloat t, GLfloat r))
|
||||
GL_FUNCTION(glTexCoord3fv, void, (const GLfloat *v))
|
||||
GL_FUNCTION(glTexCoord3i, void, (GLint s, GLint t, GLint r))
|
||||
GL_FUNCTION(glTexCoord3iv, void, (const GLint *v))
|
||||
GL_FUNCTION(glTexCoord3s, void, (GLshort s, GLshort t, GLshort r))
|
||||
GL_FUNCTION(glTexCoord3sv, void, (const GLshort *v))
|
||||
GL_FUNCTION(glTexCoord4d, void, (GLdouble s, GLdouble t, GLdouble r, GLdouble q))
|
||||
GL_FUNCTION(glTexCoord4dv, void, (const GLdouble *v))
|
||||
GL_FUNCTION(glTexCoord4f, void, (GLfloat s, GLfloat t, GLfloat r, GLfloat q))
|
||||
GL_FUNCTION(glTexCoord4fv, void, (const GLfloat *v))
|
||||
GL_FUNCTION(glTexCoord4i, void, (GLint s, GLint t, GLint r, GLint q))
|
||||
GL_FUNCTION(glTexCoord4iv, void, (const GLint *v))
|
||||
GL_FUNCTION(glTexCoord4s, void, (GLshort s, GLshort t, GLshort r, GLshort q))
|
||||
GL_FUNCTION(glTexCoord4sv, void, (const GLshort *v))
|
||||
GL_FUNCTION(glTexCoordPointer, void, (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer))
|
||||
GL_FUNCTION(glTexEnvf, void, (GLenum target, GLenum pname, GLfloat param))
|
||||
GL_FUNCTION(glTexEnvfv, void, (GLenum target, GLenum pname, const GLfloat *params))
|
||||
GL_FUNCTION(glTexEnvi, void, (GLenum target, GLenum pname, GLint param))
|
||||
GL_FUNCTION(glTexEnviv, void, (GLenum target, GLenum pname, const GLint *params))
|
||||
GL_FUNCTION(glTexGend, void, (GLenum coord, GLenum pname, GLdouble param))
|
||||
GL_FUNCTION(glTexGendv, void, (GLenum coord, GLenum pname, const GLdouble *param))
|
||||
GL_FUNCTION(glTexGenf, void, (GLenum coord, GLenum pname, GLfloat param))
|
||||
GL_FUNCTION(glTexGenfv, void, (GLenum coord, GLenum pname, const GLfloat *param))
|
||||
GL_FUNCTION(glTexGeni, void, (GLenum coord, GLenum pname, GLint param))
|
||||
GL_FUNCTION(glTexGeniv, void, (GLenum coord, GLenum pname, const GLint *param))
|
||||
GL_FUNCTION(glTexImage1D, void, (GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels))
|
||||
GL_FUNCTION(glTexImage2D, void, (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels))
|
||||
GL_FUNCTION(glTexParameterf, void, (GLenum target, GLenum pname, GLfloat param))
|
||||
GL_FUNCTION(glTexParameteri, void, (GLenum target, GLenum pname, GLint param))
|
||||
GL_FUNCTION(glTexSubImage1D, void, (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels))
|
||||
GL_FUNCTION(glTexSubImage2D, void, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels))
|
||||
GL_FUNCTION(glTranslated, void, (GLdouble x, GLdouble y, GLdouble z))
|
||||
GL_FUNCTION(glTranslatef, void, (GLfloat x, GLfloat y, GLfloat z))
|
||||
GL_FUNCTION(glVertex2d, void, (GLdouble x, GLdouble y))
|
||||
GL_FUNCTION(glVertex2dv, void, (const GLdouble *v))
|
||||
GL_FUNCTION(glVertex2f, void, (GLfloat x, GLfloat y))
|
||||
GL_FUNCTION(glVertex2fv, void, (const GLfloat *v))
|
||||
GL_FUNCTION(glVertex2i, void, (GLint x, GLint y))
|
||||
GL_FUNCTION(glVertex2iv, void, (const GLint *v))
|
||||
GL_FUNCTION(glVertex2s, void, (GLshort x, GLshort y))
|
||||
GL_FUNCTION(glVertex2sv, void, (const GLshort *v))
|
||||
GL_FUNCTION(glVertex3d, void, (GLdouble x, GLdouble y, GLdouble z))
|
||||
GL_FUNCTION(glVertex3dv, void, (const GLdouble *v))
|
||||
GL_FUNCTION(glVertex3f, void, (GLfloat x, GLfloat y, GLfloat z))
|
||||
GL_FUNCTION(glVertex3fv, void, (const GLfloat *v))
|
||||
GL_FUNCTION(glVertex3i, void, (GLint x, GLint y, GLint z))
|
||||
GL_FUNCTION(glVertex3iv, void, (const GLint *v))
|
||||
GL_FUNCTION(glVertex3s, void, (GLshort x, GLshort y, GLshort z))
|
||||
GL_FUNCTION(glVertex3sv, void, (const GLshort *v))
|
||||
GL_FUNCTION(glVertex4d, void, (GLdouble x, GLdouble y, GLdouble z, GLdouble w))
|
||||
GL_FUNCTION(glVertex4dv, void, (const GLdouble *v))
|
||||
GL_FUNCTION(glVertex4f, void, (GLfloat x, GLfloat y, GLfloat z, GLfloat w))
|
||||
GL_FUNCTION(glVertex4fv, void, (const GLfloat *v))
|
||||
GL_FUNCTION(glVertex4i, void, (GLint x, GLint y, GLint z, GLint w))
|
||||
GL_FUNCTION(glVertex4iv, void, (const GLint *v))
|
||||
GL_FUNCTION(glVertex4s, void, (GLshort x, GLshort y, GLshort z, GLshort w))
|
||||
GL_FUNCTION(glVertex4sv, void, (const GLshort *v))
|
||||
GL_FUNCTION(glVertexPointer, void, (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer))
|
||||
GL_FUNCTION(glViewport, void, (GLint x, GLint y, GLsizei width, GLsizei height))
|
||||
GL_GROUP_END()
|
||||
|
||||
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
|
@ -1,405 +0,0 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Copyright (c) 2012 GarageGames, LLC
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to
|
||||
// deal in the Software without restriction, including without limitation the
|
||||
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
// sell copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
// IN THE SOFTWARE.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#ifdef GLX_3DFX_multisample
|
||||
#define GLX_SAMPLE_BUFFERS_3DFX 0x8050
|
||||
#define GLX_SAMPLES_3DFX 0x8051
|
||||
#endif
|
||||
|
||||
#ifdef GLX_ARB_fbconfig_float
|
||||
#define GLX_RGBA_FLOAT_BIT 0x00000004
|
||||
#define GLX_RGBA_FLOAT_TYPE 0x20B9
|
||||
#endif
|
||||
|
||||
#ifdef GLX_ARB_get_proc_address
|
||||
#define glXGetProcAddressARB XGL_FUNCPTR(glXGetProcAddressARB)
|
||||
#endif
|
||||
|
||||
#ifdef GLX_ARB_multisample
|
||||
#define GLX_SAMPLE_BUFFERS_ARB 100000
|
||||
#define GLX_SAMPLES_ARB 100001
|
||||
#endif
|
||||
|
||||
#ifdef GLX_ATI_pixel_format_float
|
||||
#define GLX_RGBA_FLOAT_ATI_BIT 0x00000100
|
||||
#endif
|
||||
|
||||
#ifdef GLX_ATI_render_texture
|
||||
#define GLX_BIND_TO_TEXTURE_RGB_ATI 0x9800
|
||||
#define GLX_BIND_TO_TEXTURE_RGBA_ATI 0x9801
|
||||
#define GLX_TEXTURE_FORMAT_ATI 0x9802
|
||||
#define GLX_TEXTURE_TARGET_ATI 0x9803
|
||||
#define GLX_MIPMAP_TEXTURE_ATI 0x9804
|
||||
#define GLX_TEXTURE_RGB_ATI 0x9805
|
||||
#define GLX_TEXTURE_RGBA_ATI 0x9806
|
||||
#define GLX_NO_TEXTURE_ATI 0x9807
|
||||
#define GLX_TEXTURE_CUBE_MAP_ATI 0x9808
|
||||
#define GLX_TEXTURE_1D_ATI 0x9809
|
||||
#define GLX_TEXTURE_2D_ATI 0x980A
|
||||
#define GLX_MIPMAP_LEVEL_ATI 0x980B
|
||||
#define GLX_CUBE_MAP_FACE_ATI 0x980C
|
||||
#define GLX_TEXTURE_CUBE_MAP_POSITIVE_X_ATI 0x980D
|
||||
#define GLX_TEXTURE_CUBE_MAP_NEGATIVE_X_ATI 0x980E
|
||||
#define GLX_TEXTURE_CUBE_MAP_POSITIVE_Y_ATI 0x980F
|
||||
#define GLX_TEXTURE_CUBE_MAP_NEGATIVE_Y_ATI 0x9810
|
||||
#define GLX_TEXTURE_CUBE_MAP_POSITIVE_Z_ATI 0x9811
|
||||
#define GLX_TEXTURE_CUBE_MAP_NEGATIVE_Z_ATI 0x9812
|
||||
#define GLX_FRONT_LEFT_ATI 0x9813
|
||||
#define GLX_FRONT_RIGHT_ATI 0x9814
|
||||
#define GLX_BACK_LEFT_ATI 0x9815
|
||||
#define GLX_BACK_RIGHT_ATI 0x9816
|
||||
#define GLX_AUX0_ATI 0x9817
|
||||
#define GLX_AUX1_ATI 0x9818
|
||||
#define GLX_AUX2_ATI 0x9819
|
||||
#define GLX_AUX3_ATI 0x981A
|
||||
#define GLX_AUX4_ATI 0x981B
|
||||
#define GLX_AUX5_ATI 0x981C
|
||||
#define GLX_AUX6_ATI 0x981D
|
||||
#define GLX_AUX7_ATI 0x981E
|
||||
#define GLX_AUX8_ATI 0x981F
|
||||
#define GLX_AUX9_ATI 0x9820
|
||||
#define GLX_BIND_TO_TEXTURE_LUMINANCE_ATI 0x9821
|
||||
#define GLX_BIND_TO_TEXTURE_INTENSITY_ATI 0x9822
|
||||
#define glXBindTexImageATI XGL_FUNCPTR(glXBindTexImageATI)
|
||||
#define glXReleaseTexImageATI XGL_FUNCPTR(glXReleaseTexImageATI)
|
||||
#define glXDrawableAttribATI XGL_FUNCPTR(glXDrawableAttribATI)
|
||||
#endif
|
||||
|
||||
#ifdef GLX_EXT_import_context
|
||||
typedef XID GLXContextID;
|
||||
#define GLX_SHARE_CONTEXT_EXT 0x800A
|
||||
#define GLX_VISUAL_ID_EXT 0x800B
|
||||
#define GLX_SCREEN_EXT 0x800C
|
||||
#define glXFreeContextEXT XGL_FUNCPTR(glXFreeContextEXT)
|
||||
#define glXGetContextIDEXT XGL_FUNCPTR(glXGetContextIDEXT)
|
||||
#define glXImportContextEXT XGL_FUNCPTR(glXImportContextEXT)
|
||||
#define glXQueryContextInfoEXT XGL_FUNCPTR(glXQueryContextInfoEXT)
|
||||
#endif
|
||||
|
||||
#ifdef GLX_EXT_scene_marker
|
||||
#endif
|
||||
|
||||
#ifdef GLX_EXT_visual_info
|
||||
#define GLX_X_VISUAL_TYPE_EXT 0x22
|
||||
#define GLX_TRANSPARENT_TYPE_EXT 0x23
|
||||
#define GLX_TRANSPARENT_INDEX_VALUE_EXT 0x24
|
||||
#define GLX_TRANSPARENT_RED_VALUE_EXT 0x25
|
||||
#define GLX_TRANSPARENT_GREEN_VALUE_EXT 0x26
|
||||
#define GLX_TRANSPARENT_BLUE_VALUE_EXT 0x27
|
||||
#define GLX_TRANSPARENT_ALPHA_VALUE_EXT 0x28
|
||||
#define GLX_NONE_EXT 0x8000
|
||||
#define GLX_TRUE_COLOR_EXT 0x8002
|
||||
#define GLX_DIRECT_COLOR_EXT 0x8003
|
||||
#define GLX_PSEUDO_COLOR_EXT 0x8004
|
||||
#define GLX_STATIC_COLOR_EXT 0x8005
|
||||
#define GLX_GRAY_SCALE_EXT 0x8006
|
||||
#define GLX_STATIC_GRAY_EXT 0x8007
|
||||
#define GLX_TRANSPARENT_RGB_EXT 0x8008
|
||||
#define GLX_TRANSPARENT_INDEX_EXT 0x8009
|
||||
#endif
|
||||
|
||||
#ifdef GLX_EXT_visual_rating
|
||||
#define GLX_VISUAL_CAVEAT_EXT 0x20
|
||||
#define GLX_SLOW_VISUAL_EXT 0x8001
|
||||
#define GLX_NON_CONFORMANT_VISUAL_EXT 0x800D
|
||||
#endif
|
||||
|
||||
#ifdef GLX_MESA_agp_offset
|
||||
#define glXGetAGPOffsetMESA XGL_FUNCPTR(glXGetAGPOffsetMESA)
|
||||
#endif
|
||||
|
||||
#ifdef GLX_MESA_copy_sub_buffer
|
||||
#define glXCopySubBufferMESA XGL_FUNCPTR(glXCopySubBufferMESA)
|
||||
#endif
|
||||
|
||||
#ifdef GLX_MESA_pixmap_colormap
|
||||
#define glXCreateGLXPixmapMESA XGL_FUNCPTR(glXCreateGLXPixmapMESA)
|
||||
#endif
|
||||
|
||||
#ifdef GLX_MESA_release_buffers
|
||||
#define glXReleaseBuffersMESA XGL_FUNCPTR(glXReleaseBuffersMESA)
|
||||
#endif
|
||||
|
||||
#ifdef GLX_MESA_set_3dfx_mode
|
||||
#define GLX_3DFX_WINDOW_MODE_MESA 0x1
|
||||
#define GLX_3DFX_FULLSCREEN_MODE_MESA 0x2
|
||||
#define glXSet3DfxModeMESA XGL_FUNCPTR(glXSet3DfxModeMESA)
|
||||
#endif
|
||||
|
||||
#ifdef GLX_NV_float_buffer
|
||||
#define GLX_FLOAT_COMPONENTS_NV 0x20B0
|
||||
#endif
|
||||
|
||||
#ifdef GLX_NV_vertex_array_range
|
||||
#define glXAllocateMemoryNV XGL_FUNCPTR(glXAllocateMemoryNV)
|
||||
#define glXFreeMemoryNV XGL_FUNCPTR(glXFreeMemoryNV)
|
||||
#endif
|
||||
|
||||
#ifdef GLX_OML_swap_method
|
||||
#define GLX_SWAP_METHOD_OML 0x8060
|
||||
#define GLX_SWAP_EXCHANGE_OML 0x8061
|
||||
#define GLX_SWAP_COPY_OML 0x8062
|
||||
#define GLX_SWAP_UNDEFINED_OML 0x8063
|
||||
#endif
|
||||
|
||||
#ifdef GLX_OML_sync_control
|
||||
#define glXGetMscRateOML XGL_FUNCPTR(glXGetMscRateOML)
|
||||
#define glXGetSyncValuesOML XGL_FUNCPTR(glXGetSyncValuesOML)
|
||||
#define glXSwapBuffersMscOML XGL_FUNCPTR(glXSwapBuffersMscOML)
|
||||
#define glXWaitForMscOML XGL_FUNCPTR(glXWaitForMscOML)
|
||||
#define glXWaitForSbcOML XGL_FUNCPTR(glXWaitForSbcOML)
|
||||
#endif
|
||||
|
||||
#ifdef GLX_SGIS_blended_overlay
|
||||
#define GLX_BLENDED_RGBA_SGIS 0x8025
|
||||
#endif
|
||||
|
||||
#ifdef GLX_SGIS_color_range
|
||||
#define GLX_MAX_GREEN_SGIS 0
|
||||
#define GLX_MIN_RED_SGIS 0
|
||||
#define GLX_MIN_BLUE_SGIS 0
|
||||
#define GLX_MAX_RED_SGIS 0
|
||||
#define GLX_MAX_ALPHA_SGIS 0
|
||||
#define GLX_MIN_GREEN_SGIS 0
|
||||
#define GLX_MIN_ALPHA_SGIS 0
|
||||
#define GLX_EXTENDED_RANGE_SGIS 0
|
||||
#define GLX_MAX_BLUE_SGIS 0
|
||||
#endif
|
||||
|
||||
#ifdef GLX_SGIS_multisample
|
||||
#define GLX_SAMPLE_BUFFERS_SGIS 100000
|
||||
#define GLX_SAMPLES_SGIS 100001
|
||||
#endif
|
||||
|
||||
#ifdef GLX_SGIS_shared_multisample
|
||||
#define GLX_MULTISAMPLE_SUB_RECT_WIDTH_SGIS 0x8026
|
||||
#define GLX_MULTISAMPLE_SUB_RECT_HEIGHT_SGIS 0x8027
|
||||
#endif
|
||||
|
||||
#ifdef GLX_SGIX_fbconfig
|
||||
typedef XID GLXFBConfigIDSGIX;
|
||||
typedef struct __GLXFBConfigRec *GLXFBConfigSGIX;
|
||||
#define GLX_WINDOW_BIT_SGIX 0x00000001
|
||||
#define GLX_RGBA_BIT_SGIX 0x00000001
|
||||
#define GLX_PIXMAP_BIT_SGIX 0x00000002
|
||||
#define GLX_COLOR_INDEX_BIT_SGIX 0x00000002
|
||||
#define GLX_SCREEN_EXT 0x800C
|
||||
#define GLX_DRAWABLE_TYPE_SGIX 0x8010
|
||||
#define GLX_RENDER_TYPE_SGIX 0x8011
|
||||
#define GLX_X_RENDERABLE_SGIX 0x8012
|
||||
#define GLX_FBCONFIG_ID_SGIX 0x8013
|
||||
#define GLX_RGBA_TYPE_SGIX 0x8014
|
||||
#define GLX_COLOR_INDEX_TYPE_SGIX 0x8015
|
||||
#define glXChooseFBConfigSGIX XGL_FUNCPTR(glXChooseFBConfigSGIX)
|
||||
#define glXCreateContextWithConfigSGIX XGL_FUNCPTR(glXCreateContextWithConfigSGIX)
|
||||
#define glXCreateGLXPixmapWithConfigSGIX XGL_FUNCPTR(glXCreateGLXPixmapWithConfigSGIX)
|
||||
#define glXGetFBConfigAttribSGIX XGL_FUNCPTR(glXGetFBConfigAttribSGIX)
|
||||
#define glXGetFBConfigFromVisualSGIX XGL_FUNCPTR(glXGetFBConfigFromVisualSGIX)
|
||||
#define glXGetVisualFromFBConfigSGIX XGL_FUNCPTR(glXGetVisualFromFBConfigSGIX)
|
||||
#endif
|
||||
|
||||
#ifdef GLX_SGIX_pbuffer
|
||||
typedef XID GLXPbufferSGIX;
|
||||
typedef struct { int type; unsigned long serial; Bool send_event; Display *display; GLXDrawable drawable; int event_type; int draw_type; unsigned int mask; int x, y; int width, height; int count; } GLXBufferClobberEventSGIX;
|
||||
#define GLX_FRONT_LEFT_BUFFER_BIT_SGIX 0x00000001
|
||||
#define GLX_FRONT_RIGHT_BUFFER_BIT_SGIX 0x00000002
|
||||
#define GLX_PBUFFER_BIT_SGIX 0x00000004
|
||||
#define GLX_BACK_LEFT_BUFFER_BIT_SGIX 0x00000004
|
||||
#define GLX_BACK_RIGHT_BUFFER_BIT_SGIX 0x00000008
|
||||
#define GLX_AUX_BUFFERS_BIT_SGIX 0x00000010
|
||||
#define GLX_DEPTH_BUFFER_BIT_SGIX 0x00000020
|
||||
#define GLX_STENCIL_BUFFER_BIT_SGIX 0x00000040
|
||||
#define GLX_ACCUM_BUFFER_BIT_SGIX 0x00000080
|
||||
#define GLX_SAMPLE_BUFFERS_BIT_SGIX 0x00000100
|
||||
#define GLX_MAX_PBUFFER_WIDTH_SGIX 0x8016
|
||||
#define GLX_MAX_PBUFFER_HEIGHT_SGIX 0x8017
|
||||
#define GLX_MAX_PBUFFER_PIXELS_SGIX 0x8018
|
||||
#define GLX_OPTIMAL_PBUFFER_WIDTH_SGIX 0x8019
|
||||
#define GLX_OPTIMAL_PBUFFER_HEIGHT_SGIX 0x801A
|
||||
#define GLX_PRESERVED_CONTENTS_SGIX 0x801B
|
||||
#define GLX_LARGEST_PBUFFER_SGIX 0x801C
|
||||
#define GLX_WIDTH_SGIX 0x801D
|
||||
#define GLX_HEIGHT_SGIX 0x801E
|
||||
#define GLX_EVENT_MASK_SGIX 0x801F
|
||||
#define GLX_DAMAGED_SGIX 0x8020
|
||||
#define GLX_SAVED_SGIX 0x8021
|
||||
#define GLX_WINDOW_SGIX 0x8022
|
||||
#define GLX_PBUFFER_SGIX 0x8023
|
||||
#define GLX_BUFFER_CLOBBER_MASK_SGIX 0x08000000
|
||||
#define glXCreateGLXPbufferSGIX XGL_FUNCPTR(glXCreateGLXPbufferSGIX)
|
||||
#define glXDestroyGLXPbufferSGIX XGL_FUNCPTR(glXDestroyGLXPbufferSGIX)
|
||||
#define glXGetSelectedEventSGIX XGL_FUNCPTR(glXGetSelectedEventSGIX)
|
||||
#define glXQueryGLXPbufferSGIX XGL_FUNCPTR(glXQueryGLXPbufferSGIX)
|
||||
#define glXSelectEventSGIX XGL_FUNCPTR(glXSelectEventSGIX)
|
||||
#endif
|
||||
|
||||
#ifdef GLX_SGIX_swap_barrier
|
||||
#define glXBindSwapBarrierSGIX XGL_FUNCPTR(glXBindSwapBarrierSGIX)
|
||||
#define glXQueryMaxSwapBarriersSGIX XGL_FUNCPTR(glXQueryMaxSwapBarriersSGIX)
|
||||
#endif
|
||||
|
||||
#ifdef GLX_SGIX_swap_group
|
||||
#define glXJoinSwapGroupSGIX XGL_FUNCPTR(glXJoinSwapGroupSGIX)
|
||||
#endif
|
||||
|
||||
#ifdef GLX_SGIX_video_resize
|
||||
#define GLX_SYNC_FRAME_SGIX 0x00000000
|
||||
#define GLX_SYNC_SWAP_SGIX 0x00000001
|
||||
#define glXBindChannelToWindowSGIX XGL_FUNCPTR(glXBindChannelToWindowSGIX)
|
||||
#define glXChannelRectSGIX XGL_FUNCPTR(glXChannelRectSGIX)
|
||||
#define glXChannelRectSyncSGIX XGL_FUNCPTR(glXChannelRectSyncSGIX)
|
||||
#define glXQueryChannelDeltasSGIX XGL_FUNCPTR(glXQueryChannelDeltasSGIX)
|
||||
#define glXQueryChannelRectSGIX XGL_FUNCPTR(glXQueryChannelRectSGIX)
|
||||
#endif
|
||||
|
||||
#ifdef GLX_SGIX_visual_select_group
|
||||
#define GLX_VISUAL_SELECT_GROUP_SGIX 0x8028
|
||||
#endif
|
||||
|
||||
#ifdef GLX_SGI_cushion
|
||||
#define glXCushionSGI XGL_FUNCPTR(glXCushionSGI)
|
||||
#endif
|
||||
|
||||
#ifdef GLX_SGI_make_current_read
|
||||
#define glXGetCurrentReadDrawableSGI XGL_FUNCPTR(glXGetCurrentReadDrawableSGI)
|
||||
#define glXMakeCurrentReadSGI XGL_FUNCPTR(glXMakeCurrentReadSGI)
|
||||
#endif
|
||||
|
||||
#ifdef GLX_SGI_swap_control
|
||||
#define glXSwapIntervalSGI XGL_FUNCPTR(glXSwapIntervalSGI)
|
||||
#endif
|
||||
|
||||
#ifdef GLX_SGI_video_sync
|
||||
#define glXGetVideoSyncSGI XGL_FUNCPTR(glXGetVideoSyncSGI)
|
||||
#define glXWaitVideoSyncSGI XGL_FUNCPTR(glXWaitVideoSyncSGI)
|
||||
#endif
|
||||
|
||||
#ifdef GLX_SUN_get_transparent_index
|
||||
#define glXGetTransparentIndexSUN XGL_FUNCPTR(glXGetTransparentIndexSUN)
|
||||
#endif
|
||||
|
||||
#ifdef GLX_SUN_video_resize
|
||||
#define GL_VIDEO_RESIZE_COMPENSATION_SUN 0x85CD
|
||||
#define GLX_VIDEO_RESIZE_SUN 0x8171
|
||||
#define glXVideoResizeSUN XGL_FUNCPTR(glXVideoResizeSUN)
|
||||
#define glXGetVideoResizeSUN XGL_FUNCPTR(glXGetVideoResizeSUN)
|
||||
#endif
|
||||
|
||||
#ifdef GLX_VERSION_1_1
|
||||
#define glXQueryExtensionsString XGL_FUNCPTR(glXQueryExtensionsString)
|
||||
#define glXGetClientString XGL_FUNCPTR(glXGetClientString)
|
||||
#define glXQueryServerString XGL_FUNCPTR(glXQueryServerString)
|
||||
#endif
|
||||
|
||||
#ifdef GLX_VERSION_1_2
|
||||
#define glXGetCurrentDisplay XGL_FUNCPTR(glXGetCurrentDisplay)
|
||||
#endif
|
||||
|
||||
#ifdef GLX_VERSION_1_3
|
||||
typedef XID GLXWindow;
|
||||
typedef XID GLXPbuffer;
|
||||
typedef XID GLXFBConfigID;
|
||||
typedef struct __GLXFBConfigRec *GLXFBConfig;
|
||||
typedef struct { int event_type; int draw_type; unsigned long serial; Bool send_event; Display *display; GLXDrawable drawable; unsigned int buffer_mask; unsigned int aux_buffer; int x, y; int width, height; int count; } GLXPbufferClobberEvent;
|
||||
typedef union __GLXEvent { GLXPbufferClobberEvent glxpbufferclobber; long pad[24]; } GLXEvent;
|
||||
#define GLX_WINDOW_BIT 0x00000001
|
||||
#define GLX_PIXMAP_BIT 0x00000002
|
||||
#define GLX_PBUFFER_BIT 0x00000004
|
||||
#define GLX_RGBA_BIT 0x00000001
|
||||
#define GLX_COLOR_INDEX_BIT 0x00000002
|
||||
#define GLX_PBUFFER_CLOBBER_MASK 0x08000000
|
||||
#define GLX_FRONT_LEFT_BUFFER_BIT 0x00000001
|
||||
#define GLX_FRONT_RIGHT_BUFFER_BIT 0x00000002
|
||||
#define GLX_BACK_LEFT_BUFFER_BIT 0x00000004
|
||||
#define GLX_BACK_RIGHT_BUFFER_BIT 0x00000008
|
||||
#define GLX_AUX_BUFFERS_BIT 0x00000010
|
||||
#define GLX_DEPTH_BUFFER_BIT 0x00000020
|
||||
#define GLX_STENCIL_BUFFER_BIT 0x00000040
|
||||
#define GLX_ACCUM_BUFFER_BIT 0x00000080
|
||||
#define GLX_CONFIG_CAVEAT 0x20
|
||||
#define GLX_X_VISUAL_TYPE 0x22
|
||||
#define GLX_TRANSPARENT_TYPE 0x23
|
||||
#define GLX_TRANSPARENT_INDEX_VALUE 0x24
|
||||
#define GLX_TRANSPARENT_RED_VALUE 0x25
|
||||
#define GLX_TRANSPARENT_GREEN_VALUE 0x26
|
||||
#define GLX_TRANSPARENT_BLUE_VALUE 0x27
|
||||
#define GLX_TRANSPARENT_ALPHA_VALUE 0x28
|
||||
#define GLX_DONT_CARE 0xFFFFFFFF
|
||||
#define GLX_NONE 0x8000
|
||||
#define GLX_SLOW_CONFIG 0x8001
|
||||
#define GLX_TRUE_COLOR 0x8002
|
||||
#define GLX_DIRECT_COLOR 0x8003
|
||||
#define GLX_PSEUDO_COLOR 0x8004
|
||||
#define GLX_STATIC_COLOR 0x8005
|
||||
#define GLX_GRAY_SCALE 0x8006
|
||||
#define GLX_STATIC_GRAY 0x8007
|
||||
#define GLX_TRANSPARENT_RGB 0x8008
|
||||
#define GLX_TRANSPARENT_INDEX 0x8009
|
||||
#define GLX_VISUAL_ID 0x800B
|
||||
#define GLX_SCREEN 0x800C
|
||||
#define GLX_NON_CONFORMANT_CONFIG 0x800D
|
||||
#define GLX_DRAWABLE_TYPE 0x8010
|
||||
#define GLX_RENDER_TYPE 0x8011
|
||||
#define GLX_X_RENDERABLE 0x8012
|
||||
#define GLX_FBCONFIG_ID 0x8013
|
||||
#define GLX_RGBA_TYPE 0x8014
|
||||
#define GLX_COLOR_INDEX_TYPE 0x8015
|
||||
#define GLX_MAX_PBUFFER_WIDTH 0x8016
|
||||
#define GLX_MAX_PBUFFER_HEIGHT 0x8017
|
||||
#define GLX_MAX_PBUFFER_PIXELS 0x8018
|
||||
#define GLX_PRESERVED_CONTENTS 0x801B
|
||||
#define GLX_LARGEST_PBUFFER 0x801C
|
||||
#define GLX_WIDTH 0x801D
|
||||
#define GLX_HEIGHT 0x801E
|
||||
#define GLX_EVENT_MASK 0x801F
|
||||
#define GLX_DAMAGED 0x8020
|
||||
#define GLX_SAVED 0x8021
|
||||
#define GLX_WINDOW 0x8022
|
||||
#define GLX_PBUFFER 0x8023
|
||||
#define GLX_PBUFFER_HEIGHT 0x8040
|
||||
#define GLX_PBUFFER_WIDTH 0x8041
|
||||
#define glXChooseFBConfig XGL_FUNCPTR(glXChooseFBConfig)
|
||||
#define glXGetFBConfigs XGL_FUNCPTR(glXGetFBConfigs)
|
||||
#define glXGetVisualFromFBConfig XGL_FUNCPTR(glXGetVisualFromFBConfig)
|
||||
#define glXGetFBConfigAttrib XGL_FUNCPTR(glXGetFBConfigAttrib)
|
||||
#define glXCreateWindow XGL_FUNCPTR(glXCreateWindow)
|
||||
#define glXDestroyWindow XGL_FUNCPTR(glXDestroyWindow)
|
||||
#define glXCreatePixmap XGL_FUNCPTR(glXCreatePixmap)
|
||||
#define glXDestroyPixmap XGL_FUNCPTR(glXDestroyPixmap)
|
||||
#define glXCreatePbuffer XGL_FUNCPTR(glXCreatePbuffer)
|
||||
#define glXDestroyPbuffer XGL_FUNCPTR(glXDestroyPbuffer)
|
||||
#define glXQueryDrawable XGL_FUNCPTR(glXQueryDrawable)
|
||||
#define glXCreateNewContext XGL_FUNCPTR(glXCreateNewContext)
|
||||
#define glXMakeContextCurrent XGL_FUNCPTR(glXMakeContextCurrent)
|
||||
#define glXGetCurrentReadDrawable XGL_FUNCPTR(glXGetCurrentReadDrawable)
|
||||
#define glXQueryContext XGL_FUNCPTR(glXQueryContext)
|
||||
#define glXSelectEvent XGL_FUNCPTR(glXSelectEvent)
|
||||
#define glXGetSelectedEvent XGL_FUNCPTR(glXGetSelectedEvent)
|
||||
#endif
|
||||
|
||||
#ifdef GLX_VERSION_1_4
|
||||
#define GLX_SAMPLE_BUFFERS 100000
|
||||
#define GLX_SAMPLES 100001
|
||||
#define glXGetProcAddress XGL_FUNCPTR(glXGetProcAddress)
|
||||
#endif
|
||||
|
||||
|
||||
|
|
@ -1,288 +0,0 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Copyright (c) 2012 GarageGames, LLC
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to
|
||||
// deal in the Software without restriction, including without limitation the
|
||||
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
// sell copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
// IN THE SOFTWARE.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#ifdef GLX_3DFX_multisample
|
||||
GL_GROUP_BEGIN(GLX_3DFX_multisample)
|
||||
GL_GROUP_END()
|
||||
#endif
|
||||
|
||||
#ifdef GLX_ARB_fbconfig_float
|
||||
GL_GROUP_BEGIN(GLX_ARB_fbconfig_float)
|
||||
GL_GROUP_END()
|
||||
#endif
|
||||
|
||||
#ifdef GLX_ARB_get_proc_address
|
||||
GL_GROUP_BEGIN(GLX_ARB_get_proc_address)
|
||||
GL_FUNCTION(glXGetProcAddressARB, GLFunction, (const GLubyte*))
|
||||
GL_GROUP_END()
|
||||
#endif
|
||||
|
||||
#ifdef GLX_ARB_multisample
|
||||
GL_GROUP_BEGIN(GLX_ARB_multisample)
|
||||
GL_GROUP_END()
|
||||
#endif
|
||||
|
||||
#ifdef GLX_ATI_pixel_format_float
|
||||
GL_GROUP_BEGIN(GLX_ATI_pixel_format_float)
|
||||
GL_GROUP_END()
|
||||
#endif
|
||||
|
||||
#ifdef GLX_ATI_render_texture
|
||||
GL_GROUP_BEGIN(GLX_ATI_render_texture)
|
||||
GL_FUNCTION(glXBindTexImageATI,void,(Display *dpy, GLXPbuffer pbuf, int buffer))
|
||||
GL_FUNCTION(glXReleaseTexImageATI,void,(Display *dpy, GLXPbuffer pbuf, int buffer))
|
||||
GL_FUNCTION(glXDrawableAttribATI,void,(Display *dpy, GLXDrawable draw, const int *attrib_list))
|
||||
GL_GROUP_END()
|
||||
#endif
|
||||
|
||||
#ifdef GLX_EXT_import_context
|
||||
GL_GROUP_BEGIN(GLX_EXT_import_context)
|
||||
GL_FUNCTION(glXFreeContextEXT,void,(Display* dpy, GLXContext context))
|
||||
GL_FUNCTION(glXGetContextIDEXT,GLXContextID,(const GLXContext context))
|
||||
GL_FUNCTION(glXImportContextEXT,GLXContext,(Display* dpy, GLXContextID contextID))
|
||||
GL_FUNCTION(glXQueryContextInfoEXT,int,(Display* dpy, GLXContext context, int attribute,int *value))
|
||||
GL_GROUP_END()
|
||||
#endif
|
||||
|
||||
#ifdef GLX_EXT_scene_marker
|
||||
GL_GROUP_BEGIN(GLX_EXT_scene_marker)
|
||||
GL_GROUP_END()
|
||||
#endif
|
||||
|
||||
#ifdef GLX_EXT_visual_info
|
||||
GL_GROUP_BEGIN(GLX_EXT_visual_info)
|
||||
GL_GROUP_END()
|
||||
#endif
|
||||
|
||||
#ifdef GLX_EXT_visual_rating
|
||||
GL_GROUP_BEGIN(GLX_EXT_visual_rating)
|
||||
GL_GROUP_END()
|
||||
#endif
|
||||
|
||||
#ifdef GLX_MESA_agp_offset
|
||||
GL_GROUP_BEGIN(GLX_MESA_agp_offset)
|
||||
GL_FUNCTION(glXGetAGPOffsetMESA,unsigned int,(const void* pointer))
|
||||
GL_GROUP_END()
|
||||
#endif
|
||||
|
||||
#ifdef GLX_MESA_copy_sub_buffer
|
||||
GL_GROUP_BEGIN(GLX_MESA_copy_sub_buffer)
|
||||
GL_FUNCTION(glXCopySubBufferMESA,void,(Display* dpy, GLXDrawable drawable, int x, int y, int width, int height))
|
||||
GL_GROUP_END()
|
||||
#endif
|
||||
|
||||
#ifdef GLX_MESA_pixmap_colormap
|
||||
GL_GROUP_BEGIN(GLX_MESA_pixmap_colormap)
|
||||
GL_FUNCTION(glXCreateGLXPixmapMESA,GLXPixmap,(Display* dpy, XVisualInfo *visual, Pixmap pixmap, Colormap cmap))
|
||||
GL_GROUP_END()
|
||||
#endif
|
||||
|
||||
#ifdef GLX_MESA_release_buffers
|
||||
GL_GROUP_BEGIN(GLX_MESA_release_buffers)
|
||||
GL_FUNCTION(glXReleaseBuffersMESA,Bool,(Display* dpy, GLXDrawable d))
|
||||
GL_GROUP_END()
|
||||
#endif
|
||||
|
||||
#ifdef GLX_MESA_set_3dfx_mode
|
||||
GL_GROUP_BEGIN(GLX_MESA_set_3dfx_mode)
|
||||
GL_FUNCTION(glXSet3DfxModeMESA,GLboolean,(GLint mode))
|
||||
GL_GROUP_END()
|
||||
#endif
|
||||
|
||||
#ifdef GLX_NV_float_buffer
|
||||
GL_GROUP_BEGIN(GLX_NV_float_buffer)
|
||||
GL_GROUP_END()
|
||||
#endif
|
||||
|
||||
#ifdef GLX_NV_vertex_array_range
|
||||
GL_GROUP_BEGIN(GLX_NV_vertex_array_range)
|
||||
GL_FUNCTION(glXAllocateMemoryNV,void *,(GLsizei size, GLfloat readFrequency, GLfloat writeFrequency, GLfloat priority))
|
||||
GL_FUNCTION(glXFreeMemoryNV,void,(void *pointer))
|
||||
GL_GROUP_END()
|
||||
#endif
|
||||
|
||||
#ifdef GLX_OML_swap_method
|
||||
GL_GROUP_BEGIN(GLX_OML_swap_method)
|
||||
GL_GROUP_END()
|
||||
#endif
|
||||
|
||||
#ifdef GLX_OML_sync_control
|
||||
GL_GROUP_BEGIN(GLX_OML_sync_control)
|
||||
GL_FUNCTION(glXGetMscRateOML,Bool,(Display* dpy, GLXDrawable drawable, int32_t* numerator, int32_t* denominator))
|
||||
GL_FUNCTION(glXGetSyncValuesOML,Bool,(Display* dpy, GLXDrawable drawable, int64_t* ust, int64_t* msc, int64_t* sbc))
|
||||
GL_FUNCTION(glXSwapBuffersMscOML,int64_t,(Display* dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder))
|
||||
GL_FUNCTION(glXWaitForMscOML,Bool,(Display* dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder, int64_t* ust, int64_t* msc, int64_t* sbc))
|
||||
GL_FUNCTION(glXWaitForSbcOML,Bool,(Display* dpy, GLXDrawable drawable, int64_t target_sbc, int64_t* ust, int64_t* msc, int64_t* sbc))
|
||||
GL_GROUP_END()
|
||||
#endif
|
||||
|
||||
#ifdef GLX_SGIS_blended_overlay
|
||||
GL_GROUP_BEGIN(GLX_SGIS_blended_overlay)
|
||||
GL_GROUP_END()
|
||||
#endif
|
||||
|
||||
#ifdef GLX_SGIS_color_range
|
||||
GL_GROUP_BEGIN(GLX_SGIS_color_range)
|
||||
GL_GROUP_END()
|
||||
#endif
|
||||
|
||||
#ifdef GLX_SGIS_multisample
|
||||
GL_GROUP_BEGIN(GLX_SGIS_multisample)
|
||||
GL_GROUP_END()
|
||||
#endif
|
||||
|
||||
#ifdef GLX_SGIS_shared_multisample
|
||||
GL_GROUP_BEGIN(GLX_SGIS_shared_multisample)
|
||||
GL_GROUP_END()
|
||||
#endif
|
||||
|
||||
#ifdef GLX_SGIX_fbconfig
|
||||
GL_GROUP_BEGIN(GLX_SGIX_fbconfig)
|
||||
GL_FUNCTION(glXChooseFBConfigSGIX,GLXFBConfigSGIX*,(Display *dpy, int screen, const int *attrib_list, int *nelements))
|
||||
GL_FUNCTION(glXCreateContextWithConfigSGIX,GLXContext,(Display* dpy, GLXFBConfig config, int render_type, GLXContext share_list, Bool direct))
|
||||
GL_FUNCTION(glXCreateGLXPixmapWithConfigSGIX,GLXPixmap,(Display* dpy, GLXFBConfig config, Pixmap pixmap))
|
||||
GL_FUNCTION(glXGetFBConfigAttribSGIX,int,(Display* dpy, GLXFBConfigSGIX config, int attribute, int *value))
|
||||
GL_FUNCTION(glXGetFBConfigFromVisualSGIX,GLXFBConfigSGIX,(Display* dpy, XVisualInfo *vis))
|
||||
GL_FUNCTION(glXGetVisualFromFBConfigSGIX,XVisualInfo*,(Display *dpy, GLXFBConfig config))
|
||||
GL_GROUP_END()
|
||||
#endif
|
||||
|
||||
#ifdef GLX_SGIX_pbuffer
|
||||
GL_GROUP_BEGIN(GLX_SGIX_pbuffer)
|
||||
GL_FUNCTION(glXCreateGLXPbufferSGIX,GLXPbuffer,(Display* dpy, GLXFBConfig config, unsigned int width, unsigned int height, int *attrib_list))
|
||||
GL_FUNCTION(glXDestroyGLXPbufferSGIX,void,(Display* dpy, GLXPbuffer pbuf))
|
||||
GL_FUNCTION(glXGetSelectedEventSGIX,void,(Display* dpy, GLXDrawable drawable, unsigned long *mask))
|
||||
GL_FUNCTION(glXQueryGLXPbufferSGIX,void,(Display* dpy, GLXPbuffer pbuf, int attribute, unsigned int *value))
|
||||
GL_FUNCTION(glXSelectEventSGIX,void,(Display* dpy, GLXDrawable drawable, unsigned long mask))
|
||||
GL_GROUP_END()
|
||||
#endif
|
||||
|
||||
#ifdef GLX_SGIX_swap_barrier
|
||||
GL_GROUP_BEGIN(GLX_SGIX_swap_barrier)
|
||||
GL_FUNCTION(glXBindSwapBarrierSGIX,void,(Display *dpy, GLXDrawable drawable, int barrier))
|
||||
GL_FUNCTION(glXQueryMaxSwapBarriersSGIX,Bool,(Display *dpy, int screen, int *max))
|
||||
GL_GROUP_END()
|
||||
#endif
|
||||
|
||||
#ifdef GLX_SGIX_swap_group
|
||||
GL_GROUP_BEGIN(GLX_SGIX_swap_group)
|
||||
GL_FUNCTION(glXJoinSwapGroupSGIX,void,(Display *dpy, GLXDrawable drawable, GLXDrawable member))
|
||||
GL_GROUP_END()
|
||||
#endif
|
||||
|
||||
#ifdef GLX_SGIX_video_resize
|
||||
GL_GROUP_BEGIN(GLX_SGIX_video_resize)
|
||||
GL_FUNCTION(glXBindChannelToWindowSGIX,int,(Display* display, int screen, int channel, Window window))
|
||||
GL_FUNCTION(glXChannelRectSGIX,int,(Display* display, int screen, int channel, int x, int y, int w, int h))
|
||||
GL_FUNCTION(glXChannelRectSyncSGIX,int,(Display* display, int screen, int channel, GLenum synctype))
|
||||
GL_FUNCTION(glXQueryChannelDeltasSGIX,int,(Display* display, int screen, int channel, int *x, int *y, int *w, int *h))
|
||||
GL_FUNCTION(glXQueryChannelRectSGIX,int,(Display* display, int screen, int channel, int *dx, int *dy, int *dw, int *dh))
|
||||
GL_GROUP_END()
|
||||
#endif
|
||||
|
||||
#ifdef GLX_SGIX_visual_select_group
|
||||
GL_GROUP_BEGIN(GLX_SGIX_visual_select_group)
|
||||
GL_GROUP_END()
|
||||
#endif
|
||||
|
||||
#ifdef GLX_SGI_cushion
|
||||
GL_GROUP_BEGIN(GLX_SGI_cushion)
|
||||
GL_FUNCTION(glXCushionSGI,void,(Display* dpy, Window window, float cushion))
|
||||
GL_GROUP_END()
|
||||
#endif
|
||||
|
||||
#ifdef GLX_SGI_make_current_read
|
||||
GL_GROUP_BEGIN(GLX_SGI_make_current_read)
|
||||
GL_FUNCTION(glXGetCurrentReadDrawableSGI,GLXDrawable,(void))
|
||||
GL_FUNCTION(glXMakeCurrentReadSGI,Bool,(Display* dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx))
|
||||
GL_GROUP_END()
|
||||
#endif
|
||||
|
||||
#ifdef GLX_SGI_swap_control
|
||||
GL_GROUP_BEGIN(GLX_SGI_swap_control)
|
||||
GL_FUNCTION(glXSwapIntervalSGI,int,(int interval))
|
||||
GL_GROUP_END()
|
||||
#endif
|
||||
|
||||
#ifdef GLX_SGI_video_sync
|
||||
GL_GROUP_BEGIN(GLX_SGI_video_sync)
|
||||
GL_FUNCTION(glXGetVideoSyncSGI,int,(uint* count))
|
||||
GL_FUNCTION(glXWaitVideoSyncSGI,int,(int divisor, int remainder, unsigned int* count))
|
||||
GL_GROUP_END()
|
||||
#endif
|
||||
|
||||
#ifdef GLX_SUN_get_transparent_index
|
||||
GL_GROUP_BEGIN(GLX_SUN_get_transparent_index)
|
||||
GL_FUNCTION(glXGetTransparentIndexSUN,Status,(Display* dpy, Window overlay, Window underlay, unsigned long *pTransparentIndex))
|
||||
GL_GROUP_END()
|
||||
#endif
|
||||
|
||||
#ifdef GLX_SUN_video_resize
|
||||
GL_GROUP_BEGIN(GLX_SUN_video_resize)
|
||||
GL_FUNCTION(glXVideoResizeSUN,int,(Display* display, GLXDrawable window, float factor))
|
||||
GL_FUNCTION(glXGetVideoResizeSUN,int,(Display* display, GLXDrawable window, float* factor))
|
||||
GL_GROUP_END()
|
||||
#endif
|
||||
|
||||
#ifdef GLX_VERSION_1_1
|
||||
GL_GROUP_BEGIN(GLX_VERSION_1_1)
|
||||
GL_FUNCTION(glXQueryExtensionsString, const char*, (Display *dpy, int screen))
|
||||
GL_FUNCTION(glXGetClientString, const char*, (Display *dpy, int name))
|
||||
GL_FUNCTION(glXQueryServerString, const char*, (Display *dpy, int screen, int name))
|
||||
GL_GROUP_END()
|
||||
#endif
|
||||
|
||||
#ifdef GLX_VERSION_1_2
|
||||
GL_GROUP_BEGIN(GLX_VERSION_1_2)
|
||||
GL_FUNCTION(glXGetCurrentDisplay, Display*, (void))
|
||||
GL_GROUP_END()
|
||||
#endif
|
||||
|
||||
#ifdef GLX_VERSION_1_3
|
||||
GL_GROUP_BEGIN(GLX_VERSION_1_3)
|
||||
GL_FUNCTION(glXChooseFBConfig,GLXFBConfig*,(Display *dpy, int screen, const int *attrib_list, int *nelements))
|
||||
GL_FUNCTION(glXGetFBConfigs,GLXFBConfig*,(Display *dpy, int screen, int *nelements))
|
||||
GL_FUNCTION(glXGetVisualFromFBConfig,XVisualInfo*,(Display *dpy, GLXFBConfig config))
|
||||
GL_FUNCTION(glXGetFBConfigAttrib,int,(Display *dpy, GLXFBConfig config, int attribute, int *value))
|
||||
GL_FUNCTION(glXCreateWindow,GLXWindow,(Display *dpy, GLXFBConfig config, Window win, const int *attrib_list))
|
||||
GL_FUNCTION(glXDestroyWindow,void,(Display *dpy, GLXWindow win))
|
||||
GL_FUNCTION(glXCreatePixmap,GLXPixmap,(Display *dpy, GLXFBConfig config, Pixmap pixmap, const int *attrib_list))
|
||||
GL_FUNCTION(glXDestroyPixmap,void,(Display *dpy, GLXPixmap pixmap))
|
||||
GL_FUNCTION(glXCreatePbuffer,GLXPbuffer,(Display *dpy, GLXFBConfig config, const int *attrib_list))
|
||||
GL_FUNCTION(glXDestroyPbuffer,void,(Display *dpy, GLXPbuffer pbuf))
|
||||
GL_FUNCTION(glXQueryDrawable,void,(Display *dpy, GLXDrawable draw, int attribute, unsigned int *value))
|
||||
GL_FUNCTION(glXCreateNewContext,GLXContext,(Display *dpy, GLXFBConfig config, int render_type, GLXContext share_list, Bool direct))
|
||||
GL_FUNCTION(glXMakeContextCurrent,Bool,(Display *display, GLXDrawable draw, GLXDrawable read, GLXContext ctx))
|
||||
GL_FUNCTION(glXGetCurrentReadDrawable,GLXDrawable,(void))
|
||||
GL_FUNCTION(glXQueryContext,int,(Display *dpy, GLXContext ctx, int attribute, int *value))
|
||||
GL_FUNCTION(glXSelectEvent,void,(Display *dpy, GLXDrawable draw, unsigned long event_mask))
|
||||
GL_FUNCTION(glXGetSelectedEvent,void,(Display *dpy, GLXDrawable draw, unsigned long *event_mask))
|
||||
GL_GROUP_END()
|
||||
#endif
|
||||
|
||||
#ifdef GLX_VERSION_1_4
|
||||
GL_GROUP_BEGIN(GLX_VERSION_1_4)
|
||||
GL_FUNCTION(glXGetProcAddress, GLFunction, (const GLubyte *procName))
|
||||
GL_GROUP_END()
|
||||
#endif
|
||||
|
||||
|
||||
|
|
@ -1,43 +0,0 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Copyright (c) 2012 GarageGames, LLC
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to
|
||||
// deal in the Software without restriction, including without limitation the
|
||||
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
// sell copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
// IN THE SOFTWARE.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
// X11 gl functions
|
||||
GL_GROUP_BEGIN(ARB_glx)
|
||||
GL_FUNCTION(glXQueryExtension, Bool, (Display *dpy, int *errorBase, int *eventBase))
|
||||
GL_FUNCTION(glXQueryVersion, Bool, (Display *dpy, int *major, int *minor))
|
||||
GL_FUNCTION(glXGetConfig, int, (Display *dpy, XVisualInfo *vis, int attrib, int *value))
|
||||
GL_FUNCTION(glXChooseVisual, XVisualInfo*, (Display *dpy, int screen, int *attribList))
|
||||
GL_FUNCTION(glXCreateGLXPixmap, GLXPixmap, (Display *dpy, XVisualInfo *vis, Pixmap pixmap))
|
||||
GL_FUNCTION(glXDestroyGLXPixmap, void, (Display *dpy, GLXPixmap pix))
|
||||
GL_FUNCTION(glXCreateContext, GLXContext, (Display *dpy, XVisualInfo *vis, GLXContext shareList, Bool direct))
|
||||
GL_FUNCTION(glXDestroyContext, void, (Display *dpy, GLXContext ctx))
|
||||
GL_FUNCTION(glXIsDirect, Bool, (Display *dpy, GLXContext ctx))
|
||||
GL_FUNCTION(glXCopyContext, void, (Display *dpy, GLXContext src, GLXContext dst, GLuint mask))
|
||||
GL_FUNCTION(glXMakeCurrent, Bool, (Display *dpy, GLXDrawable drawable, GLXContext ctx))
|
||||
GL_FUNCTION(glXGetCurrentContext, GLXContext, (void))
|
||||
GL_FUNCTION(glXGetCurrentDrawable, GLXDrawable, (void))
|
||||
GL_FUNCTION(glXWaitGL, void, (void))
|
||||
GL_FUNCTION(glXWaitX, void, (void))
|
||||
GL_FUNCTION(glXSwapBuffers, void, (Display *dpy, GLXDrawable drawable))
|
||||
GL_FUNCTION(glXUseXFont, void, (Font font, int first, int count, int listBase))
|
||||
GL_GROUP_END()
|
||||
|
||||
|
|
@ -1,382 +0,0 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Copyright (c) 2012 GarageGames, LLC
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to
|
||||
// deal in the Software without restriction, including without limitation the
|
||||
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
// sell copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
// IN THE SOFTWARE.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#ifdef WGL_3DFX_multisample
|
||||
#define WGL_SAMPLE_BUFFERS_3DFX 0x2060
|
||||
#define WGL_SAMPLES_3DFX 0x2061
|
||||
#endif
|
||||
|
||||
#ifdef WGL_ARB_buffer_region
|
||||
#define WGL_FRONT_COLOR_BUFFER_BIT_ARB 0x00000001
|
||||
#define WGL_BACK_COLOR_BUFFER_BIT_ARB 0x00000002
|
||||
#define WGL_DEPTH_BUFFER_BIT_ARB 0x00000004
|
||||
#define WGL_STENCIL_BUFFER_BIT_ARB 0x00000008
|
||||
#define wglCreateBufferRegionARB XGL_FUNCPTR(wglCreateBufferRegionARB)
|
||||
#define wglDeleteBufferRegionARB XGL_FUNCPTR(wglDeleteBufferRegionARB)
|
||||
#define wglRestoreBufferRegionARB XGL_FUNCPTR(wglRestoreBufferRegionARB)
|
||||
#define wglSaveBufferRegionARB XGL_FUNCPTR(wglSaveBufferRegionARB)
|
||||
#endif
|
||||
|
||||
#ifdef WGL_ARB_extensions_string
|
||||
#define wglGetExtensionsStringARB XGL_FUNCPTR(wglGetExtensionsStringARB)
|
||||
#endif
|
||||
|
||||
#ifdef WGL_ARB_make_current_read
|
||||
#define wglGetCurrentReadDCARB XGL_FUNCPTR(wglGetCurrentReadDCARB)
|
||||
#define wglMakeContextCurrentARB XGL_FUNCPTR(wglMakeContextCurrentARB)
|
||||
#endif
|
||||
|
||||
#ifdef WGL_ARB_multisample
|
||||
#define WGL_SAMPLE_BUFFERS_ARB 0x2041
|
||||
#define WGL_SAMPLES_ARB 0x2042
|
||||
#endif
|
||||
|
||||
#ifdef WGL_ARB_pbuffer
|
||||
DECLARE_HANDLE(HPBUFFERARB);
|
||||
#define WGL_DRAW_TO_PBUFFER_ARB 0x202D
|
||||
#define WGL_MAX_PBUFFER_PIXELS_ARB 0x202E
|
||||
#define WGL_MAX_PBUFFER_WIDTH_ARB 0x202F
|
||||
#define WGL_MAX_PBUFFER_HEIGHT_ARB 0x2030
|
||||
#define WGL_PBUFFER_LARGEST_ARB 0x2033
|
||||
#define WGL_PBUFFER_WIDTH_ARB 0x2034
|
||||
#define WGL_PBUFFER_HEIGHT_ARB 0x2035
|
||||
#define WGL_PBUFFER_LOST_ARB 0x2036
|
||||
#define wglCreatePbufferARB XGL_FUNCPTR(wglCreatePbufferARB)
|
||||
#define wglDestroyPbufferARB XGL_FUNCPTR(wglDestroyPbufferARB)
|
||||
#define wglGetPbufferDCARB XGL_FUNCPTR(wglGetPbufferDCARB)
|
||||
#define wglQueryPbufferARB XGL_FUNCPTR(wglQueryPbufferARB)
|
||||
#define wglReleasePbufferDCARB XGL_FUNCPTR(wglReleasePbufferDCARB)
|
||||
#endif
|
||||
|
||||
#ifdef WGL_ARB_pixel_format
|
||||
#define WGL_NUMBER_PIXEL_FORMATS_ARB 0x2000
|
||||
#define WGL_DRAW_TO_WINDOW_ARB 0x2001
|
||||
#define WGL_DRAW_TO_BITMAP_ARB 0x2002
|
||||
#define WGL_ACCELERATION_ARB 0x2003
|
||||
#define WGL_NEED_PALETTE_ARB 0x2004
|
||||
#define WGL_NEED_SYSTEM_PALETTE_ARB 0x2005
|
||||
#define WGL_SWAP_LAYER_BUFFERS_ARB 0x2006
|
||||
#define WGL_SWAP_METHOD_ARB 0x2007
|
||||
#define WGL_NUMBER_OVERLAYS_ARB 0x2008
|
||||
#define WGL_NUMBER_UNDERLAYS_ARB 0x2009
|
||||
#define WGL_TRANSPARENT_ARB 0x200A
|
||||
#define WGL_SHARE_DEPTH_ARB 0x200C
|
||||
#define WGL_SHARE_STENCIL_ARB 0x200D
|
||||
#define WGL_SHARE_ACCUM_ARB 0x200E
|
||||
#define WGL_SUPPORT_GDI_ARB 0x200F
|
||||
#define WGL_SUPPORT_OPENGL_ARB 0x2010
|
||||
#define WGL_DOUBLE_BUFFER_ARB 0x2011
|
||||
#define WGL_STEREO_ARB 0x2012
|
||||
#define WGL_PIXEL_TYPE_ARB 0x2013
|
||||
#define WGL_COLOR_BITS_ARB 0x2014
|
||||
#define WGL_RED_BITS_ARB 0x2015
|
||||
#define WGL_RED_SHIFT_ARB 0x2016
|
||||
#define WGL_GREEN_BITS_ARB 0x2017
|
||||
#define WGL_GREEN_SHIFT_ARB 0x2018
|
||||
#define WGL_BLUE_BITS_ARB 0x2019
|
||||
#define WGL_BLUE_SHIFT_ARB 0x201A
|
||||
#define WGL_ALPHA_BITS_ARB 0x201B
|
||||
#define WGL_ALPHA_SHIFT_ARB 0x201C
|
||||
#define WGL_ACCUM_BITS_ARB 0x201D
|
||||
#define WGL_ACCUM_RED_BITS_ARB 0x201E
|
||||
#define WGL_ACCUM_GREEN_BITS_ARB 0x201F
|
||||
#define WGL_ACCUM_BLUE_BITS_ARB 0x2020
|
||||
#define WGL_ACCUM_ALPHA_BITS_ARB 0x2021
|
||||
#define WGL_DEPTH_BITS_ARB 0x2022
|
||||
#define WGL_STENCIL_BITS_ARB 0x2023
|
||||
#define WGL_AUX_BUFFERS_ARB 0x2024
|
||||
#define WGL_NO_ACCELERATION_ARB 0x2025
|
||||
#define WGL_GENERIC_ACCELERATION_ARB 0x2026
|
||||
#define WGL_FULL_ACCELERATION_ARB 0x2027
|
||||
#define WGL_SWAP_EXCHANGE_ARB 0x2028
|
||||
#define WGL_SWAP_COPY_ARB 0x2029
|
||||
#define WGL_SWAP_UNDEFINED_ARB 0x202A
|
||||
#define WGL_TYPE_RGBA_ARB 0x202B
|
||||
#define WGL_TYPE_COLORINDEX_ARB 0x202C
|
||||
#define WGL_TRANSPARENT_RED_VALUE_ARB 0x2037
|
||||
#define WGL_TRANSPARENT_GREEN_VALUE_ARB 0x2038
|
||||
#define WGL_TRANSPARENT_BLUE_VALUE_ARB 0x2039
|
||||
#define WGL_TRANSPARENT_ALPHA_VALUE_ARB 0x203A
|
||||
#define WGL_TRANSPARENT_INDEX_VALUE_ARB 0x203B
|
||||
#define wglChoosePixelFormatARB XGL_FUNCPTR(wglChoosePixelFormatARB)
|
||||
#define wglGetPixelFormatAttribfvARB XGL_FUNCPTR(wglGetPixelFormatAttribfvARB)
|
||||
#define wglGetPixelFormatAttribivARB XGL_FUNCPTR(wglGetPixelFormatAttribivARB)
|
||||
#endif
|
||||
|
||||
#ifdef WGL_ARB_pixel_format_float
|
||||
#define WGL_TYPE_RGBA_FLOAT_ARB 0x21A0
|
||||
#endif
|
||||
|
||||
#ifdef WGL_ARB_render_texture
|
||||
#define WGL_BIND_TO_TEXTURE_RGB_ARB 0x2070
|
||||
#define WGL_BIND_TO_TEXTURE_RGBA_ARB 0x2071
|
||||
#define WGL_TEXTURE_FORMAT_ARB 0x2072
|
||||
#define WGL_TEXTURE_TARGET_ARB 0x2073
|
||||
#define WGL_MIPMAP_TEXTURE_ARB 0x2074
|
||||
#define WGL_TEXTURE_RGB_ARB 0x2075
|
||||
#define WGL_TEXTURE_RGBA_ARB 0x2076
|
||||
#define WGL_NO_TEXTURE_ARB 0x2077
|
||||
#define WGL_TEXTURE_CUBE_MAP_ARB 0x2078
|
||||
#define WGL_TEXTURE_1D_ARB 0x2079
|
||||
#define WGL_TEXTURE_2D_ARB 0x207A
|
||||
#define WGL_MIPMAP_LEVEL_ARB 0x207B
|
||||
#define WGL_CUBE_MAP_FACE_ARB 0x207C
|
||||
#define WGL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB 0x207D
|
||||
#define WGL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB 0x207E
|
||||
#define WGL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB 0x207F
|
||||
#define WGL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB 0x2080
|
||||
#define WGL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB 0x2081
|
||||
#define WGL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB 0x2082
|
||||
#define WGL_FRONT_LEFT_ARB 0x2083
|
||||
#define WGL_FRONT_RIGHT_ARB 0x2084
|
||||
#define WGL_BACK_LEFT_ARB 0x2085
|
||||
#define WGL_BACK_RIGHT_ARB 0x2086
|
||||
#define WGL_AUX0_ARB 0x2087
|
||||
#define WGL_AUX1_ARB 0x2088
|
||||
#define WGL_AUX2_ARB 0x2089
|
||||
#define WGL_AUX3_ARB 0x208A
|
||||
#define WGL_AUX4_ARB 0x208B
|
||||
#define WGL_AUX5_ARB 0x208C
|
||||
#define WGL_AUX6_ARB 0x208D
|
||||
#define WGL_AUX7_ARB 0x208E
|
||||
#define WGL_AUX8_ARB 0x208F
|
||||
#define WGL_AUX9_ARB 0x2090
|
||||
#define wglBindTexImageARB XGL_FUNCPTR(wglBindTexImageARB)
|
||||
#define wglReleaseTexImageARB XGL_FUNCPTR(wglReleaseTexImageARB)
|
||||
#define wglSetPbufferAttribARB XGL_FUNCPTR(wglSetPbufferAttribARB)
|
||||
#endif
|
||||
|
||||
#ifdef WGL_ATI_pixel_format_float
|
||||
#define WGL_TYPE_RGBA_FLOAT_ATI 0x21A0
|
||||
#define GL_RGBA_FLOAT_MODE_ATI 0x8820
|
||||
#define GL_COLOR_CLEAR_UNCLAMPED_VALUE_ATI 0x8835
|
||||
#endif
|
||||
|
||||
#ifdef WGL_ATI_render_texture_rectangle
|
||||
#define WGL_TEXTURE_RECTANGLE_ATI 0x21A5
|
||||
#endif
|
||||
|
||||
#ifdef WGL_EXT_depth_float
|
||||
#define WGL_DEPTH_FLOAT_EXT 0x2040
|
||||
#endif
|
||||
|
||||
#ifdef WGL_EXT_display_color_table
|
||||
#define wglBindDisplayColorTableEXT XGL_FUNCPTR(wglBindDisplayColorTableEXT)
|
||||
#define wglCreateDisplayColorTableEXT XGL_FUNCPTR(wglCreateDisplayColorTableEXT)
|
||||
#define wglDestroyDisplayColorTableEXT XGL_FUNCPTR(wglDestroyDisplayColorTableEXT)
|
||||
#define wglLoadDisplayColorTableEXT XGL_FUNCPTR(wglLoadDisplayColorTableEXT)
|
||||
#endif
|
||||
|
||||
#ifdef WGL_EXT_extensions_string
|
||||
#define wglGetExtensionsStringEXT XGL_FUNCPTR(wglGetExtensionsStringEXT)
|
||||
#endif
|
||||
|
||||
#ifdef WGL_EXT_make_current_read
|
||||
#define wglGetCurrentReadDCEXT XGL_FUNCPTR(wglGetCurrentReadDCEXT)
|
||||
#define wglMakeContextCurrentEXT XGL_FUNCPTR(wglMakeContextCurrentEXT)
|
||||
#endif
|
||||
|
||||
#ifdef WGL_EXT_multisample
|
||||
#define WGL_SAMPLE_BUFFERS_EXT 0x2041
|
||||
#define WGL_SAMPLES_EXT 0x2042
|
||||
#endif
|
||||
|
||||
#ifdef WGL_EXT_pbuffer
|
||||
DECLARE_HANDLE(HPBUFFEREXT);;
|
||||
#define WGL_DRAW_TO_PBUFFER_EXT 0x202D
|
||||
#define WGL_MAX_PBUFFER_PIXELS_EXT 0x202E
|
||||
#define WGL_MAX_PBUFFER_WIDTH_EXT 0x202F
|
||||
#define WGL_MAX_PBUFFER_HEIGHT_EXT 0x2030
|
||||
#define WGL_OPTIMAL_PBUFFER_WIDTH_EXT 0x2031
|
||||
#define WGL_OPTIMAL_PBUFFER_HEIGHT_EXT 0x2032
|
||||
#define WGL_PBUFFER_LARGEST_EXT 0x2033
|
||||
#define WGL_PBUFFER_WIDTH_EXT 0x2034
|
||||
#define WGL_PBUFFER_HEIGHT_EXT 0x2035
|
||||
#define wglCreatePbufferEXT XGL_FUNCPTR(wglCreatePbufferEXT)
|
||||
#define wglDestroyPbufferEXT XGL_FUNCPTR(wglDestroyPbufferEXT)
|
||||
#define wglGetPbufferDCEXT XGL_FUNCPTR(wglGetPbufferDCEXT)
|
||||
#define wglQueryPbufferEXT XGL_FUNCPTR(wglQueryPbufferEXT)
|
||||
#define wglReleasePbufferDCEXT XGL_FUNCPTR(wglReleasePbufferDCEXT)
|
||||
#endif
|
||||
|
||||
#ifdef WGL_EXT_pixel_format
|
||||
#define WGL_NUMBER_PIXEL_FORMATS_EXT 0x2000
|
||||
#define WGL_DRAW_TO_WINDOW_EXT 0x2001
|
||||
#define WGL_DRAW_TO_BITMAP_EXT 0x2002
|
||||
#define WGL_ACCELERATION_EXT 0x2003
|
||||
#define WGL_NEED_PALETTE_EXT 0x2004
|
||||
#define WGL_NEED_SYSTEM_PALETTE_EXT 0x2005
|
||||
#define WGL_SWAP_LAYER_BUFFERS_EXT 0x2006
|
||||
#define WGL_SWAP_METHOD_EXT 0x2007
|
||||
#define WGL_NUMBER_OVERLAYS_EXT 0x2008
|
||||
#define WGL_NUMBER_UNDERLAYS_EXT 0x2009
|
||||
#define WGL_TRANSPARENT_EXT 0x200A
|
||||
#define WGL_TRANSPARENT_VALUE_EXT 0x200B
|
||||
#define WGL_SHARE_DEPTH_EXT 0x200C
|
||||
#define WGL_SHARE_STENCIL_EXT 0x200D
|
||||
#define WGL_SHARE_ACCUM_EXT 0x200E
|
||||
#define WGL_SUPPORT_GDI_EXT 0x200F
|
||||
#define WGL_SUPPORT_OPENGL_EXT 0x2010
|
||||
#define WGL_DOUBLE_BUFFER_EXT 0x2011
|
||||
#define WGL_STEREO_EXT 0x2012
|
||||
#define WGL_PIXEL_TYPE_EXT 0x2013
|
||||
#define WGL_COLOR_BITS_EXT 0x2014
|
||||
#define WGL_RED_BITS_EXT 0x2015
|
||||
#define WGL_RED_SHIFT_EXT 0x2016
|
||||
#define WGL_GREEN_BITS_EXT 0x2017
|
||||
#define WGL_GREEN_SHIFT_EXT 0x2018
|
||||
#define WGL_BLUE_BITS_EXT 0x2019
|
||||
#define WGL_BLUE_SHIFT_EXT 0x201A
|
||||
#define WGL_ALPHA_BITS_EXT 0x201B
|
||||
#define WGL_ALPHA_SHIFT_EXT 0x201C
|
||||
#define WGL_ACCUM_BITS_EXT 0x201D
|
||||
#define WGL_ACCUM_RED_BITS_EXT 0x201E
|
||||
#define WGL_ACCUM_GREEN_BITS_EXT 0x201F
|
||||
#define WGL_ACCUM_BLUE_BITS_EXT 0x2020
|
||||
#define WGL_ACCUM_ALPHA_BITS_EXT 0x2021
|
||||
#define WGL_DEPTH_BITS_EXT 0x2022
|
||||
#define WGL_STENCIL_BITS_EXT 0x2023
|
||||
#define WGL_AUX_BUFFERS_EXT 0x2024
|
||||
#define WGL_NO_ACCELERATION_EXT 0x2025
|
||||
#define WGL_GENERIC_ACCELERATION_EXT 0x2026
|
||||
#define WGL_FULL_ACCELERATION_EXT 0x2027
|
||||
#define WGL_SWAP_EXCHANGE_EXT 0x2028
|
||||
#define WGL_SWAP_COPY_EXT 0x2029
|
||||
#define WGL_SWAP_UNDEFINED_EXT 0x202A
|
||||
#define WGL_TYPE_RGBA_EXT 0x202B
|
||||
#define WGL_TYPE_COLORINDEX_EXT 0x202C
|
||||
#define wglChoosePixelFormatEXT XGL_FUNCPTR(wglChoosePixelFormatEXT)
|
||||
#define wglGetPixelFormatAttribfvEXT XGL_FUNCPTR(wglGetPixelFormatAttribfvEXT)
|
||||
#define wglGetPixelFormatAttribivEXT XGL_FUNCPTR(wglGetPixelFormatAttribivEXT)
|
||||
#endif
|
||||
|
||||
#ifdef WGL_EXT_swap_control
|
||||
#define wglGetSwapIntervalEXT XGL_FUNCPTR(wglGetSwapIntervalEXT)
|
||||
#define wglSwapIntervalEXT XGL_FUNCPTR(wglSwapIntervalEXT)
|
||||
#endif
|
||||
|
||||
#ifdef WGL_I3D_digital_video_control
|
||||
#define WGL_DIGITAL_VIDEO_CURSOR_ALPHA_FRAMEBUFFER_I3D 0x2050
|
||||
#define WGL_DIGITAL_VIDEO_CURSOR_ALPHA_VALUE_I3D 0x2051
|
||||
#define WGL_DIGITAL_VIDEO_CURSOR_INCLUDED_I3D 0x2052
|
||||
#define WGL_DIGITAL_VIDEO_GAMMA_CORRECTED_I3D 0x2053
|
||||
#define wglGetDigitalVideoParametersI3D XGL_FUNCPTR(wglGetDigitalVideoParametersI3D)
|
||||
#define wglSetDigitalVideoParametersI3D XGL_FUNCPTR(wglSetDigitalVideoParametersI3D)
|
||||
#endif
|
||||
|
||||
#ifdef WGL_I3D_gamma
|
||||
#define WGL_GAMMA_TABLE_SIZE_I3D 0x204E
|
||||
#define WGL_GAMMA_EXCLUDE_DESKTOP_I3D 0x204F
|
||||
#define wglGetGammaTableI3D XGL_FUNCPTR(wglGetGammaTableI3D)
|
||||
#define wglGetGammaTableParametersI3D XGL_FUNCPTR(wglGetGammaTableParametersI3D)
|
||||
#define wglSetGammaTableI3D XGL_FUNCPTR(wglSetGammaTableI3D)
|
||||
#define wglSetGammaTableParametersI3D XGL_FUNCPTR(wglSetGammaTableParametersI3D)
|
||||
#endif
|
||||
|
||||
#ifdef WGL_I3D_genlock
|
||||
#define WGL_GENLOCK_SOURCE_MULTIVIEW_I3D 0x2044
|
||||
#define WGL_GENLOCK_SOURCE_EXTERNAL_SYNC_I3D 0x2045
|
||||
#define WGL_GENLOCK_SOURCE_EXTERNAL_FIELD_I3D 0x2046
|
||||
#define WGL_GENLOCK_SOURCE_EXTERNAL_TTL_I3D 0x2047
|
||||
#define WGL_GENLOCK_SOURCE_DIGITAL_SYNC_I3D 0x2048
|
||||
#define WGL_GENLOCK_SOURCE_DIGITAL_FIELD_I3D 0x2049
|
||||
#define WGL_GENLOCK_SOURCE_EDGE_FALLING_I3D 0x204A
|
||||
#define WGL_GENLOCK_SOURCE_EDGE_RISING_I3D 0x204B
|
||||
#define WGL_GENLOCK_SOURCE_EDGE_BOTH_I3D 0x204C
|
||||
#define wglDisableGenlockI3D XGL_FUNCPTR(wglDisableGenlockI3D)
|
||||
#define wglEnableGenlockI3D XGL_FUNCPTR(wglEnableGenlockI3D)
|
||||
#define wglGenlockSampleRateI3D XGL_FUNCPTR(wglGenlockSampleRateI3D)
|
||||
#define wglGenlockSourceDelayI3D XGL_FUNCPTR(wglGenlockSourceDelayI3D)
|
||||
#define wglGenlockSourceEdgeI3D XGL_FUNCPTR(wglGenlockSourceEdgeI3D)
|
||||
#define wglGenlockSourceI3D XGL_FUNCPTR(wglGenlockSourceI3D)
|
||||
#define wglGetGenlockSampleRateI3D XGL_FUNCPTR(wglGetGenlockSampleRateI3D)
|
||||
#define wglGetGenlockSourceDelayI3D XGL_FUNCPTR(wglGetGenlockSourceDelayI3D)
|
||||
#define wglGetGenlockSourceEdgeI3D XGL_FUNCPTR(wglGetGenlockSourceEdgeI3D)
|
||||
#define wglGetGenlockSourceI3D XGL_FUNCPTR(wglGetGenlockSourceI3D)
|
||||
#define wglIsEnabledGenlockI3D XGL_FUNCPTR(wglIsEnabledGenlockI3D)
|
||||
#define wglQueryGenlockMaxSourceDelayI3D XGL_FUNCPTR(wglQueryGenlockMaxSourceDelayI3D)
|
||||
#endif
|
||||
|
||||
#ifdef WGL_I3D_image_buffer
|
||||
#define WGL_IMAGE_BUFFER_MIN_ACCESS_I3D 0x00000001
|
||||
#define WGL_IMAGE_BUFFER_LOCK_I3D 0x00000002
|
||||
#define wglAssociateImageBufferEventsI3D XGL_FUNCPTR(wglAssociateImageBufferEventsI3D)
|
||||
#define wglCreateImageBufferI3D XGL_FUNCPTR(wglCreateImageBufferI3D)
|
||||
#define wglDestroyImageBufferI3D XGL_FUNCPTR(wglDestroyImageBufferI3D)
|
||||
#define wglReleaseImageBufferEventsI3D XGL_FUNCPTR(wglReleaseImageBufferEventsI3D)
|
||||
#endif
|
||||
|
||||
#ifdef WGL_I3D_swap_frame_lock
|
||||
#define wglDisableFrameLockI3D XGL_FUNCPTR(wglDisableFrameLockI3D)
|
||||
#define wglEnableFrameLockI3D XGL_FUNCPTR(wglEnableFrameLockI3D)
|
||||
#define wglIsEnabledFrameLockI3D XGL_FUNCPTR(wglIsEnabledFrameLockI3D)
|
||||
#define wglQueryFrameLockMasterI3D XGL_FUNCPTR(wglQueryFrameLockMasterI3D)
|
||||
#endif
|
||||
|
||||
#ifdef WGL_I3D_swap_frame_usage
|
||||
#define wglBeginFrameTrackingI3D XGL_FUNCPTR(wglBeginFrameTrackingI3D)
|
||||
#define wglEndFrameTrackingI3D XGL_FUNCPTR(wglEndFrameTrackingI3D)
|
||||
#define wglGetFrameUsageI3D XGL_FUNCPTR(wglGetFrameUsageI3D)
|
||||
#define wglQueryFrameTrackingI3D XGL_FUNCPTR(wglQueryFrameTrackingI3D)
|
||||
#endif
|
||||
|
||||
#ifdef WGL_NV_float_buffer
|
||||
#define WGL_FLOAT_COMPONENTS_NV 0x20B0
|
||||
#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_R_NV 0x20B1
|
||||
#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RG_NV 0x20B2
|
||||
#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGB_NV 0x20B3
|
||||
#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGBA_NV 0x20B4
|
||||
#define WGL_TEXTURE_FLOAT_R_NV 0x20B5
|
||||
#define WGL_TEXTURE_FLOAT_RG_NV 0x20B6
|
||||
#define WGL_TEXTURE_FLOAT_RGB_NV 0x20B7
|
||||
#define WGL_TEXTURE_FLOAT_RGBA_NV 0x20B8
|
||||
#endif
|
||||
|
||||
#ifdef WGL_NV_render_depth_texture
|
||||
#define WGL_NO_TEXTURE_ARB 0x2077
|
||||
#define WGL_BIND_TO_TEXTURE_DEPTH_NV 0x20A3
|
||||
#define WGL_BIND_TO_TEXTURE_RECTANGLE_DEPTH_NV 0x20A4
|
||||
#define WGL_DEPTH_TEXTURE_FORMAT_NV 0x20A5
|
||||
#define WGL_TEXTURE_DEPTH_COMPONENT_NV 0x20A6
|
||||
#define WGL_DEPTH_COMPONENT_NV 0x20A7
|
||||
#endif
|
||||
|
||||
#ifdef WGL_NV_render_texture_rectangle
|
||||
#define WGL_BIND_TO_TEXTURE_RECTANGLE_RGB_NV 0x20A0
|
||||
#define WGL_BIND_TO_TEXTURE_RECTANGLE_RGBA_NV 0x20A1
|
||||
#define WGL_TEXTURE_RECTANGLE_NV 0x20A2
|
||||
#endif
|
||||
|
||||
#ifdef WGL_NV_vertex_array_range
|
||||
#define wglAllocateMemoryNV XGL_FUNCPTR(wglAllocateMemoryNV)
|
||||
#define wglFreeMemoryNV XGL_FUNCPTR(wglFreeMemoryNV)
|
||||
#endif
|
||||
|
||||
#ifdef WGL_OML_sync_control
|
||||
#define wglGetMscRateOML XGL_FUNCPTR(wglGetMscRateOML)
|
||||
#define wglGetSyncValuesOML XGL_FUNCPTR(wglGetSyncValuesOML)
|
||||
#define wglSwapBuffersMscOML XGL_FUNCPTR(wglSwapBuffersMscOML)
|
||||
#define wglSwapLayerBuffersMscOML XGL_FUNCPTR(wglSwapLayerBuffersMscOML)
|
||||
#define wglWaitForMscOML XGL_FUNCPTR(wglWaitForMscOML)
|
||||
#define wglWaitForSbcOML XGL_FUNCPTR(wglWaitForSbcOML)
|
||||
#endif
|
||||
|
||||
|
|
@ -1,245 +0,0 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Copyright (c) 2012 GarageGames, LLC
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to
|
||||
// deal in the Software without restriction, including without limitation the
|
||||
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
// sell copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
// IN THE SOFTWARE.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#ifdef WGL_3DFX_multisample
|
||||
GL_GROUP_BEGIN(WGL_3DFX_multisample)
|
||||
GL_GROUP_END()
|
||||
#endif
|
||||
|
||||
#ifdef WGL_ARB_buffer_region
|
||||
GL_GROUP_BEGIN(WGL_ARB_buffer_region)
|
||||
GL_FUNCTION(wglCreateBufferRegionARB,HANDLE,(HDC hDC, int iLayerPlane, UINT uType))
|
||||
GL_FUNCTION(wglDeleteBufferRegionARB,VOID,(HANDLE hRegion))
|
||||
GL_FUNCTION(wglRestoreBufferRegionARB,BOOL,(HANDLE hRegion, int x, int y, int width, int height, int xSrc, int ySrc))
|
||||
GL_FUNCTION(wglSaveBufferRegionARB,BOOL,(HANDLE hRegion, int x, int y, int width, int height))
|
||||
GL_GROUP_END()
|
||||
#endif
|
||||
|
||||
#ifdef WGL_ARB_extensions_string
|
||||
GL_GROUP_BEGIN(WGL_ARB_extensions_string)
|
||||
GL_FUNCTION(wglGetExtensionsStringARB,const char*,(HDC hdc))
|
||||
GL_GROUP_END()
|
||||
#endif
|
||||
|
||||
#ifdef WGL_ARB_make_current_read
|
||||
GL_GROUP_BEGIN(WGL_ARB_make_current_read)
|
||||
GL_FUNCTION(wglGetCurrentReadDCARB,HDC,(VOID))
|
||||
GL_FUNCTION(wglMakeContextCurrentARB,BOOL,(HDC hDrawDC, HDC hReadDC, HGLRC hglrc))
|
||||
GL_GROUP_END()
|
||||
#endif
|
||||
|
||||
#ifdef WGL_ARB_multisample
|
||||
GL_GROUP_BEGIN(WGL_ARB_multisample)
|
||||
GL_GROUP_END()
|
||||
#endif
|
||||
|
||||
#ifdef WGL_ARB_pbuffer
|
||||
GL_GROUP_BEGIN(WGL_ARB_pbuffer)
|
||||
GL_FUNCTION(wglCreatePbufferARB,HPBUFFERARB,(HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int* piAttribList))
|
||||
GL_FUNCTION(wglDestroyPbufferARB,BOOL,(HPBUFFERARB hPbuffer))
|
||||
GL_FUNCTION(wglGetPbufferDCARB,HDC,(HPBUFFERARB hPbuffer))
|
||||
GL_FUNCTION(wglQueryPbufferARB,BOOL,(HPBUFFERARB hPbuffer, int iAttribute, int* piValue))
|
||||
GL_FUNCTION(wglReleasePbufferDCARB,int,(HPBUFFERARB hPbuffer, HDC hDC))
|
||||
GL_GROUP_END()
|
||||
#endif
|
||||
|
||||
#ifdef WGL_ARB_pixel_format
|
||||
GL_GROUP_BEGIN(WGL_ARB_pixel_format)
|
||||
GL_FUNCTION(wglChoosePixelFormatARB,BOOL,(HDC hdc, const int* piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats))
|
||||
GL_FUNCTION(wglGetPixelFormatAttribfvARB,BOOL,(HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int* piAttributes, FLOAT *pfValues))
|
||||
GL_FUNCTION(wglGetPixelFormatAttribivARB,BOOL,(HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int* piAttributes, int *piValues))
|
||||
GL_GROUP_END()
|
||||
#endif
|
||||
|
||||
#ifdef WGL_ARB_pixel_format_float
|
||||
GL_GROUP_BEGIN(WGL_ARB_pixel_format_float)
|
||||
GL_GROUP_END()
|
||||
#endif
|
||||
|
||||
#ifdef WGL_ARB_render_texture
|
||||
GL_GROUP_BEGIN(WGL_ARB_render_texture)
|
||||
GL_FUNCTION(wglBindTexImageARB,BOOL,(HPBUFFERARB hPbuffer, int iBuffer))
|
||||
GL_FUNCTION(wglReleaseTexImageARB,BOOL,(HPBUFFERARB hPbuffer, int iBuffer))
|
||||
GL_FUNCTION(wglSetPbufferAttribARB,BOOL,(HPBUFFERARB hPbuffer, const int* piAttribList))
|
||||
GL_GROUP_END()
|
||||
#endif
|
||||
|
||||
#ifdef WGL_ATI_pixel_format_float
|
||||
GL_GROUP_BEGIN(WGL_ATI_pixel_format_float)
|
||||
GL_GROUP_END()
|
||||
#endif
|
||||
|
||||
#ifdef WGL_ATI_render_texture_rectangle
|
||||
GL_GROUP_BEGIN(WGL_ATI_render_texture_rectangle)
|
||||
GL_GROUP_END()
|
||||
#endif
|
||||
|
||||
#ifdef WGL_EXT_depth_float
|
||||
GL_GROUP_BEGIN(WGL_EXT_depth_float)
|
||||
GL_GROUP_END()
|
||||
#endif
|
||||
|
||||
#ifdef WGL_EXT_display_color_table
|
||||
GL_GROUP_BEGIN(WGL_EXT_display_color_table)
|
||||
GL_FUNCTION(wglBindDisplayColorTableEXT,GLboolean,(GLushort id))
|
||||
GL_FUNCTION(wglCreateDisplayColorTableEXT,GLboolean,(GLushort id))
|
||||
GL_FUNCTION(wglDestroyDisplayColorTableEXT,void,(GLushort id))
|
||||
GL_FUNCTION(wglLoadDisplayColorTableEXT,GLboolean,(GLushort* table, GLuint length))
|
||||
GL_GROUP_END()
|
||||
#endif
|
||||
|
||||
#ifdef WGL_EXT_extensions_string
|
||||
GL_GROUP_BEGIN(WGL_EXT_extensions_string)
|
||||
GL_FUNCTION(wglGetExtensionsStringEXT,const char*,(void))
|
||||
GL_GROUP_END()
|
||||
#endif
|
||||
|
||||
#ifdef WGL_EXT_make_current_read
|
||||
GL_GROUP_BEGIN(WGL_EXT_make_current_read)
|
||||
GL_FUNCTION(wglGetCurrentReadDCEXT,HDC,(VOID))
|
||||
GL_FUNCTION(wglMakeContextCurrentEXT,BOOL,(HDC hDrawDC, HDC hReadDC, HGLRC hglrc))
|
||||
GL_GROUP_END()
|
||||
#endif
|
||||
|
||||
#ifdef WGL_EXT_multisample
|
||||
GL_GROUP_BEGIN(WGL_EXT_multisample)
|
||||
GL_GROUP_END()
|
||||
#endif
|
||||
|
||||
#ifdef WGL_EXT_pbuffer
|
||||
GL_GROUP_BEGIN(WGL_EXT_pbuffer)
|
||||
GL_FUNCTION(wglCreatePbufferEXT,HPBUFFEREXT,(HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int* piAttribList))
|
||||
GL_FUNCTION(wglDestroyPbufferEXT,BOOL,(HPBUFFEREXT hPbuffer))
|
||||
GL_FUNCTION(wglGetPbufferDCEXT,HDC,(HPBUFFEREXT hPbuffer))
|
||||
GL_FUNCTION(wglQueryPbufferEXT,BOOL,(HPBUFFEREXT hPbuffer, int iAttribute, int* piValue))
|
||||
GL_FUNCTION(wglReleasePbufferDCEXT,int,(HPBUFFEREXT hPbuffer, HDC hDC))
|
||||
GL_GROUP_END()
|
||||
#endif
|
||||
|
||||
#ifdef WGL_EXT_pixel_format
|
||||
GL_GROUP_BEGIN(WGL_EXT_pixel_format)
|
||||
GL_FUNCTION(wglChoosePixelFormatEXT,BOOL,(HDC hdc, const int* piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats))
|
||||
GL_FUNCTION(wglGetPixelFormatAttribfvEXT,BOOL,(HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, int* piAttributes, FLOAT *pfValues))
|
||||
GL_FUNCTION(wglGetPixelFormatAttribivEXT,BOOL,(HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, int* piAttributes, int *piValues))
|
||||
GL_GROUP_END()
|
||||
#endif
|
||||
|
||||
#ifdef WGL_EXT_swap_control
|
||||
GL_GROUP_BEGIN(WGL_EXT_swap_control)
|
||||
GL_FUNCTION(wglGetSwapIntervalEXT,int,(void))
|
||||
GL_FUNCTION(wglSwapIntervalEXT,BOOL,(int interval))
|
||||
GL_GROUP_END()
|
||||
#endif
|
||||
|
||||
#ifdef WGL_I3D_digital_video_control
|
||||
GL_GROUP_BEGIN(WGL_I3D_digital_video_control)
|
||||
GL_FUNCTION(wglGetDigitalVideoParametersI3D,BOOL,(HDC hDC, int iAttribute, int* piValue))
|
||||
GL_FUNCTION(wglSetDigitalVideoParametersI3D,BOOL,(HDC hDC, int iAttribute, const int* piValue))
|
||||
GL_GROUP_END()
|
||||
#endif
|
||||
|
||||
#ifdef WGL_I3D_gamma
|
||||
GL_GROUP_BEGIN(WGL_I3D_gamma)
|
||||
GL_FUNCTION(wglGetGammaTableI3D,BOOL,(HDC hDC, int iEntries, USHORT* puRed, USHORT *puGreen, USHORT *puBlue))
|
||||
GL_FUNCTION(wglGetGammaTableParametersI3D,BOOL,(HDC hDC, int iAttribute, int* piValue))
|
||||
GL_FUNCTION(wglSetGammaTableI3D,BOOL,(HDC hDC, int iEntries, const USHORT* puRed, const USHORT *puGreen, const USHORT *puBlue))
|
||||
GL_FUNCTION(wglSetGammaTableParametersI3D,BOOL,(HDC hDC, int iAttribute, const int* piValue))
|
||||
GL_GROUP_END()
|
||||
#endif
|
||||
|
||||
#ifdef WGL_I3D_genlock
|
||||
GL_GROUP_BEGIN(WGL_I3D_genlock)
|
||||
GL_FUNCTION(wglDisableGenlockI3D,BOOL,(HDC hDC))
|
||||
GL_FUNCTION(wglEnableGenlockI3D,BOOL,(HDC hDC))
|
||||
GL_FUNCTION(wglGenlockSampleRateI3D,BOOL,(HDC hDC, UINT uRate))
|
||||
GL_FUNCTION(wglGenlockSourceDelayI3D,BOOL,(HDC hDC, UINT uDelay))
|
||||
GL_FUNCTION(wglGenlockSourceEdgeI3D,BOOL,(HDC hDC, UINT uEdge))
|
||||
GL_FUNCTION(wglGenlockSourceI3D,BOOL,(HDC hDC, UINT uSource))
|
||||
GL_FUNCTION(wglGetGenlockSampleRateI3D,BOOL,(HDC hDC, UINT* uRate))
|
||||
GL_FUNCTION(wglGetGenlockSourceDelayI3D,BOOL,(HDC hDC, UINT* uDelay))
|
||||
GL_FUNCTION(wglGetGenlockSourceEdgeI3D,BOOL,(HDC hDC, UINT* uEdge))
|
||||
GL_FUNCTION(wglGetGenlockSourceI3D,BOOL,(HDC hDC, UINT* uSource))
|
||||
GL_FUNCTION(wglIsEnabledGenlockI3D,BOOL,(HDC hDC, BOOL* pFlag))
|
||||
GL_FUNCTION(wglQueryGenlockMaxSourceDelayI3D,BOOL,(HDC hDC, UINT* uMaxLineDelay, UINT *uMaxPixelDelay))
|
||||
GL_GROUP_END()
|
||||
#endif
|
||||
|
||||
#ifdef WGL_I3D_image_buffer
|
||||
GL_GROUP_BEGIN(WGL_I3D_image_buffer)
|
||||
GL_FUNCTION(wglAssociateImageBufferEventsI3D,BOOL,(HDC hdc, HANDLE* pEvent, LPVOID *pAddress, DWORD *pSize, UINT count))
|
||||
GL_FUNCTION(wglCreateImageBufferI3D,LPVOID,(HDC hDC, DWORD dwSize, UINT uFlags))
|
||||
GL_FUNCTION(wglDestroyImageBufferI3D,BOOL,(HDC hDC, LPVOID pAddress))
|
||||
GL_FUNCTION(wglReleaseImageBufferEventsI3D,BOOL,(HDC hdc, LPVOID* pAddress, UINT count))
|
||||
GL_GROUP_END()
|
||||
#endif
|
||||
|
||||
#ifdef WGL_I3D_swap_frame_lock
|
||||
GL_GROUP_BEGIN(WGL_I3D_swap_frame_lock)
|
||||
GL_FUNCTION(wglDisableFrameLockI3D,BOOL,(VOID))
|
||||
GL_FUNCTION(wglEnableFrameLockI3D,BOOL,(VOID))
|
||||
GL_FUNCTION(wglIsEnabledFrameLockI3D,BOOL,(BOOL* pFlag))
|
||||
GL_FUNCTION(wglQueryFrameLockMasterI3D,BOOL,(BOOL* pFlag))
|
||||
GL_GROUP_END()
|
||||
#endif
|
||||
|
||||
#ifdef WGL_I3D_swap_frame_usage
|
||||
GL_GROUP_BEGIN(WGL_I3D_swap_frame_usage)
|
||||
GL_FUNCTION(wglBeginFrameTrackingI3D,BOOL,(void))
|
||||
GL_FUNCTION(wglEndFrameTrackingI3D,BOOL,(void))
|
||||
GL_FUNCTION(wglGetFrameUsageI3D,BOOL,(float* pUsage))
|
||||
GL_FUNCTION(wglQueryFrameTrackingI3D,BOOL,(DWORD* pFrameCount, DWORD *pMissedFrames, float *pLastMissedUsage))
|
||||
GL_GROUP_END()
|
||||
#endif
|
||||
|
||||
#ifdef WGL_NV_float_buffer
|
||||
GL_GROUP_BEGIN(WGL_NV_float_buffer)
|
||||
GL_GROUP_END()
|
||||
#endif
|
||||
|
||||
#ifdef WGL_NV_render_depth_texture
|
||||
GL_GROUP_BEGIN(WGL_NV_render_depth_texture)
|
||||
GL_GROUP_END()
|
||||
#endif
|
||||
|
||||
#ifdef WGL_NV_render_texture_rectangle
|
||||
GL_GROUP_BEGIN(WGL_NV_render_texture_rectangle)
|
||||
GL_GROUP_END()
|
||||
#endif
|
||||
|
||||
#ifdef WGL_NV_vertex_array_range
|
||||
GL_GROUP_BEGIN(WGL_NV_vertex_array_range)
|
||||
GL_FUNCTION(wglAllocateMemoryNV,void *,(GLsizei size, GLfloat readFrequency, GLfloat writeFrequency, GLfloat priority))
|
||||
GL_FUNCTION(wglFreeMemoryNV,void,(void *pointer))
|
||||
GL_GROUP_END()
|
||||
#endif
|
||||
|
||||
#ifdef WGL_OML_sync_control
|
||||
GL_GROUP_BEGIN(WGL_OML_sync_control)
|
||||
GL_FUNCTION(wglGetMscRateOML,BOOL,(HDC hdc, INT32* numerator, INT32 *denominator))
|
||||
GL_FUNCTION(wglGetSyncValuesOML,BOOL,(HDC hdc, INT64* ust, INT64 *msc, INT64 *sbc))
|
||||
GL_FUNCTION(wglSwapBuffersMscOML,INT64,(HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder))
|
||||
GL_FUNCTION(wglSwapLayerBuffersMscOML,INT64,(HDC hdc, INT fuPlanes, INT64 target_msc, INT64 divisor, INT64 remainder))
|
||||
GL_FUNCTION(wglWaitForMscOML,BOOL,(HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder, INT64* ust, INT64 *msc, INT64 *sbc))
|
||||
GL_FUNCTION(wglWaitForSbcOML,BOOL,(HDC hdc, INT64 target_sbc, INT64* ust, INT64 *msc, INT64 *sbc))
|
||||
GL_GROUP_END()
|
||||
#endif
|
||||
|
||||
|
|
@ -1,47 +0,0 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Copyright (c) 2012 GarageGames, LLC
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to
|
||||
// deal in the Software without restriction, including without limitation the
|
||||
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
// sell copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
// IN THE SOFTWARE.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
// Windows WGL functions
|
||||
GL_GROUP_BEGIN(ARB_win32)
|
||||
GL_FUNCTION(wglCopyContext, BOOL, (HGLRC, HGLRC, UINT))
|
||||
GL_FUNCTION(wglCreateContext, HGLRC, (HDC))
|
||||
GL_FUNCTION(wglCreateLayerContext, HGLRC, (HDC, GLint))
|
||||
GL_FUNCTION(wglDeleteContext, BOOL, (HGLRC))
|
||||
GL_FUNCTION(wglGetCurrentContext, HGLRC, (VOID))
|
||||
GL_FUNCTION(wglGetCurrentDC, HDC, (VOID))
|
||||
GL_FUNCTION(wglGetProcAddress, PROC, (LPCSTR))
|
||||
GL_FUNCTION(wglMakeCurrent, BOOL, (HDC, HGLRC))
|
||||
GL_FUNCTION(wglShareLists, BOOL, (HGLRC, HGLRC))
|
||||
GL_FUNCTION(wglDescribeLayerPlane, BOOL, (HDC, GLint, GLint, UINT, LPLAYERPLANEDESCRIPTOR))
|
||||
GL_FUNCTION(wglSetLayerPaletteEntries, GLint, (HDC, GLint, GLint, GLint, CONST COLORREF *))
|
||||
GL_FUNCTION(wglGetLayerPaletteEntries, GLint, (HDC, GLint, GLint, GLint, COLORREF *))
|
||||
GL_FUNCTION(wglRealizeLayerPalette, BOOL, (HDC, GLint, BOOL))
|
||||
GL_FUNCTION(wglSwapLayerBuffers, BOOL, (HDC, UINT))
|
||||
|
||||
// Ascii and Unicode versions
|
||||
GL_FUNCTION(wglUseFontBitmapsA, BOOL, (HDC, DWORD, DWORD, DWORD))
|
||||
GL_FUNCTION(wglUseFontOutlinesA, BOOL, (HDC, DWORD, DWORD, DWORD, FLOAT, FLOAT, GLint, LPGLYPHMETRICSFLOAT))
|
||||
GL_FUNCTION(wglUseFontBitmapsW, BOOL, (HDC, DWORD, DWORD, DWORD))
|
||||
GL_FUNCTION(wglUseFontOutlinesW, BOOL, (HDC, DWORD, DWORD, DWORD, FLOAT, FLOAT, GLint, LPGLYPHMETRICSFLOAT))
|
||||
|
||||
GL_GROUP_END()
|
||||
|
||||
|
|
@ -1,626 +0,0 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Copyright (c) 2012 GarageGames, LLC
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to
|
||||
// deal in the Software without restriction, including without limitation the
|
||||
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
// sell copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
// IN THE SOFTWARE.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------------
|
||||
#include "os/osFile.h"
|
||||
#include "os/osPrint.h"
|
||||
#include "util/utilStr.h"
|
||||
#include "util/utilString.h"
|
||||
#include "util/utilArray.h"
|
||||
#include "util/utilMap.h"
|
||||
#include "util/utilSort.h"
|
||||
|
||||
using namespace Torque;
|
||||
|
||||
#include <stdio.h>
|
||||
#include <dirent.h>
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
const char* OrderTable[] =
|
||||
{
|
||||
// Extension list as of 8.25.2005
|
||||
// http://oss.sgi.com/projects/ogl-sample/registry/
|
||||
|
||||
// Core
|
||||
"GL_VERSION_1_1",
|
||||
"GL_VERSION_1_2",
|
||||
"GL_VERSION_1_3",
|
||||
"GL_VERSION_1_4",
|
||||
"GL_VERSION_1_5",
|
||||
|
||||
// X Windows
|
||||
"GLX_VERSION_1_1",
|
||||
"GLX_VERSION_1_2",
|
||||
"GLX_VERSION_1_3",
|
||||
"GLX_VERSION_1_4",
|
||||
"GLX_VERSION_1_5",
|
||||
|
||||
// Arb extension
|
||||
"GL_ARB_multitexture",
|
||||
"GLX_ARB_get_proc_address",
|
||||
"GL_ARB_transpose_matrix",
|
||||
"WGL_ARB_buffer_region",
|
||||
"GL_ARB_multisample",
|
||||
"GL_ARB_texture_env_add",
|
||||
"GL_ARB_texture_cube_map",
|
||||
"WGL_ARB_extensions_string",
|
||||
"WGL_ARB_pixel_format",
|
||||
"WGL_ARB_make_current_read",
|
||||
"WGL_ARB_pbuffer",
|
||||
"GL_ARB_texture_compression",
|
||||
"GL_ARB_texture_border_clamp",
|
||||
"GL_ARB_point_parameters",
|
||||
"GL_ARB_vertex_blend",
|
||||
"GL_ARB_matrix_palette",
|
||||
"GL_ARB_texture_env_combine",
|
||||
"GL_ARB_texture_env_crossbar",
|
||||
"GL_ARB_texture_env_dot3",
|
||||
"WGL_ARB_render_texture",
|
||||
"GL_ARB_texture_mirrored_repeat",
|
||||
"GL_ARB_depth_texture",
|
||||
"GL_ARB_shadow",
|
||||
"GL_ARB_shadow_ambient",
|
||||
"GL_ARB_window_pos",
|
||||
"GL_ARB_vertex_program",
|
||||
"GL_ARB_fragment_program",
|
||||
"GL_ARB_vertex_buffer_object",
|
||||
"GL_ARB_occlusion_query",
|
||||
"GL_ARB_shader_objects",
|
||||
"GL_ARB_vertex_shader",
|
||||
"GL_ARB_fragment_shader",
|
||||
"GL_ARB_shading_language_100",
|
||||
"GL_ARB_texture_non_power_of_two",
|
||||
"GL_ARB_point_sprite",
|
||||
"GL_ARB_fragment_program_shadow",
|
||||
"GL_ARB_draw_buffers",
|
||||
"GL_ARB_texture_rectangle",
|
||||
"GL_ARB_color_buffer_float",
|
||||
"GL_ARB_half_float_pixel",
|
||||
"GL_ARB_texture_float",
|
||||
"GL_ARB_pixel_buffer_object",
|
||||
|
||||
// Misc extensions
|
||||
"GL_EXT_abgr",
|
||||
"GL_EXT_blend_color",
|
||||
"GL_EXT_polygon_offset",
|
||||
"GL_EXT_texture",
|
||||
"GL_EXT_texture3D",
|
||||
"GL_SGIS_texture_filter4",
|
||||
"GL_EXT_subtexture",
|
||||
"GL_EXT_copy_texture",
|
||||
"GL_EXT_histogram",
|
||||
"GL_EXT_convolution",
|
||||
"GL_SGI_color_matrix",
|
||||
"GL_SGI_color_table",
|
||||
"GL_SGIS_pixel_texture",
|
||||
"GL_SGIX_pixel_texture",
|
||||
"GL_SGIS_texture4D",
|
||||
"GL_SGI_texture_color_table",
|
||||
"GL_EXT_cmyka",
|
||||
"GL_EXT_texture_object",
|
||||
"GL_SGIS_detail_texture",
|
||||
"GL_SGIS_sharpen_texture",
|
||||
"GL_EXT_packed_pixels",
|
||||
"GL_SGIS_texture_lod",
|
||||
"GL_SGIS_multisample",
|
||||
"GL_EXT_rescale_normal",
|
||||
"GLX_EXT_visual_info",
|
||||
"GL_EXT_vertex_array",
|
||||
"GL_EXT_misc_attribute",
|
||||
"GL_SGIS_generate_mipmap",
|
||||
"GL_SGIX_clipmap",
|
||||
"GL_SGIX_shadow",
|
||||
"GL_SGIS_texture_edge_clamp",
|
||||
"GL_SGIS_texture_border_clamp",
|
||||
"GL_EXT_blend_minmax",
|
||||
"GL_EXT_blend_subtract",
|
||||
"GL_EXT_blend_logic_op",
|
||||
"GLX_SGI_swap_control",
|
||||
"GLX_SGI_video_sync",
|
||||
"GLX_SGI_make_current_read",
|
||||
"GLX_SGIX_video_source",
|
||||
"GLX_EXT_visual_rating",
|
||||
"GL_SGIX_interlace",
|
||||
"GLX_EXT_import_context",
|
||||
"GLX_SGIX_fbconfig",
|
||||
"GLX_SGIX_pbuffer",
|
||||
"GL_SGIS_texture_select",
|
||||
"GL_SGIX_sprite",
|
||||
"GL_SGIX_texture_multi_buffer",
|
||||
"GL_EXT_point_parameters",
|
||||
"GL_SGIX_instruments",
|
||||
"GL_SGIX_texture_scale_bias",
|
||||
"GL_SGIX_framezoom",
|
||||
"GL_SGIX_tag_sample_buffer",
|
||||
"GL_SGIX_reference_plane",
|
||||
"GL_SGIX_flush_raster",
|
||||
"GLX_SGI_cushion",
|
||||
"GL_SGIX_depth_texture",
|
||||
"GL_SGIS_fog_function",
|
||||
"GL_SGIX_fog_offset",
|
||||
"GL_HP_image_transform",
|
||||
"GL_HP_convolution_border_modes",
|
||||
"GL_SGIX_texture_add_env",
|
||||
"GL_EXT_color_subtable",
|
||||
"GLU_EXT_object_space_tess",
|
||||
"GL_PGI_vertex_hints",
|
||||
"GL_PGI_misc_hints",
|
||||
"GL_EXT_paletted_texture",
|
||||
"GL_EXT_clip_volume_hint",
|
||||
"GL_SGIX_list_priority",
|
||||
"GL_SGIX_ir_instrument1",
|
||||
"GLX_SGIX_video_resize",
|
||||
"GL_SGIX_texture_lod_bias",
|
||||
"GLU_SGI_filter4_parameters",
|
||||
"GLX_SGIX_dm_buffer",
|
||||
"GL_SGIX_shadow_ambient",
|
||||
"GLX_SGIX_swap_group",
|
||||
"GLX_SGIX_swap_barrier",
|
||||
"GL_EXT_index_texture",
|
||||
"GL_EXT_index_material",
|
||||
"GL_EXT_index_func",
|
||||
"GL_EXT_index_array_formats",
|
||||
"GL_EXT_compiled_vertex_array",
|
||||
"GL_EXT_cull_vertex",
|
||||
"GLU_EXT_nurbs_tessellator",
|
||||
"GL_SGIX_ycrcb",
|
||||
"GL_EXT_fragment_lighting",
|
||||
"GL_IBM_rasterpos_clip",
|
||||
"GL_HP_texture_lighting",
|
||||
"GL_EXT_draw_range_elements",
|
||||
"GL_WIN_phong_shading",
|
||||
"GL_WIN_specular_fog",
|
||||
"GLX_SGIS_color_range",
|
||||
"GL_EXT_light_texture",
|
||||
"GL_SGIX_blend_alpha_minmax",
|
||||
"GL_EXT_scene_marker",
|
||||
"GL_SGIX_pixel_texture_bits",
|
||||
"GL_EXT_bgra",
|
||||
"GL_SGIX_async",
|
||||
"GL_SGIX_async_pixel",
|
||||
"GL_SGIX_async_histogram",
|
||||
"GL_INTEL_texture_scissor",
|
||||
"GL_INTEL_parallel_arrays",
|
||||
"GL_HP_occlusion_test",
|
||||
"GL_EXT_pixel_transform",
|
||||
"GL_EXT_pixel_transform_color_table",
|
||||
"GL_EXT_shared_texture_palette",
|
||||
"GLX_SGIS_blended_overlay",
|
||||
"GL_EXT_separate_specular_color",
|
||||
"GL_EXT_secondary_color",
|
||||
"GL_EXT_texture_env",
|
||||
"GL_EXT_texture_perturb_normal",
|
||||
"GL_EXT_multi_draw_arrays",
|
||||
"GL_EXT_fog_coord",
|
||||
"GL_REND_screen_coordinates",
|
||||
"GL_EXT_coordinate_frame",
|
||||
"GL_EXT_texture_env_combine",
|
||||
"GL_APPLE_specular_vector",
|
||||
"GL_APPLE_transform_hint",
|
||||
"GL_SUNX_constant_data",
|
||||
"GL_SUN_global_alpha",
|
||||
"GL_SUN_triangle_list",
|
||||
"GL_SUN_vertex",
|
||||
"WGL_EXT_display_color_table",
|
||||
"WGL_EXT_extensions_string",
|
||||
"WGL_EXT_make_current_read",
|
||||
"WGL_EXT_pixel_format",
|
||||
"WGL_EXT_pbuffer",
|
||||
"WGL_EXT_swap_control",
|
||||
"GL_EXT_blend_func_separate",
|
||||
"GL_INGR_color_clamp",
|
||||
"GL_INGR_interlace_read",
|
||||
"GL_EXT_stencil_wrap",
|
||||
"WGL_EXT_depth_float",
|
||||
"GL_EXT_422_pixels",
|
||||
"GL_NV_texgen_reflection",
|
||||
"GL_SGIX_texture_range",
|
||||
"GL_SUN_convolution_border_modes",
|
||||
"GLX_SUN_get_transparent_index",
|
||||
"GL_EXT_texture_env_add",
|
||||
"GL_EXT_texture_lod_bias",
|
||||
"GL_EXT_texture_filter_anisotropic",
|
||||
"GL_EXT_vertex_weighting",
|
||||
"GL_NV_light_max_exponent",
|
||||
"GL_NV_vertex_array_range",
|
||||
"GL_NV_register_combiners",
|
||||
"GL_NV_fog_distance",
|
||||
"GL_NV_texgen_emboss",
|
||||
"GL_NV_blend_square",
|
||||
"GL_NV_texture_env_combine4",
|
||||
"GL_MESA_resize_buffers",
|
||||
"GL_MESA_window_pos",
|
||||
"GL_EXT_texture_compression_s3tc",
|
||||
"GL_IBM_cull_vertex",
|
||||
"GL_IBM_multimode_draw_arrays",
|
||||
"GL_IBM_vertex_array_lists",
|
||||
"GL_3DFX_texture_compression_FXT1",
|
||||
"GL_3DFX_multisample",
|
||||
"GL_3DFX_tbuffer",
|
||||
"WGL_EXT_multisample",
|
||||
"GL_SGIX_vertex_preclip",
|
||||
"GL_SGIX_resample",
|
||||
"GL_SGIS_texture_color_mask",
|
||||
"GLX_MESA_copy_sub_buffer",
|
||||
"GLX_MESA_pixmap_colormap",
|
||||
"GLX_MESA_release_buffers",
|
||||
"GLX_MESA_set_3dfx_mode",
|
||||
"GL_EXT_texture_env_dot3",
|
||||
"GL_ATI_texture_mirror_once",
|
||||
"GL_NV_fence",
|
||||
"GL_IBM_static_data",
|
||||
"GL_IBM_texture_mirrored_repeat",
|
||||
"GL_NV_evaluators",
|
||||
"GL_NV_packed_depth_stencil",
|
||||
"GL_NV_register_combiners2",
|
||||
"GL_NV_texture_compression_vtc",
|
||||
"GL_NV_texture_rectangle",
|
||||
"GL_NV_texture_shader",
|
||||
"GL_NV_texture_shader2",
|
||||
"GL_NV_vertex_array_range2",
|
||||
"GL_NV_vertex_program",
|
||||
"GLX_SGIX_visual_select_group",
|
||||
"GL_SGIX_texture_coordinate_clamp",
|
||||
"GLX_OML_swap_method",
|
||||
"GLX_OML_sync_control",
|
||||
"GL_OML_interlace",
|
||||
"GL_OML_subsample",
|
||||
"GL_OML_resample",
|
||||
"WGL_OML_sync_control",
|
||||
"GL_NV_copy_depth_to_color",
|
||||
"GL_ATI_envmap_bumpmap",
|
||||
"GL_ATI_fragment_shader",
|
||||
"GL_ATI_pn_triangles",
|
||||
"GL_ATI_vertex_array_object",
|
||||
"GL_EXT_vertex_shader",
|
||||
"GL_ATI_vertex_streams",
|
||||
"WGL_I3D_digital_video_control",
|
||||
"WGL_I3D_gamma",
|
||||
"WGL_I3D_genlock",
|
||||
"WGL_I3D_image_buffer",
|
||||
"WGL_I3D_swap_frame_lock",
|
||||
"WGL_I3D_swap_frame_usage",
|
||||
"GL_ATI_element_array",
|
||||
"GL_SUN_mesh_array",
|
||||
"GL_SUN_slice_accum",
|
||||
"GL_NV_multisample_filter_hint",
|
||||
"GL_NV_depth_clamp",
|
||||
"GL_NV_occlusion_query",
|
||||
"GL_NV_point_sprite",
|
||||
"WGL_NV_render_depth_texture",
|
||||
"WGL_NV_render_texture_rectangle",
|
||||
"GL_NV_texture_shader3",
|
||||
"GL_NV_vertex_program1_1",
|
||||
"GL_EXT_shadow_funcs",
|
||||
"GL_EXT_stencil_two_side",
|
||||
"GL_ATI_text_fragment_shader",
|
||||
"GL_APPLE_client_storage",
|
||||
"GL_APPLE_element_array",
|
||||
"GL_APPLE_fence",
|
||||
"GL_APPLE_vertex_array_object",
|
||||
"GL_APPLE_vertex_array_range",
|
||||
"GL_APPLE_ycbcr_422",
|
||||
"GL_S3_s3tc",
|
||||
"GL_ATI_draw_buffers",
|
||||
"WGL_ATI_pixel_format_float",
|
||||
"GL_ATI_texture_env_combine3",
|
||||
"GL_ATI_texture_float",
|
||||
"GL_NV_float_buffer",
|
||||
"GL_NV_fragment_program",
|
||||
"GL_NV_half_float",
|
||||
"GL_NV_pixel_data_range",
|
||||
"GL_NV_primitive_restart",
|
||||
"GL_NV_texture_expand_normal",
|
||||
"GL_NV_vertex_program2",
|
||||
"GL_ATI_map_object_buffer",
|
||||
"GL_ATI_separate_stencil",
|
||||
"GL_ATI_vertex_attrib_array_object",
|
||||
"GL_OES_byte_coordinates",
|
||||
"GL_OES_fixed_point",
|
||||
"GL_OES_single_precision",
|
||||
"GL_OES_compressed_paletted_texture",
|
||||
"GL_OES_read_format",
|
||||
"GL_OES_query_matrix",
|
||||
"GL_EXT_depth_bounds_test",
|
||||
"GL_EXT_texture_mirror_clamp",
|
||||
"GL_EXT_blend_equation_separate",
|
||||
"GL_MESA_pack_invert",
|
||||
"GL_MESA_ycbcr_texture",
|
||||
"GL_EXT_pixel_buffer_object",
|
||||
"GL_NV_fragment_program_option",
|
||||
"GL_NV_fragment_program2",
|
||||
"GL_NV_vertex_program2_option",
|
||||
"GL_NV_vertex_program3",
|
||||
"GLX_SGIX_hyperpipe",
|
||||
"GLX_MESA_agp_offset",
|
||||
"GL_EXT_texture_compression_dxt1",
|
||||
"GL_EXT_framebuffer_object",
|
||||
"GL_GREMEDY_string_marker",
|
||||
};
|
||||
|
||||
Map<String,int> OutputOrder;
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
String trim(const char* str)
|
||||
{
|
||||
String ts = "";
|
||||
if (str) {
|
||||
int s = 0, e = strLength(str);
|
||||
for (; s != e; s++) {
|
||||
C8 c = str[s];
|
||||
if (c != ' ' && c != '\t' && c != '\n')
|
||||
break;
|
||||
}
|
||||
while (s != e) {
|
||||
C8 c = str[--e];
|
||||
if (c != ' ' && c != '\t' && c != '\n')
|
||||
break;
|
||||
}
|
||||
if (s != e)
|
||||
ts.insert(0,str + s,e-s+1);
|
||||
}
|
||||
return ts;
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
struct Group
|
||||
{
|
||||
String name;
|
||||
String link;
|
||||
Array<String> defines;
|
||||
Array<String> functions;
|
||||
Array<String> types;
|
||||
int order;
|
||||
};
|
||||
typedef Array<Group> GroupList;
|
||||
|
||||
static inline int weight(const String& str)
|
||||
{
|
||||
if (str.find("GL_VERSION") != String::NPos)
|
||||
return 0;
|
||||
|
||||
String prefix = str.substr(0,3);
|
||||
if (prefix == "GL_")
|
||||
return 1;
|
||||
if (prefix == "GLU")
|
||||
return 2;
|
||||
if (prefix == "GLX")
|
||||
return 3;
|
||||
if (prefix == "WGL")
|
||||
return 4;
|
||||
return 5;
|
||||
}
|
||||
|
||||
bool operator<(const Group& a,const Group& b)
|
||||
{
|
||||
int wa = weight(a.name);
|
||||
int wb = weight(b.name);
|
||||
return (wa == wb)? a.name < b.name: wa < wb;
|
||||
// return a.order < b.order;
|
||||
}
|
||||
|
||||
bool loadFile(Group& group,String name)
|
||||
{
|
||||
FILE* file = fopen(name.c_str(),"r");
|
||||
if (!file) {
|
||||
Print("Could not open file " + name);
|
||||
return false;
|
||||
}
|
||||
|
||||
char buf[512];
|
||||
group.name = trim(fgets(buf,sizeof(buf),file));
|
||||
|
||||
Map<String,int>::Iterator entry = OutputOrder.find(group.name);
|
||||
if (entry == OutputOrder.end()) {
|
||||
Print ("[" + group.name + "]");
|
||||
}
|
||||
group.order = (entry != OutputOrder.end())? entry->value: 2000;
|
||||
|
||||
while (!feof(file)) {
|
||||
String str = trim(fgets(buf,sizeof(buf),file));
|
||||
if (!str.length())
|
||||
continue;
|
||||
|
||||
if (str.find("http:") != String::NPos) {
|
||||
group.link = trim(str);
|
||||
continue;
|
||||
}
|
||||
if (str.find("typedef") != String::NPos) {
|
||||
group.types.pushBack(str);
|
||||
continue;
|
||||
}
|
||||
if (str.find("DECLARE") != String::NPos) {
|
||||
group.types.pushBack(str);
|
||||
continue;
|
||||
}
|
||||
if (str.find("(") != String::NPos) {
|
||||
group.functions.pushBack(str);
|
||||
continue;
|
||||
}
|
||||
group.defines.pushBack(str);
|
||||
}
|
||||
fclose( file );
|
||||
return true;
|
||||
}
|
||||
|
||||
void loadDir(GroupList& groups,String name,const char* filter)
|
||||
{
|
||||
DIR *dir = opendir(name);
|
||||
if (!dir) {
|
||||
Print("Could not open file " + name);
|
||||
return;
|
||||
}
|
||||
|
||||
struct dirent *fEntry;
|
||||
while ((fEntry = readdir(dir)) != 0) {
|
||||
if (fEntry->d_name[0] == '.')
|
||||
continue;
|
||||
String file = name + "/" + String(fEntry->d_name);
|
||||
if (filter[0] != '*' && file.find(filter) == String::NPos)
|
||||
continue;
|
||||
//Print("Loading " + file);
|
||||
groups.pushBack(Group());
|
||||
if (!loadFile(groups.last(),file))
|
||||
groups.popBack();
|
||||
}
|
||||
|
||||
quickSort(groups.begin(),groups.end());
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
void write(FILE* file,String line)
|
||||
{
|
||||
fwrite(line,1,line.length(),file);
|
||||
}
|
||||
|
||||
void outputHeader(GroupList& groups, String name)
|
||||
{
|
||||
FILE* file = fopen(name.c_str(),"w");
|
||||
if (!file)
|
||||
Print("Could not open file " + name);
|
||||
|
||||
// Output all the group name together at the top
|
||||
for (GroupList::Iterator grp = groups.begin(); grp != groups.end(); grp++)
|
||||
write(file,"#define " + grp->name + "\n");
|
||||
|
||||
#if 0 // Types now with the group
|
||||
// Output all the types for all the extensions
|
||||
for (GroupList::Iterator grp = groups.begin(); grp != groups.end(); grp++)
|
||||
for (Array<String>::Iterator itr = grp->types.begin();
|
||||
itr != grp->types.end(); itr++)
|
||||
write(file,*itr + ";\n");
|
||||
#endif
|
||||
|
||||
// Output the defines for each group
|
||||
for (GroupList::Iterator grp = groups.begin(); grp != groups.end(); grp++) {
|
||||
if (!grp->name)
|
||||
continue;
|
||||
write(file,"\n#ifdef " + grp->name + "\n");
|
||||
for (Array<String>::Iterator itr = grp->types.begin();
|
||||
itr != grp->types.end(); itr++)
|
||||
write(file,*itr + ";\n");
|
||||
for (Array<String>::Iterator itr = grp->defines.begin();
|
||||
itr != grp->defines.end(); itr++) {
|
||||
write(file,"#define " + *itr + "\n");
|
||||
}
|
||||
for (Array<String>::Iterator itr = grp->functions.begin();
|
||||
itr != grp->functions.end(); itr++) {
|
||||
String& str = *itr;
|
||||
|
||||
// Parse function "return name (args)". Start at the back because
|
||||
// args is enclosed in (), the name has no spaces, and the return type
|
||||
// can be several tokens, such as "void *" or "const char *"
|
||||
int b = str.length();
|
||||
int a = b - 1;
|
||||
while (str[a] != '(')
|
||||
a--;
|
||||
while (str[--a] == ' ')
|
||||
;
|
||||
b = a;
|
||||
while (str[a] != ' ')
|
||||
a--;
|
||||
String name = str.substr(a+1,b - a);
|
||||
|
||||
//
|
||||
write(file,"#define "+name+" XGL_FUNCPTR("+name+")\n");
|
||||
}
|
||||
write(file,"#endif\n");
|
||||
}
|
||||
fclose(file);
|
||||
}
|
||||
|
||||
void outputFunctions(GroupList& groups, String name)
|
||||
{
|
||||
FILE* file = fopen(name.c_str(),"w");
|
||||
if (!file)
|
||||
Print("Could not open file " + name);
|
||||
|
||||
// Output the functions for each group
|
||||
for (GroupList::Iterator grp = groups.begin(); grp != groups.end(); grp++) {
|
||||
if (!grp->name)
|
||||
continue;
|
||||
if (grp->name == "GL_ARB_imaging")
|
||||
// Imaging is include as part of 1.4...
|
||||
write(file,"\n#if defined(GL_ARB_imaging) && !defined(GL_VERSION_1_4)\n");
|
||||
else
|
||||
write(file,"\n#ifdef " + grp->name + "\n");
|
||||
write(file,"GL_GROUP_BEGIN(" + grp->name + ")\n");
|
||||
for (Array<String>::Iterator itr = grp->functions.begin();
|
||||
itr != grp->functions.end(); itr++) {
|
||||
String& str = *itr;
|
||||
|
||||
// Parse function "return name (args)". Start at the back because
|
||||
// args is enclosed in (), the name has no spaces, and the return type
|
||||
// can be several tokens, such as "void *" or "const char *"
|
||||
int b = str.length();
|
||||
int a = b - 1;
|
||||
while (str[a] != '(')
|
||||
a--;
|
||||
String args = str.substr(a,b - a);
|
||||
|
||||
while (str[--a] == ' ')
|
||||
;
|
||||
b = a;
|
||||
while (str[a] != ' ')
|
||||
a--;
|
||||
String name = str.substr(a+1,b - a);
|
||||
|
||||
while (str[a] == ' ')
|
||||
a--;
|
||||
String rtype = str.substr(0,a+1);
|
||||
//
|
||||
write(file,"GL_FUNCTION("+name+","+rtype+","+args+")\n");
|
||||
}
|
||||
write(file,"GL_GROUP_END()\n#endif\n");
|
||||
}
|
||||
fclose(file);
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
Kernel::installDefaultPrint();
|
||||
|
||||
// Build a name -> order map for faster lookups.
|
||||
for (int i = 0; i < sizeof(OrderTable) / sizeof(const char*); i++)
|
||||
OutputOrder.insert(String(OrderTable[i]),i+1);
|
||||
|
||||
GroupList extensions;
|
||||
extensions.reserve(800);
|
||||
loadDir(extensions,"core","VERSION");
|
||||
loadDir(extensions,"extensions","*");
|
||||
outputHeader(extensions,"glext.h");
|
||||
outputFunctions(extensions,"glfnext.h");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -1,89 +0,0 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Copyright (c) 2012 GarageGames, LLC
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to
|
||||
// deal in the Software without restriction, including without limitation the
|
||||
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
// sell copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
// IN THE SOFTWARE.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#include "core/strings/stringFunctions.h"
|
||||
|
||||
#include "platform/platformDlibrary.h"
|
||||
#include "console/console.h"
|
||||
|
||||
namespace GL
|
||||
{
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Current active extensions
|
||||
struct GLExtensionPtrs;
|
||||
GLExtensionPtrs* _GGLptr;
|
||||
|
||||
struct GLExtensionFlags;
|
||||
GLExtensionFlags* _GGLflag;
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
static inline int versionCombine( int major, int minor )
|
||||
{
|
||||
return major * 100 + minor;
|
||||
}
|
||||
|
||||
bool bindFunction( DLibrary *dll, void *&fnAddress, const char *name )
|
||||
{
|
||||
fnAddress = dll->bind( name );
|
||||
|
||||
if (!fnAddress)
|
||||
Con::warnf( "GLExtensions: DLL bind failed for %s", name );
|
||||
|
||||
return fnAddress != 0;
|
||||
}
|
||||
|
||||
bool hasExtension( const char *name, const char *extensions )
|
||||
{
|
||||
// Extensions are compared against the extension strings
|
||||
if (extensions && *extensions) {
|
||||
const char* ptr = dStrstr(extensions,name);
|
||||
if (ptr) {
|
||||
char end = ptr[dStrlen(name)];
|
||||
if (end == ' ' || end == 0)
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool hasVersion( const char *name, const char* prefix, int major, int minor )
|
||||
{
|
||||
// Extension group names are compared against the version number. The prefix
|
||||
// string should be "GL_VERSION" or "GLX_VERSION".. group names are
|
||||
// "GL_VERSION_1_1", "GL_VERSION_1_2", "GLX_VERSION_1_2", etc.
|
||||
while (*name && *prefix && *name == *prefix)
|
||||
name++, prefix++;
|
||||
if (*name == '_' && *prefix == '\0') {
|
||||
int maj = dAtoi(++name);
|
||||
while (dIsdigit(*name))
|
||||
*name++;
|
||||
int min = dAtoi(++name);
|
||||
return versionCombine(maj,min) <= versionCombine(major,minor);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
} // Namespace
|
||||
|
||||
|
|
@ -1,117 +0,0 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Copyright (c) 2012 GarageGames, LLC
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to
|
||||
// deal in the Software without restriction, including without limitation the
|
||||
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
// sell copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
// IN THE SOFTWARE.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#ifndef GL_GGL_H
|
||||
#define GL_GGL_H
|
||||
|
||||
#ifndef _MPOINT3_H_
|
||||
#include "math/mPoint3.h"
|
||||
#endif
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Configuration file which defines which parts of GL to include
|
||||
|
||||
#ifndef DOXYGEN
|
||||
#include "gfx/gl/ggl/gglConfig.h"
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#if defined(__CYGWIN__) || defined(WIN32) || defined(_WIN32) || defined(__WIN32)
|
||||
#define XGL_DLL __stdcall
|
||||
#else
|
||||
#define XGL_DLL
|
||||
#endif
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Include core (OpenGL 1.1) definitions
|
||||
|
||||
#include "gfx/gl/ggl/generated/glc.h"
|
||||
#include "gfx/gl/ggl/generated/gle.h"
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// All core functionality is implemented as function pointers.
|
||||
|
||||
#define GL_GROUP_BEGIN(name)
|
||||
#define GL_FUNCTION(name, type, args) extern type (XGL_DLL *name) args;
|
||||
#define GL_GROUP_END()
|
||||
#include "gfx/gl/ggl/generated/glcfn.h"
|
||||
#undef GL_GROUP_BEGIN
|
||||
#undef GL_FUNCTION
|
||||
#undef GL_GROUP_END
|
||||
|
||||
/// OpenGL interface.
|
||||
namespace GL
|
||||
{
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Extensions use indirection in order to support multiple contexts
|
||||
|
||||
struct GLExtensionPtrs {
|
||||
bool bound;
|
||||
|
||||
// Include all OpenGL extensions for all platform
|
||||
#define GL_GROUP_BEGIN(name)
|
||||
#define GL_FUNCTION(name, type, args) type (XGL_DLL *_##name) args;
|
||||
#define GL_GROUP_END()
|
||||
#include "gfx/gl/ggl/generated/glefn.h"
|
||||
#undef GL_GROUP_BEGIN
|
||||
#undef GL_FUNCTION
|
||||
#undef GL_GROUP_END
|
||||
|
||||
GLExtensionPtrs() { bound = false; }
|
||||
};
|
||||
|
||||
struct GLExtensionFlags {
|
||||
bool bound;
|
||||
|
||||
// Define extension "has" variables
|
||||
#define GL_GROUP_BEGIN(name) bool has_##name;
|
||||
#define GL_FUNCTION(name, type, args)
|
||||
#define GL_GROUP_END()
|
||||
#include "gfx/gl/ggl/generated/glefn.h"
|
||||
#undef GL_GROUP_BEGIN
|
||||
#undef GL_FUNCTION
|
||||
#undef GL_GROUP_END
|
||||
|
||||
GLExtensionFlags() { bound = false; }
|
||||
};
|
||||
|
||||
// Extension loading has been reimplemented on each platform, and each platform
|
||||
// has a different version of GLExtensionPtrs and GLExtensionFlags. When binding
|
||||
// extensions for that platform, you MUST use these pointers. From there the XGL_FUNCPTR
|
||||
// define will handle converting a gl*EXT call into the proper member function call.
|
||||
extern GLExtensionPtrs* _GGLptr;
|
||||
#define XGL_FUNCPTR(name) (GL::_GGLptr->_##name)
|
||||
#endif // Doxygen
|
||||
|
||||
extern GLExtensionFlags* _GGLflag;
|
||||
#define gglHasExtension(name) (GL::_GGLflag->has_##name)
|
||||
|
||||
|
||||
|
||||
} // Namespace
|
||||
|
||||
#endif
|
||||
|
||||
|
|
@ -1,378 +0,0 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Copyright (c) 2012 GarageGames, LLC
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to
|
||||
// deal in the Software without restriction, including without limitation the
|
||||
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
// sell copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
// IN THE SOFTWARE.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Undefine extensions not required
|
||||
|
||||
#define GL_VERSION_1_2
|
||||
#define GL_VERSION_1_3
|
||||
#define GL_VERSION_1_4
|
||||
#define GL_VERSION_1_5
|
||||
#define GL_VERSION_2_0
|
||||
|
||||
#define GL_3DFX_multisample
|
||||
#define GL_3DFX_tbuffer
|
||||
#define GL_3DFX_texture_compression_FXT1
|
||||
|
||||
#define GL_APPLE_client_storage
|
||||
#define GL_APPLE_element_array
|
||||
#define GL_APPLE_fence
|
||||
#define GL_APPLE_specular_vector
|
||||
#define GL_APPLE_transform_hint
|
||||
#define GL_APPLE_vertex_array_object
|
||||
#define GL_APPLE_vertex_array_range
|
||||
#define GL_APPLE_ycbcr_422
|
||||
|
||||
#define GL_ARB_depth_texture
|
||||
#define GL_ARB_fragment_program
|
||||
#define GL_ARB_fragment_shader
|
||||
#define GL_ARB_imaging
|
||||
#define GL_ARB_matrix_palette
|
||||
#define GL_ARB_multisample
|
||||
#define GL_ARB_multitexture
|
||||
#define GL_ARB_occlusion_query
|
||||
#define GL_ARB_pixel_buffer_object
|
||||
#define GL_ARB_point_parameters
|
||||
#define GL_ARB_point_sprite
|
||||
#define GL_ARB_shader_objects
|
||||
#define GL_ARB_shading_language_100
|
||||
#define GL_ARB_shadow
|
||||
#define GL_ARB_shadow_ambient
|
||||
#define GL_ARB_texture_border_clamp
|
||||
#define GL_ARB_texture_compression
|
||||
#define GL_ARB_texture_cube_map
|
||||
#define GL_ARB_texture_env_add
|
||||
#define GL_ARB_texture_env_combine
|
||||
#define GL_ARB_texture_env_crossbar
|
||||
#define GL_ARB_texture_env_dot3
|
||||
#define GL_ARB_texture_mirrored_repeat
|
||||
#define GL_ARB_texture_non_power_of_two
|
||||
#define GL_ARB_texture_rectangle
|
||||
#define GL_ARB_transpose_matrix
|
||||
#define GL_ARB_vertex_blend
|
||||
#define GL_ARB_vertex_buffer_object
|
||||
#define GL_ARB_vertex_program
|
||||
#define GL_ARB_vertex_shader
|
||||
#define GL_ARB_window_pos
|
||||
|
||||
#define GL_ATIX_point_sprites
|
||||
#define GL_ATIX_texture_env_combine3
|
||||
#define GL_ATIX_texture_env_route
|
||||
#define GL_ATIX_vertex_shader_output_point_size
|
||||
|
||||
#define GL_ATI_draw_buffers
|
||||
#define GL_ATI_element_array
|
||||
#define GL_ATI_envmap_bumpmap
|
||||
#define GL_ATI_fragment_shader
|
||||
#define GL_ATI_map_object_buffer
|
||||
#define GL_ATI_pn_triangles
|
||||
#define GL_ATI_separate_stencil
|
||||
#define GL_ATI_text_fragment_shader
|
||||
#define GL_ATI_texture_env_combine3
|
||||
#define GL_ATI_texture_float
|
||||
#define GL_ATI_texture_mirror_once
|
||||
#define GL_ATI_vertex_array_object
|
||||
#define GL_ATI_vertex_attrib_array_object
|
||||
#define GL_ATI_vertex_streams
|
||||
|
||||
#define GL_EXT_422_pixels
|
||||
#define GL_EXT_Cg_shader
|
||||
#define GL_EXT_abgr
|
||||
#define GL_EXT_bgra
|
||||
#define GL_EXT_blend_color
|
||||
#define GL_EXT_blend_equation_separate
|
||||
#define GL_EXT_blend_func_separate
|
||||
#define GL_EXT_blend_logic_op
|
||||
#define GL_EXT_blend_minmax
|
||||
#define GL_EXT_blend_subtract
|
||||
#define GL_EXT_clip_volume_hint
|
||||
#define GL_EXT_cmyka
|
||||
#define GL_EXT_color_subtable
|
||||
#define GL_EXT_compiled_vertex_array
|
||||
#define GL_EXT_convolution
|
||||
#define GL_EXT_coordinate_frame
|
||||
#define GL_EXT_copy_texture
|
||||
#define GL_EXT_cull_vertex
|
||||
#define GL_EXT_depth_bounds_test
|
||||
#define GL_EXT_draw_range_elements
|
||||
#define GL_EXT_fog_coord
|
||||
#define GL_EXT_fragment_lighting
|
||||
#define GL_EXT_framebuffer_blit
|
||||
#define GL_EXT_framebuffer_object
|
||||
#define GL_EXT_histogram
|
||||
#define GL_EXT_index_array_formats
|
||||
#define GL_EXT_index_func
|
||||
#define GL_EXT_index_material
|
||||
#define GL_EXT_index_texture
|
||||
#define GL_EXT_light_texture
|
||||
#define GL_EXT_misc_attribute
|
||||
#define GL_EXT_multi_draw_arrays
|
||||
#define GL_EXT_multisample
|
||||
#define GL_EXT_packed_pixels
|
||||
#define GL_EXT_paletted_texture
|
||||
#define GL_EXT_pixel_buffer_object
|
||||
#define GL_EXT_pixel_transform
|
||||
#define GL_EXT_pixel_transform_color_table
|
||||
#define GL_EXT_point_parameters
|
||||
#define GL_EXT_polygon_offset
|
||||
#define GL_EXT_rescale_normal
|
||||
#define GL_EXT_scene_marker
|
||||
#define GL_EXT_secondary_color
|
||||
#define GL_EXT_separate_specular_color
|
||||
#define GL_EXT_shadow_funcs
|
||||
#define GL_EXT_shared_texture_palette
|
||||
#define GL_EXT_stencil_two_side
|
||||
#define GL_EXT_stencil_wrap
|
||||
#define GL_EXT_subtexture
|
||||
#define GL_EXT_texture
|
||||
#define GL_EXT_texture3D
|
||||
#define GL_EXT_texture_compression_dxt1
|
||||
#define GL_EXT_texture_compression_s3tc
|
||||
#define GL_EXT_texture_cube_map
|
||||
#define GL_EXT_texture_edge_clamp
|
||||
#define GL_EXT_texture_env
|
||||
#define GL_EXT_texture_env_add
|
||||
#define GL_EXT_texture_env_combine
|
||||
#define GL_EXT_texture_env_dot3
|
||||
#define GL_EXT_texture_filter_anisotropic
|
||||
#define GL_EXT_texture_lod_bias
|
||||
#define GL_EXT_texture_mirror_clamp
|
||||
#define GL_EXT_texture_object
|
||||
#define GL_EXT_texture_perturb_normal
|
||||
#define GL_EXT_texture_rectangle
|
||||
#define GL_EXT_vertex_array
|
||||
#define GL_EXT_vertex_shader
|
||||
#define GL_EXT_vertex_weighting
|
||||
#define GL_GREMEDY_string_marker
|
||||
|
||||
#define GL_HP_convolution_border_modes
|
||||
#define GL_HP_image_transform
|
||||
#define GL_HP_occlusion_test
|
||||
#define GL_HP_texture_lighting
|
||||
|
||||
#define GL_IBM_cull_vertex
|
||||
#define GL_IBM_multimode_draw_arrays
|
||||
#define GL_IBM_rasterpos_clip
|
||||
#define GL_IBM_static_data
|
||||
#define GL_IBM_texture_mirrored_repeat
|
||||
#define GL_IBM_vertex_array_lists
|
||||
|
||||
#define GL_INGR_color_clamp
|
||||
#define GL_INGR_interlace_read
|
||||
|
||||
#define GL_INTEL_parallel_arrays
|
||||
#define GL_INTEL_texture_scissor
|
||||
|
||||
#define GL_KTX_buffer_region
|
||||
|
||||
#define GL_MESA_pack_invert
|
||||
#define GL_MESA_resize_buffers
|
||||
#define GL_MESA_window_pos
|
||||
#define GL_MESA_ycbcr_texture
|
||||
|
||||
#define GL_NV_blend_square
|
||||
#define GL_NV_copy_depth_to_color
|
||||
#define GL_NV_depth_clamp
|
||||
#define GL_NV_evaluators
|
||||
#define GL_NV_fence
|
||||
#define GL_NV_float_buffer
|
||||
#define GL_NV_fog_distance
|
||||
#define GL_NV_fragment_program
|
||||
#define GL_NV_fragment_program2
|
||||
#define GL_NV_fragment_program_option
|
||||
#define GL_NV_half_float
|
||||
#define GL_NV_light_max_exponent
|
||||
#define GL_NV_multisample_filter_hint
|
||||
#define GL_NV_occlusion_query
|
||||
#define GL_NV_packed_depth_stencil
|
||||
#define GL_NV_pixel_data_range
|
||||
#define GL_NV_point_sprite
|
||||
#define GL_NV_primitive_restart
|
||||
#define GL_NV_register_combiners
|
||||
#define GL_NV_register_combiners2
|
||||
#define GL_NV_texgen_emboss
|
||||
#define GL_NV_texgen_reflection
|
||||
#define GL_NV_texture_compression_vtc
|
||||
#define GL_NV_texture_env_combine4
|
||||
#define GL_NV_texture_expand_normal
|
||||
#define GL_NV_texture_rectangle
|
||||
#define GL_NV_texture_shader
|
||||
#define GL_NV_texture_shader2
|
||||
#define GL_NV_texture_shader3
|
||||
#define GL_NV_vertex_array_range
|
||||
#define GL_NV_vertex_array_range2
|
||||
#define GL_NV_vertex_program
|
||||
#define GL_NV_vertex_program1_1
|
||||
#define GL_NV_vertex_program2
|
||||
#define GL_NV_vertex_program2_option
|
||||
#define GL_NV_vertex_program3
|
||||
|
||||
#define GL_OML_interlace
|
||||
#define GL_OML_resample
|
||||
#define GL_OML_subsample
|
||||
|
||||
#define GL_PGI_misc_hints
|
||||
#define GL_PGI_vertex_hints
|
||||
|
||||
#define GL_REND_screen_coordinates
|
||||
|
||||
#define GL_S3_s3tc
|
||||
|
||||
#define GL_SGIS_color_range
|
||||
#define GL_SGIS_detail_texture
|
||||
#define GL_SGIS_fog_function
|
||||
#define GL_SGIS_generate_mipmap
|
||||
#define GL_SGIS_multisample
|
||||
#define GL_SGIS_pixel_texture
|
||||
#define GL_SGIS_sharpen_texture
|
||||
#define GL_SGIS_texture4D
|
||||
#define GL_SGIS_texture_border_clamp
|
||||
#define GL_SGIS_texture_edge_clamp
|
||||
#define GL_SGIS_texture_filter4
|
||||
#define GL_SGIS_texture_lod
|
||||
#define GL_SGIS_texture_select
|
||||
|
||||
#define GL_SGIX_async
|
||||
#define GL_SGIX_async_histogram
|
||||
#define GL_SGIX_async_pixel
|
||||
#define GL_SGIX_blend_alpha_minmax
|
||||
#define GL_SGIX_clipmap
|
||||
#define GL_SGIX_depth_texture
|
||||
#define GL_SGIX_flush_raster
|
||||
#define GL_SGIX_fog_offset
|
||||
#define GL_SGIX_fog_texture
|
||||
#define GL_SGIX_fragment_specular_lighting
|
||||
#define GL_SGIX_framezoom
|
||||
#define GL_SGIX_interlace
|
||||
#define GL_SGIX_ir_instrument1
|
||||
#define GL_SGIX_list_priority
|
||||
#define GL_SGIX_pixel_texture
|
||||
#define GL_SGIX_pixel_texture_bits
|
||||
#define GL_SGIX_reference_plane
|
||||
#define GL_SGIX_resample
|
||||
#define GL_SGIX_shadow
|
||||
#define GL_SGIX_shadow_ambient
|
||||
#define GL_SGIX_sprite
|
||||
#define GL_SGIX_tag_sample_buffer
|
||||
#define GL_SGIX_texture_add_env
|
||||
#define GL_SGIX_texture_coordinate_clamp
|
||||
#define GL_SGIX_texture_lod_bias
|
||||
#define GL_SGIX_texture_multi_buffer
|
||||
#define GL_SGIX_texture_range
|
||||
#define GL_SGIX_texture_scale_bias
|
||||
#define GL_SGIX_vertex_preclip
|
||||
#define GL_SGIX_vertex_preclip_hint
|
||||
#define GL_SGIX_ycrcb
|
||||
|
||||
#define GL_SGI_color_matrix
|
||||
#define GL_SGI_color_table
|
||||
#define GL_SGI_texture_color_table
|
||||
|
||||
#define GL_SUNX_constant_data
|
||||
|
||||
#define GL_SUN_convolution_border_modes
|
||||
#define GL_SUN_global_alpha
|
||||
#define GL_SUN_mesh_array
|
||||
#define GL_SUN_slice_accum
|
||||
#define GL_SUN_triangle_list
|
||||
#define GL_SUN_vertex
|
||||
|
||||
#define GL_WIN_phong_shading
|
||||
#define GL_WIN_specular_fog
|
||||
#define GL_WIN_swap_hint
|
||||
|
||||
#define GLU_EXT_nurbs_tessellator
|
||||
#define GLU_EXT_object_space_tess
|
||||
#define GLU_SGI_filter4_parameters
|
||||
|
||||
#define GLX_VERSION_1_1
|
||||
#define GLX_VERSION_1_2
|
||||
#define GLX_VERSION_1_3
|
||||
#define GLX_VERSION_1_4
|
||||
#define GLX_3DFX_multisample
|
||||
#define GLX_ARB_fbconfig_float
|
||||
#define GLX_ARB_get_proc_address
|
||||
#define GLX_ARB_multisample
|
||||
#define GLX_ATI_pixel_format_float
|
||||
#define GLX_ATI_render_texture
|
||||
#define GLX_EXT_import_context
|
||||
#define GLX_EXT_scene_marker
|
||||
#define GLX_EXT_visual_info
|
||||
#define GLX_EXT_visual_rating
|
||||
#define GLX_MESA_agp_offset
|
||||
#define GLX_MESA_copy_sub_buffer
|
||||
#define GLX_MESA_pixmap_colormap
|
||||
#define GLX_MESA_release_buffers
|
||||
#define GLX_MESA_set_3dfx_mode
|
||||
#define GLX_NV_float_buffer
|
||||
#define GLX_NV_vertex_array_range
|
||||
#define GLX_OML_swap_method
|
||||
#define GLX_OML_sync_control
|
||||
#define GLX_SGIS_blended_overlay
|
||||
#define GLX_SGIS_color_range
|
||||
#define GLX_SGIS_multisample
|
||||
#define GLX_SGIS_shared_multisample
|
||||
#define GLX_SGIX_fbconfig
|
||||
#define GLX_SGIX_pbuffer
|
||||
#define GLX_SGIX_swap_barrier
|
||||
#define GLX_SGIX_swap_group
|
||||
#define GLX_SGIX_video_resize
|
||||
#define GLX_SGIX_visual_select_group
|
||||
#define GLX_SGI_cushion
|
||||
#define GLX_SGI_make_current_read
|
||||
#define GLX_SGI_swap_control
|
||||
#define GLX_SGI_video_sync
|
||||
#define GLX_SUN_get_transparent_index
|
||||
#define GLX_SUN_video_resize
|
||||
|
||||
#define WGL_3DFX_multisample
|
||||
#define WGL_ARB_buffer_region
|
||||
#define WGL_ARB_extensions_string
|
||||
#define WGL_ARB_make_current_read
|
||||
#define WGL_ARB_multisample
|
||||
#define WGL_ARB_pbuffer
|
||||
#define WGL_ARB_pixel_format
|
||||
#define WGL_ARB_pixel_format_float
|
||||
#define WGL_ARB_render_texture
|
||||
#define WGL_ATI_pixel_format_float
|
||||
#define WGL_ATI_render_texture_rectangle
|
||||
#define WGL_EXT_depth_float
|
||||
#define WGL_EXT_display_color_table
|
||||
#define WGL_EXT_extensions_string
|
||||
#define WGL_EXT_make_current_read
|
||||
#define WGL_EXT_multisample
|
||||
#define WGL_EXT_pbuffer
|
||||
#define WGL_EXT_pixel_format
|
||||
#define WGL_EXT_swap_control
|
||||
#define WGL_I3D_digital_video_control
|
||||
#define WGL_I3D_gamma
|
||||
#define WGL_I3D_genlock
|
||||
#define WGL_I3D_image_buffer
|
||||
#define WGL_I3D_swap_frame_lock
|
||||
#define WGL_I3D_swap_frame_usage
|
||||
#define WGL_NV_float_buffer
|
||||
#define WGL_NV_render_depth_texture
|
||||
#define WGL_NV_render_texture_rectangle
|
||||
#define WGL_NV_vertex_array_range
|
||||
#define WGL_OML_sync_control
|
||||
|
||||
|
||||
|
|
@ -1,110 +0,0 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Copyright (c) 2012 GarageGames, LLC
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to
|
||||
// deal in the Software without restriction, including without limitation the
|
||||
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
// sell copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
// IN THE SOFTWARE.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
/*
|
||||
** The contents of this file are subject to the GLX Public License Version 1.0
|
||||
** (the "License"). You may not use this file except in compliance with the
|
||||
** License. You may obtain a copy of the License at Silicon Graphics, Inc.,
|
||||
** attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA 94043
|
||||
** or at http://www.sgi.com/software/opensource/glx/license.html.
|
||||
**
|
||||
** Software distributed under the License is distributed on an "AS IS"
|
||||
** basis. ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY
|
||||
** IMPLIED WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR
|
||||
** PURPOSE OR OF NON- INFRINGEMENT. See the License for the specific
|
||||
** language governing rights and limitations under the License.
|
||||
**
|
||||
** The Original Software is GLX version 1.2 source code, released February,
|
||||
** 1999. The developer of the Original Software is Silicon Graphics, Inc.
|
||||
** Those portions of the Subject Software created by Silicon Graphics, Inc.
|
||||
** are Copyright (c) 1991-9 Silicon Graphics, Inc. All Rights Reserved.
|
||||
*/
|
||||
|
||||
#ifndef GFX_GLX_H
|
||||
#define GFX_GLX_H
|
||||
|
||||
#ifndef GFX_GGL_H
|
||||
#include "../ggl.h"
|
||||
#endif
|
||||
|
||||
#include "platform/tmm_off.h"
|
||||
|
||||
// AGL includes the standard gl defs, which we already provide in ggl.h
|
||||
// Defining __gl_h_ here prevents osx's gl defs from being included.
|
||||
#define __gl_h_
|
||||
#include <Agl/agl.h>
|
||||
|
||||
#include "platform/tmm_on.h"
|
||||
|
||||
namespace GL
|
||||
{
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
#ifndef DOXYGEN
|
||||
|
||||
#define GLX_VERSION_1_0 1
|
||||
|
||||
#define GLX_USE_GL 1
|
||||
#define GLX_BUFFER_SIZE 2
|
||||
#define GLX_LEVEL 3
|
||||
#define GLX_RGBA 4
|
||||
#define GLX_DOUBLEBUFFER 5
|
||||
#define GLX_STEREO 6
|
||||
#define GLX_AUX_BUFFERS 7
|
||||
#define GLX_RED_SIZE 8
|
||||
#define GLX_GREEN_SIZE 9
|
||||
#define GLX_BLUE_SIZE 10
|
||||
#define GLX_ALPHA_SIZE 11
|
||||
#define GLX_DEPTH_SIZE 12
|
||||
#define GLX_STENCIL_SIZE 13
|
||||
#define GLX_ACCUM_RED_SIZE 14
|
||||
#define GLX_ACCUM_GREEN_SIZE 15
|
||||
#define GLX_ACCUM_BLUE_SIZE 16
|
||||
#define GLX_ACCUM_ALPHA_SIZE 17
|
||||
#define GLX_BAD_SCREEN 1
|
||||
#define GLX_BAD_ATTRIBUTE 2
|
||||
#define GLX_NO_EXTENSION 3
|
||||
#define GLX_BAD_VISUAL 4
|
||||
#define GLX_BAD_CONTEXT 5
|
||||
#define GLX_BAD_VALUE 6
|
||||
#define GLX_BAD_ENUM 7
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Extensions use indirection in order to support multiple contexts
|
||||
|
||||
struct AGLExtensionPtrs: public GLExtensionPtrs {
|
||||
};
|
||||
|
||||
struct AGLExtensionFlags: public GLExtensionFlags {
|
||||
};
|
||||
|
||||
#endif // Doxygen
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#undef XGL_FUNCPTR
|
||||
#define XGL_FUNCPTR(name) (((AGLExtensionPtrs*)GL::_GGLptr)->_##name)
|
||||
|
||||
} // Namespace
|
||||
#endif
|
||||
|
||||
|
|
@ -1,195 +0,0 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Copyright (c) 2012 GarageGames, LLC
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to
|
||||
// deal in the Software without restriction, including without limitation the
|
||||
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
// sell copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
// IN THE SOFTWARE.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#include <err.h>
|
||||
#include "agl.h"
|
||||
|
||||
#include "platform/platform.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Instantiation of function pointers.
|
||||
|
||||
#define GL_GROUP_BEGIN(name)
|
||||
#define GL_FUNCTION(name, type, args) type (XGL_DLL *name) args;
|
||||
#define GL_GROUP_END()
|
||||
#include "../generated/glcfn.h"
|
||||
#undef GL_GROUP_BEGIN
|
||||
#undef GL_FUNCTION
|
||||
#undef GL_GROUP_END
|
||||
|
||||
|
||||
#define EXECUTE_ONLY_ONCE() \
|
||||
static bool _doneOnce = false; \
|
||||
if(_doneOnce) return; \
|
||||
_doneOnce = true;
|
||||
|
||||
namespace GL
|
||||
{
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// The OpenGL Bundle is shared by all the devices.
|
||||
static CFBundleRef _openglFrameworkRef;
|
||||
|
||||
// Unlike WGL, AGL does not require a set of function pointers per
|
||||
// context pixel format. All functions in the DLL are bound in a single
|
||||
// table and shared by all contexts.
|
||||
static AGLExtensionPtrs _LibraryFunctions;
|
||||
static AGLExtensionFlags _ExtensionFlags;
|
||||
|
||||
bool hasExtension(const char *name,const char* extensions);
|
||||
bool hasVersion(const char *name,const char* prefix,int major,int minor);
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
void* MacGetProcAddress(CFBundleRef bundle,char* name)
|
||||
{
|
||||
CFStringRef cfName = CFStringCreateWithCString(kCFAllocatorDefault, name, CFStringGetSystemEncoding());
|
||||
void* ret = CFBundleGetFunctionPointerForName(bundle, cfName);
|
||||
CFRelease(cfName);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
bool bindFunction(CFBundleRef bundle,void *&fnAddress, const char *name)
|
||||
{
|
||||
CFStringRef cfName = CFStringCreateWithCString(0,name,CFStringGetSystemEncoding());
|
||||
fnAddress = CFBundleGetFunctionPointerForName(bundle, cfName);
|
||||
CFRelease(cfName);
|
||||
return fnAddress != 0;
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
bool gglBindCoreFunctions(CFBundleRef bundle,AGLExtensionPtrs* glp)
|
||||
{
|
||||
bool bound = true;
|
||||
|
||||
// Bind static functions which are quarenteed to be part of the
|
||||
// OpenGL library. In this case, OpenGL 1.0 and GLX 1.0 functions
|
||||
#define GL_GROUP_BEGIN(name)
|
||||
#define GL_GROUP_END()
|
||||
#define GL_FUNCTION(fn_name, fn_return, fn_args) \
|
||||
bound &= bindFunction(bundle,*(void**)&fn_name, #fn_name);
|
||||
#include "../generated/glcfn.h"
|
||||
#undef GL_FUNCTION
|
||||
#undef GL_GROUP_BEGIN
|
||||
#undef GL_GROUP_END
|
||||
|
||||
// Try and bind all known extension functions. We'll check later to
|
||||
// see which ones are actually valid for a context.
|
||||
#define GL_GROUP_BEGIN(name)
|
||||
#define GL_FUNCTION(fn_name, fn_return, fn_args) \
|
||||
bindFunction(bundle,*(void**)&glp->_##fn_name, #fn_name);
|
||||
#define GL_GROUP_END()
|
||||
#include "../generated/glefn.h"
|
||||
#undef GL_FUNCTION
|
||||
#undef GL_GROUP_BEGIN
|
||||
#undef GL_GROUP_END
|
||||
|
||||
return bound;
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
bool gglBindExtensions(GLExtensionFlags* gl)
|
||||
{
|
||||
dMemset(gl,0,sizeof(GLExtensionFlags));
|
||||
|
||||
// Get GL version and extensions
|
||||
const char* glExtensions = (const char*)glGetString(GL_EXTENSIONS);
|
||||
const char* glVersion = (const char*) glGetString(GL_VERSION);
|
||||
if (!glExtensions || !glVersion)
|
||||
return false;
|
||||
|
||||
// Parse the GL version string "major.minor"
|
||||
const char *itr = glVersion;
|
||||
int glMajor = atoi(itr);
|
||||
while (isdigit(*itr))
|
||||
*itr++;
|
||||
int glMinor = atoi(++itr);
|
||||
|
||||
// Check which extensions are available on the active context.
|
||||
// GL and GLX versions ubove 1.0 are also tested here.
|
||||
#define GL_GROUP_BEGIN(name) \
|
||||
gl->has_##name = hasVersion(#name,"GL_VERSION",glMajor,glMinor) || \
|
||||
hasExtension(#name,glExtensions);
|
||||
#define GL_FUNCTION(fn_name, fn_return, fn_args)
|
||||
#define GL_GROUP_END()
|
||||
#include "../generated/glefn.h"
|
||||
#undef GL_FUNCTION
|
||||
#undef GL_GROUP_BEGIN
|
||||
#undef GL_GROUP_END
|
||||
|
||||
gl->bound = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
#define _hasGLXExtension(display,name) (display->glx.has_##name)
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
void gglPerformBinds()
|
||||
{
|
||||
// Some of the following code is copied from the Apple Opengl Documentation.
|
||||
|
||||
// Load and bind OpenGL bundle functions
|
||||
if (!_openglFrameworkRef) {
|
||||
|
||||
// Load OpenGL.framework
|
||||
_openglFrameworkRef = CFBundleGetBundleWithIdentifier(CFSTR("com.apple.opengl"));
|
||||
if (!_openglFrameworkRef) {
|
||||
warn("Could not create OpenGL Framework bundle");
|
||||
return;
|
||||
}
|
||||
if (!CFBundleLoadExecutable(_openglFrameworkRef)) {
|
||||
warn("Could not load MachO executable");
|
||||
return;
|
||||
}
|
||||
|
||||
// Bind our functions.
|
||||
if (!gglBindCoreFunctions(_openglFrameworkRef, &_LibraryFunctions)) {
|
||||
warn("GLDevice: Failed to bind all core functions");
|
||||
return;
|
||||
}
|
||||
|
||||
// Save the pointer to the set of opengl functions
|
||||
_GGLptr = &_LibraryFunctions;
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
void gglPerformExtensionBinds(void *context)
|
||||
{
|
||||
// we don't care about the passed context when binding the opengl functions,
|
||||
// we only care about the current opengl context.
|
||||
if( !_openglFrameworkRef || !_GGLptr )
|
||||
{
|
||||
gglPerformBinds();
|
||||
}
|
||||
gglBindExtensions( &_ExtensionFlags );
|
||||
_GGLflag = &_ExtensionFlags;
|
||||
}
|
||||
|
||||
|
||||
|
||||
} // Namespace
|
||||
|
||||
|
|
@ -1,102 +0,0 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Copyright (c) 2012 GarageGames, LLC
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to
|
||||
// deal in the Software without restriction, including without limitation the
|
||||
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
// sell copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
// IN THE SOFTWARE.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#ifndef GFX_WGL_H
|
||||
#define GFX_WGL_H
|
||||
|
||||
#ifndef GFX_GGL_H
|
||||
#include "../ggl.h"
|
||||
#endif
|
||||
#ifndef _PLATFORMDLIBRARY_H
|
||||
#include "platform/platformDlibrary.h"
|
||||
#endif
|
||||
|
||||
#ifndef _WIN32_WINNT
|
||||
#define _WIN32_WINNT 0x0500
|
||||
#endif
|
||||
#include <windows.h>
|
||||
|
||||
|
||||
namespace GL
|
||||
{
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Include WGL 1.0 definitions
|
||||
|
||||
#ifndef DOXYGEN
|
||||
#include "../generated/wgle.h"
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// All core functionality is implemented as function pointers.
|
||||
|
||||
#define GL_GROUP_BEGIN(name)
|
||||
#define GL_FUNCTION(name, type, args) extern type (XGL_DLL *name) args;
|
||||
#define GL_GROUP_END()
|
||||
#include "../generated/wglfn.h"
|
||||
#undef GL_GROUP_BEGIN
|
||||
#undef GL_FUNCTION
|
||||
#undef GL_GROUP_END
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Extensions use indirection in order to support multiple contexts
|
||||
|
||||
struct WGLExtensionPtrs: public GLExtensionPtrs {
|
||||
// Include all OpenGL extensions for all platform
|
||||
#define GL_GROUP_BEGIN(name)
|
||||
#define GL_FUNCTION(name, type, args) type (XGL_DLL *_##name) args;
|
||||
#define GL_GROUP_END()
|
||||
#include "../generated/wglefn.h"
|
||||
#undef GL_GROUP_BEGIN
|
||||
#undef GL_FUNCTION
|
||||
#undef GL_GROUP_END
|
||||
};
|
||||
|
||||
struct WGLExtensionFlags: public GLExtensionFlags {
|
||||
// Define extension "has" variables
|
||||
#define GL_GROUP_BEGIN(name) bool has_##name;
|
||||
#define GL_FUNCTION(name, type, args)
|
||||
#define GL_GROUP_END()
|
||||
#include "../generated/wglefn.h"
|
||||
#undef GL_GROUP_BEGIN
|
||||
#undef GL_FUNCTION
|
||||
#undef GL_GROUP_END
|
||||
};
|
||||
#endif // Doyxygen
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
bool gglBindExtensions(DLibrary*,WGLExtensionPtrs*,WGLExtensionFlags*,HDC);
|
||||
|
||||
#undef XGL_FUNCPTR
|
||||
#define XGL_FUNCPTR(name) (((GL::WGLExtensionPtrs*)GL::_GGLptr)->_##name)
|
||||
|
||||
#undef gglHasExtension
|
||||
#define gglHasExtension(name) (((GL::WGLExtensionFlags*)GL::_GGLflag)->has_##name)
|
||||
|
||||
|
||||
} // Namespace
|
||||
|
||||
#endif
|
||||
|
||||
|
|
@ -1,173 +0,0 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Copyright (c) 2012 GarageGames, LLC
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to
|
||||
// deal in the Software without restriction, including without limitation the
|
||||
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
// sell copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
// IN THE SOFTWARE.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#include "wgl.h"
|
||||
|
||||
#include "core/strings/stringFunctions.h"
|
||||
|
||||
#include "console/console.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Instantiation of GL function pointers in global namespace.
|
||||
|
||||
#define GL_GROUP_BEGIN(name)
|
||||
#define GL_FUNCTION(name, type, args) type (__stdcall *name) args;
|
||||
#define GL_GROUP_END()
|
||||
#include "../generated/glcfn.h"
|
||||
#undef GL_GROUP_BEGIN
|
||||
#undef GL_FUNCTION
|
||||
#undef GL_GROUP_END
|
||||
|
||||
|
||||
namespace GL
|
||||
{
|
||||
|
||||
bool bindFunction(DLibrary* dll,void *&fnAddress, const char *name);
|
||||
bool hasExtension(const char *name,const char* extensions);
|
||||
bool hasVersion(const char *name,const char* prefix,int major,int minor);
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Instantiation of WGL function pointers. These are in the GL namespace to
|
||||
// avoid problems with definitions in windows.h
|
||||
|
||||
#define GL_GROUP_BEGIN(name)
|
||||
#define GL_FUNCTION(name, type, args) type (__stdcall *name) args;
|
||||
#define GL_GROUP_END()
|
||||
#include "../generated/wglfn.h"
|
||||
#undef GL_GROUP_BEGIN
|
||||
#undef GL_FUNCTION
|
||||
#undef GL_GROUP_END
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
static bool bindExtension(void *&fnAddress, const char *name)
|
||||
{
|
||||
fnAddress = (void*)wglGetProcAddress(name);
|
||||
if (!fnAddress)
|
||||
Con::printf("GLExtensions: Extension bind failed for %s",name);
|
||||
|
||||
return fnAddress != 0;
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
bool gglBindCoreFunctions(DLibrary* dll)
|
||||
{
|
||||
bool bound = true;
|
||||
|
||||
// Bind static functions which are quarenteed to be part of the
|
||||
// OpenGL library. In this case, OpenGL 1.0 and WGL functions
|
||||
#define GL_GROUP_BEGIN(name)
|
||||
#define GL_GROUP_END()
|
||||
#define GL_FUNCTION(fn_name, fn_return, fn_args) \
|
||||
bound &= bindFunction(dll, *(void**)&fn_name, #fn_name);
|
||||
#include "../generated/glcfn.h"
|
||||
#include "../generated/wglfn.h"
|
||||
#undef GL_FUNCTION
|
||||
#undef GL_GROUP_BEGIN
|
||||
#undef GL_GROUP_END
|
||||
|
||||
return bound;
|
||||
}
|
||||
|
||||
bool gglBindExtensions(DLibrary* dll,WGLExtensionPtrs* glp,WGLExtensionFlags* glf,HDC hDC)
|
||||
{
|
||||
dMemset(glp,0,sizeof(WGLExtensionPtrs));
|
||||
dMemset(glf,0,sizeof(WGLExtensionFlags));
|
||||
|
||||
// Get WGL extensions, there is no version
|
||||
const char* wgl = 0;
|
||||
if (bindExtension(*(void**)&glp->_wglGetExtensionsStringARB,"wglGetExtensionsStringARB"))
|
||||
wgl = glp->_wglGetExtensionsStringARB(hDC);
|
||||
else
|
||||
if (bindExtension(*(void**)&glp->_wglGetExtensionsStringEXT,"wglGetExtensionsStringEXT"))
|
||||
wgl = glp->_wglGetExtensionsStringEXT();
|
||||
|
||||
// Get OpenGL version and extensions
|
||||
const char* glExtensions = (const char*)glGetString(GL_EXTENSIONS);
|
||||
const char* glVersion = (const char*) glGetString(GL_VERSION);
|
||||
if (!glExtensions || !glVersion)
|
||||
return false;
|
||||
|
||||
// Parse the version string major.minor
|
||||
const char *itr = glVersion;
|
||||
int glMajor = dAtoi(itr);
|
||||
while (dIsdigit(*itr))
|
||||
*itr++;
|
||||
int glMinor = dAtoi(++itr);
|
||||
|
||||
// Test for, and bind, all known extensions. GL and GLX versions ubove 1.0
|
||||
// are also treated as extensions and bound here.
|
||||
#define GL_GROUP_BEGIN(name) \
|
||||
if (hasVersion(#name,"GL_VERSION",glMajor,glMinor) || \
|
||||
hasExtension(#name,glExtensions) || \
|
||||
hasExtension(#name,wgl)) \
|
||||
{ \
|
||||
glf->has_##name = true;
|
||||
#define GL_FUNCTION(fn_name, fn_return, fn_args) \
|
||||
bindExtension(*(void**)&glp->_##fn_name, #fn_name);
|
||||
#define GL_GROUP_END() \
|
||||
}
|
||||
#include "../generated/glefn.h"
|
||||
#include "../generated/wglefn.h"
|
||||
#undef GL_FUNCTION
|
||||
#undef GL_GROUP_BEGIN
|
||||
#undef GL_GROUP_END
|
||||
|
||||
glf->bound = glp->bound = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
static DLibraryRef _hGL = NULL;
|
||||
|
||||
void gglPerformBinds()
|
||||
{
|
||||
if(!_hGL)
|
||||
{
|
||||
_hGL = OsLoadLibrary("opengl32.dll");
|
||||
gglBindCoreFunctions(_hGL);
|
||||
}
|
||||
}
|
||||
|
||||
void gglPerformExtensionBinds(void *context)
|
||||
{
|
||||
if(!_hGL)
|
||||
{
|
||||
_hGL = OsLoadLibrary("opengl32.dll");
|
||||
}
|
||||
if(!_GGLptr)
|
||||
{
|
||||
static WGLExtensionPtrs ptrs;
|
||||
static WGLExtensionFlags flags;
|
||||
|
||||
_GGLptr = &ptrs;
|
||||
_GGLflag = &flags;
|
||||
}
|
||||
|
||||
gglBindExtensions(_hGL, (WGLExtensionPtrs*)_GGLptr, (WGLExtensionFlags*)_GGLflag, (HDC)context);
|
||||
}
|
||||
|
||||
} // Namespace
|
||||
|
||||
|
|
@ -1,413 +0,0 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Copyright (c) 2012 GarageGames, LLC
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to
|
||||
// deal in the Software without restriction, including without limitation the
|
||||
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
// sell copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
// IN THE SOFTWARE.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#include "os/osDlibrary.h"
|
||||
#include "os/osLog.h"
|
||||
#include "util/utilArray.h"
|
||||
|
||||
#include "glx.h"
|
||||
|
||||
namespace GL
|
||||
{
|
||||
using namespace Torque;
|
||||
using namespace GL;
|
||||
|
||||
extern bool gglBindCoreFunctions(DLibrary* dll,GLXExtensionPtrs*);
|
||||
void gglBindGLX(::Display* display,int screen,GLXExtensionFlags* glx);
|
||||
bool gglBindExtensions(GLExtensionFlags* gl);
|
||||
|
||||
struct GGLContext;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// The OpenGL DLL is shared by all the devices.
|
||||
static DLibraryRef _hGL;
|
||||
|
||||
// Unlike WGL, GLX does not require a set of function pointers per
|
||||
// context pixel format. All functions in the DLL are bound in a single
|
||||
// table and shared by all contexts.
|
||||
static GLXExtensionPtrs _LibraryFunctions;
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
struct GGLDisplay: public _GLDisplay
|
||||
{
|
||||
::Display* display;
|
||||
int screen;
|
||||
GLXExtensionFlags glx; // GLX extension flags
|
||||
Array<GGLContext*> contextList;
|
||||
};
|
||||
|
||||
#define _hasGLXExtension(display,name) (display->glx.has_##name)
|
||||
|
||||
GLDisplay gglCreateDisplay(::Display* display,int screen)
|
||||
{
|
||||
// Load and bind DLL functions
|
||||
if (!_hGL) {
|
||||
static LogCategory log("/Gfx/Device/GL");
|
||||
_hGL = LoadLibrary("libGL.so");
|
||||
if (!_hGL) {
|
||||
log.print("GLDevice: OpenGL dll failed to load");
|
||||
return false;
|
||||
}
|
||||
if (!gglBindCoreFunctions(_hGL.ptr(),&_LibraryFunctions)) {
|
||||
log.print("GLDevice: Failed to bind all core functions");
|
||||
return false;
|
||||
}
|
||||
_GGLptr = &_LibraryFunctions;
|
||||
log.print("OpenGL library loaded");
|
||||
}
|
||||
|
||||
//
|
||||
GGLDisplay* dp = new GGLDisplay;
|
||||
dp->display = display;
|
||||
dp->screen = screen;
|
||||
gglBindGLX(display,screen,&dp->glx);
|
||||
return dp;
|
||||
}
|
||||
|
||||
void gglDeleteDisplay(GLDisplay dp)
|
||||
{
|
||||
GGLDisplay* display = (GGLDisplay*)dp;
|
||||
Assert(!display->contextList.size(),"gglDeleteDisplay: Not all context destroyed");
|
||||
delete display;
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
struct GGLFormat: public _GLFormat {
|
||||
GLFormatInfo mode;
|
||||
U32 pformat;
|
||||
};
|
||||
|
||||
static bool _getFBConfig(GGLDisplay* display,U32 pformat,GLXFBConfig& config)
|
||||
{
|
||||
// Get config info from format ID
|
||||
int attributes[] = { GLX_FBCONFIG_ID, pformat, None };
|
||||
int count = 0;
|
||||
GLXFBConfig* configList = glXChooseFBConfig(display->display,
|
||||
display->screen,attributes,&count);
|
||||
if (!count)
|
||||
return false;
|
||||
config = *configList;
|
||||
XFree(configList);
|
||||
return true;
|
||||
}
|
||||
|
||||
GLFormat gglSelectFormat(GLDisplay dp,GLFormatInfo& mode)
|
||||
{
|
||||
GGLDisplay* display = (GGLDisplay*)dp;
|
||||
U32 pformat;
|
||||
|
||||
if (!_hasGLXExtension(display,GLX_VERSION_1_3)) {
|
||||
// Find GL compatible X visual using 1.2 interface.
|
||||
// 1.2 or earlier does not include pbuffer support.
|
||||
if (mode.target != GLFormatInfo::Window)
|
||||
return 0;
|
||||
|
||||
int attributes[] = {
|
||||
GLX_RGBA,
|
||||
GLX_RED_SIZE, mode.red,
|
||||
GLX_BLUE_SIZE, mode.blue,
|
||||
GLX_GREEN_SIZE, mode.green,
|
||||
GLX_DEPTH_SIZE, mode.z,
|
||||
GLX_ALPHA_SIZE, mode.alpha,
|
||||
GLX_STENCIL_SIZE, mode.stencil,
|
||||
GLX_DOUBLEBUFFER, true,
|
||||
GLX_DOUBLEBUFFER,
|
||||
None
|
||||
};
|
||||
XVisualInfo* visual = glXChooseVisual(display->display, display->screen, attributes);
|
||||
if (!visual) {
|
||||
static LogCategory log("/Gfx/Device/GL");
|
||||
log.print("GGLContext: Could not get an accelerated visual");
|
||||
return 0;
|
||||
}
|
||||
pformat = visual->visualid;
|
||||
XFree(visual);
|
||||
}
|
||||
else {
|
||||
// Find GL compatible X visual using 1.3 interface.
|
||||
int attributes[] = {
|
||||
GLX_DRAWABLE_TYPE, (mode.target == GLFormatInfo::Buffer)?
|
||||
GLX_PBUFFER_BIT: GLX_WINDOW_BIT,
|
||||
GLX_RENDER_TYPE, GLX_RGBA_BIT,
|
||||
GLX_RED_SIZE, mode.red,
|
||||
GLX_BLUE_SIZE, mode.blue,
|
||||
GLX_GREEN_SIZE, mode.green,
|
||||
GLX_DEPTH_SIZE, mode.z,
|
||||
GLX_ALPHA_SIZE, mode.alpha,
|
||||
GLX_STENCIL_SIZE, mode.stencil,
|
||||
GLX_DOUBLEBUFFER, true,
|
||||
None
|
||||
};
|
||||
int count = 0;
|
||||
GLXFBConfig* configList = glXChooseFBConfig(display->display,
|
||||
display->screen,attributes,&count);
|
||||
if (!count)
|
||||
return 0;
|
||||
|
||||
// Return the config ID
|
||||
int xid;
|
||||
glXGetFBConfigAttrib(display->display,configList[0],GLX_FBCONFIG_ID,&xid);
|
||||
XFree(configList);
|
||||
pformat = xid;
|
||||
}
|
||||
|
||||
if (pformat) {
|
||||
GGLFormat* format = new GGLFormat;
|
||||
format->pformat = pformat;
|
||||
format->mode = mode;
|
||||
return format;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool gglFormatInfo(GLDisplay display,GLFormat pformat,GLFormatInfo& mode)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool gglAreCompatible(GLFormat,GLFormat)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
void gglDeleteFormat(GLFormat fp)
|
||||
{
|
||||
GGLFormat* format = (GGLFormat*)fp;
|
||||
delete format;
|
||||
}
|
||||
|
||||
XVisualInfo* gglGetFormatVisual(GLDisplay dp,GLFormat fp)
|
||||
{
|
||||
GGLDisplay* display = (GGLDisplay*)dp;
|
||||
GGLFormat* format = (GGLFormat*)fp;
|
||||
|
||||
if (!_hasGLXExtension(display,GLX_VERSION_1_3)) {
|
||||
// Format is a visual id
|
||||
int count;
|
||||
XVisualInfo match;
|
||||
match.visualid = format->pformat;
|
||||
return XGetVisualInfo(display->display,VisualIDMask,&match,&count);
|
||||
}
|
||||
else {
|
||||
// Format is an FBConfig id
|
||||
GLXFBConfig config;
|
||||
if (!_getFBConfig(display,format->pformat,config))
|
||||
return 0;
|
||||
return glXGetVisualFromFBConfig(display->display,config);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
struct GGLSurface: public _GLSurface {
|
||||
enum Type {
|
||||
Window, PBuffer,
|
||||
} type;
|
||||
GGLDisplay* display;
|
||||
GLXDrawable drawable; // Used with GLX 1.3 interface
|
||||
::Window window; // Used with GLX 1.2 interface
|
||||
};
|
||||
|
||||
GLSurface gglCreateSurface(GLDisplay dp,::Window hwin,GLFormat fp)
|
||||
{
|
||||
GGLDisplay* display = (GGLDisplay*)dp;
|
||||
GGLFormat* format = (GGLFormat*)fp;
|
||||
GGLSurface* surface = 0;
|
||||
|
||||
if (!_hasGLXExtension(display,GLX_VERSION_1_3)) {
|
||||
// Return our own GGL surface rep.
|
||||
surface = new GGLSurface;
|
||||
surface->type = GGLSurface::Window;
|
||||
surface->display = display;
|
||||
surface->drawable = 0;
|
||||
surface->window = hwin;
|
||||
}
|
||||
else {
|
||||
// Get config info from format ID
|
||||
GLXFBConfig config;
|
||||
if (!_getFBConfig(display,format->pformat,config))
|
||||
return 0;
|
||||
|
||||
// Create GLX window
|
||||
GLXWindow window = glXCreateWindow(display->display,config,hwin,0);
|
||||
if (!window) {
|
||||
GLenum error = glGetError();
|
||||
static LogCategory log("/Gfx/Device/GL");
|
||||
log.print(format("Create window error: %d",error));
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Return our own GGL surface rep.
|
||||
surface = new GGLSurface;
|
||||
surface->type = GGLSurface::Window;
|
||||
surface->display = display;
|
||||
surface->drawable = window;
|
||||
surface->window = 0;
|
||||
}
|
||||
return surface;
|
||||
}
|
||||
|
||||
bool gglGetSurfaceSize(GLSurface sp,Vector2I& size)
|
||||
{
|
||||
GGLSurface* surface = (GGLSurface*)sp;
|
||||
if (surface->type != GGLSurface::Window)
|
||||
return false;
|
||||
if (!_hasGLXExtension(surface->display,GLX_VERSION_1_3)) {
|
||||
size.x = 300; size.y = 300;
|
||||
}
|
||||
else {
|
||||
glXQueryDrawable(surface->display->display,surface->drawable,
|
||||
GLX_WIDTH,(U32*)&size.x);
|
||||
glXQueryDrawable(surface->display->display,surface->drawable,
|
||||
GLX_HEIGHT,(U32*)&size.y);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void gglDeleteSurface(GLSurface sp)
|
||||
{
|
||||
GGLSurface* surface = (GGLSurface*)sp;
|
||||
if (surface->type = GGLSurface::Window) {
|
||||
glXDestroyWindow(surface->display->display,surface->drawable);
|
||||
delete surface;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
struct GGLContext: public _GLContext
|
||||
{
|
||||
GGLDisplay* display;
|
||||
GLXContext context;
|
||||
GLExtensionFlags glf; // GL has extension flags
|
||||
};
|
||||
|
||||
GLContext gglCreateContext(GLDisplay dp,GLFormat fp)
|
||||
{
|
||||
GGLDisplay* display = (GGLDisplay*)dp;
|
||||
GGLFormat* format = (GGLFormat*)fp;
|
||||
GGLContext* context = 0;
|
||||
|
||||
GLXContext ctx,share = display->contextList.size()?
|
||||
display->contextList[0]->context: 0;
|
||||
|
||||
if (!_hasGLXExtension(display,GLX_VERSION_1_3)) {
|
||||
// Get visual from format id.
|
||||
int count;
|
||||
XVisualInfo match;
|
||||
match.visualid = format->pformat;
|
||||
XVisualInfo* visual = XGetVisualInfo(display->display,VisualIDMask,&match,&count);
|
||||
|
||||
ctx = glXCreateContext(display->display,visual,share,true);
|
||||
XFree(visual);
|
||||
}
|
||||
else {
|
||||
// Get FBConfig from format id
|
||||
GLXFBConfig config;
|
||||
if (!_getFBConfig(display,format->pformat,config))
|
||||
return 0;
|
||||
|
||||
// Need to share contexts...
|
||||
ctx = glXCreateNewContext(display->display,config,
|
||||
GLX_RGBA_TYPE,share,true);
|
||||
}
|
||||
|
||||
if (ctx) {
|
||||
context = new GGLContext;
|
||||
context->context = ctx;
|
||||
context->display = display;
|
||||
display->contextList.pushBack(context);
|
||||
return context;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
void gglDeleteContext(GLContext ctx)
|
||||
{
|
||||
GGLContext* context = (GGLContext*)ctx;
|
||||
glXDestroyContext(context->display->display,context->context);
|
||||
erase(context->display->contextList,context);
|
||||
delete context;
|
||||
}
|
||||
|
||||
bool gglMakeCurrent(GLSurface sp,GLContext ctx)
|
||||
{
|
||||
GGLSurface* surface = (GGLSurface*)sp;
|
||||
GGLContext* context = (GGLContext*)ctx;
|
||||
if (!_hasGLXExtension(surface->display,GLX_VERSION_1_3)) {
|
||||
if (!glXMakeCurrent(surface->display->display,
|
||||
surface->window,context->context))
|
||||
return false;
|
||||
}
|
||||
else
|
||||
if (!glXMakeContextCurrent(surface->display->display,
|
||||
surface->drawable,surface->drawable,context->context))
|
||||
return false;
|
||||
|
||||
// The first time a context is made current we need to
|
||||
// check which extensions are valid.
|
||||
if (!context->glf.bound)
|
||||
gglBindExtensions(&context->glf);
|
||||
_GGLflag = &context->glf;
|
||||
return true;
|
||||
}
|
||||
|
||||
void gglSwapBuffers(GLSurface sp)
|
||||
{
|
||||
GGLSurface* surface = (GGLSurface*)sp;
|
||||
if (!_hasGLXExtension(surface->display,GLX_VERSION_1_3))
|
||||
glXSwapBuffers(surface->display->display,surface->window);
|
||||
else
|
||||
glXSwapBuffers(surface->display->display,surface->drawable);
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
GLSurface gglCreatePBufferSurface(GLDisplay display,U32 width,U32 height,bool cubeMap,GLFormat pformat)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool gglBindPBufferSurface(GLSurface sp,U32 target)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool gglReleasePBufferSurface(GLSurface sp,U32 target)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool gglSetPbufferTarget(GLSurface sp,U32 mip,U32 face)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
} // Namespace
|
||||
|
||||
|
|
@ -1,141 +0,0 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Copyright (c) 2012 GarageGames, LLC
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to
|
||||
// deal in the Software without restriction, including without limitation the
|
||||
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
// sell copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
// IN THE SOFTWARE.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
/*
|
||||
** The contents of this file are subject to the GLX Public License Version 1.0
|
||||
** (the "License"). You may not use this file except in compliance with the
|
||||
** License. You may obtain a copy of the License at Silicon Graphics, Inc.,
|
||||
** attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA 94043
|
||||
** or at http://www.sgi.com/software/opensource/glx/license.html.
|
||||
**
|
||||
** Software distributed under the License is distributed on an "AS IS"
|
||||
** basis. ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY
|
||||
** IMPLIED WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR
|
||||
** PURPOSE OR OF NON- INFRINGEMENT. See the License for the specific
|
||||
** language governing rights and limitations under the License.
|
||||
**
|
||||
** The Original Software is GLX version 1.2 source code, released February,
|
||||
** 1999. The developer of the Original Software is Silicon Graphics, Inc.
|
||||
** Those portions of the Subject Software created by Silicon Graphics, Inc.
|
||||
** are Copyright (c) 1991-9 Silicon Graphics, Inc. All Rights Reserved.
|
||||
*/
|
||||
|
||||
#ifndef GFX_GLX_H
|
||||
#define GFX_GLX_H
|
||||
|
||||
#ifndef GFX_GGL_H
|
||||
#include "../ggl.h"
|
||||
#endif
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xutil.h>
|
||||
|
||||
namespace GL
|
||||
{
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
#ifndef DOXYGEN
|
||||
|
||||
#define GLX_VERSION_1_0 1
|
||||
|
||||
#define GLX_USE_GL 1
|
||||
#define GLX_BUFFER_SIZE 2
|
||||
#define GLX_LEVEL 3
|
||||
#define GLX_RGBA 4
|
||||
#define GLX_DOUBLEBUFFER 5
|
||||
#define GLX_STEREO 6
|
||||
#define GLX_AUX_BUFFERS 7
|
||||
#define GLX_RED_SIZE 8
|
||||
#define GLX_GREEN_SIZE 9
|
||||
#define GLX_BLUE_SIZE 10
|
||||
#define GLX_ALPHA_SIZE 11
|
||||
#define GLX_DEPTH_SIZE 12
|
||||
#define GLX_STENCIL_SIZE 13
|
||||
#define GLX_ACCUM_RED_SIZE 14
|
||||
#define GLX_ACCUM_GREEN_SIZE 15
|
||||
#define GLX_ACCUM_BLUE_SIZE 16
|
||||
#define GLX_ACCUM_ALPHA_SIZE 17
|
||||
#define GLX_BAD_SCREEN 1
|
||||
#define GLX_BAD_ATTRIBUTE 2
|
||||
#define GLX_NO_EXTENSION 3
|
||||
#define GLX_BAD_VISUAL 4
|
||||
#define GLX_BAD_CONTEXT 5
|
||||
#define GLX_BAD_VALUE 6
|
||||
#define GLX_BAD_ENUM 7
|
||||
|
||||
typedef XID GLXDrawable;
|
||||
typedef XID GLXPixmap;
|
||||
typedef struct __GLXcontextRec *GLXContext;
|
||||
|
||||
#include "../generated/glxe.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// All core functionality is implemented as function pointers.
|
||||
|
||||
#define GL_GROUP_BEGIN(name)
|
||||
#define GL_FUNCTION(name, type, args) extern type (XGL_DLL *name) args;
|
||||
#define GL_GROUP_END()
|
||||
#include "../generated/glxfn.h"
|
||||
#undef GL_GROUP_BEGIN
|
||||
#undef GL_FUNCTION
|
||||
#undef GL_GROUP_END
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Extensions use indirection in order to support multiple contexts
|
||||
|
||||
struct GLXExtensionPtrs: public GLExtensionPtrs {
|
||||
// Include all GLX extentions in global function table
|
||||
#define GL_GROUP_BEGIN(name)
|
||||
#define GL_FUNCTION(name, type, args) type (XGL_DLL *_##name) args;
|
||||
#define GL_GROUP_END()
|
||||
#include "../generated/glxefn.h"
|
||||
#undef GL_GROUP_BEGIN
|
||||
#undef GL_FUNCTION
|
||||
#undef GL_GROUP_END
|
||||
};
|
||||
|
||||
struct GLXExtensionFlags {
|
||||
// Define extension "has" variables
|
||||
#define GL_GROUP_BEGIN(name) bool has_##name;
|
||||
#define GL_FUNCTION(name, type, args)
|
||||
#define GL_GROUP_END()
|
||||
#include "../generated/glxefn.h"
|
||||
#undef GL_GROUP_BEGIN
|
||||
#undef GL_FUNCTION
|
||||
#undef GL_GROUP_END
|
||||
};
|
||||
|
||||
#endif // Doxygen
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
GLDisplay gglCreateDisplay(::Display*,int screen);
|
||||
GLSurface gglCreateSurface(GLDisplay,Window,GLFormat);
|
||||
XVisualInfo* gglGetFormatVisual(GLDisplay dp,GLFormat format);
|
||||
|
||||
#undef XGL_FUNCPTR
|
||||
#define XGL_FUNCPTR(name) (((GLXExtensionPtrs*)GL::_GGLptr)->_##name)
|
||||
|
||||
} // Namespace
|
||||
#endif
|
||||
|
||||
|
|
@ -1,176 +0,0 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Copyright (c) 2012 GarageGames, LLC
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to
|
||||
// deal in the Software without restriction, including without limitation the
|
||||
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
// sell copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
// IN THE SOFTWARE.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#include "glx.h"
|
||||
|
||||
#include "util/utilAssert.h"
|
||||
#include "util/utilStr.h"
|
||||
#include "util/utilString.h"
|
||||
#include "util/utilMemory.h"
|
||||
#include "os/osLog.h"
|
||||
#include "os/osDlibrary.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Instantiation of GL function pointers in global namespace.
|
||||
|
||||
#define GL_GROUP_BEGIN(name)
|
||||
#define GL_FUNCTION(name, type, args) type (XGL_DLL *name) args;
|
||||
#define GL_GROUP_END()
|
||||
#include "../generated/glcfn.h"
|
||||
#undef GL_GROUP_BEGIN
|
||||
#undef GL_FUNCTION
|
||||
#undef GL_GROUP_END
|
||||
|
||||
|
||||
namespace GL
|
||||
{
|
||||
using namespace Torque;
|
||||
|
||||
bool bindFunction(DLibrary* dll,void *&fnAddress, const char *name);
|
||||
bool hasExtension(const char *name,const char* extensions);
|
||||
bool hasVersion(const char *name,const char* prefix,int major,int minor);
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Instantiation of GLX function pointers.
|
||||
|
||||
#define GL_GROUP_BEGIN(name)
|
||||
#define GL_FUNCTION(name, type, args) type (XGL_DLL *name) args;
|
||||
#define GL_GROUP_END()
|
||||
#include "../generated/glxfn.h"
|
||||
#undef GL_GROUP_BEGIN
|
||||
#undef GL_FUNCTION
|
||||
#undef GL_GROUP_END
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
bool bindFunction(DLibrary* dll,GLFunction (*gproc)(const GLubyte*),
|
||||
void *&fnAddress, const char *name)
|
||||
{
|
||||
// Use the getProcAddress if we have it.
|
||||
fnAddress = gproc? (void*)(*gproc)((const GLubyte*)name): dll->bind(name);
|
||||
return fnAddress != 0;
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
bool gglBindCoreFunctions(DLibrary* dll,GLXExtensionPtrs* glp)
|
||||
{
|
||||
bool bound = true;
|
||||
|
||||
// Bind static functions which are quarenteed to be part of the
|
||||
// OpenGL library. In this case, OpenGL 1.0 and GLX 1.0 functions
|
||||
#define GL_GROUP_BEGIN(name)
|
||||
#define GL_GROUP_END()
|
||||
#define GL_FUNCTION(fn_name, fn_return, fn_args) \
|
||||
bound &= bindFunction(dll,*(void**)&fn_name, #fn_name);
|
||||
#include "../generated/glcfn.h"
|
||||
#include "../generated/glxfn.h"
|
||||
#undef GL_FUNCTION
|
||||
#undef GL_GROUP_BEGIN
|
||||
#undef GL_GROUP_END
|
||||
|
||||
// Check for the getProcAddress first, otherwise we'll expect everything
|
||||
// to be in the DLL.
|
||||
memset(glp,0,sizeof(GLXExtensionPtrs));
|
||||
glp->_glXGetProcAddressARB = (GLFunction (*)(const GLubyte*))dll->bind("glXGetProcAddressARB");
|
||||
|
||||
// Try and bind all known extension functions. We'll check later to
|
||||
// see which ones are actually valid for a context.
|
||||
#define GL_GROUP_BEGIN(name)
|
||||
#define GL_FUNCTION(fn_name, fn_return, fn_args) \
|
||||
bindFunction(dll,glp->_glXGetProcAddressARB,*(void**)&glp->_##fn_name, #fn_name);
|
||||
#define GL_GROUP_END()
|
||||
#include "../generated/glefn.h"
|
||||
#include "../generated/glxefn.h"
|
||||
#undef GL_FUNCTION
|
||||
#undef GL_GROUP_BEGIN
|
||||
#undef GL_GROUP_END
|
||||
|
||||
return bound;
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
void gglBindGLX(::Display* display,int screen,GLXExtensionFlags* glx)
|
||||
{
|
||||
// Check GLX version and glx extensions
|
||||
int glxMajor,glxMinor;
|
||||
glXQueryVersion(display,&glxMajor,&glxMinor);
|
||||
const char* glxExtensions = glXQueryExtensionsString(display,screen);
|
||||
|
||||
static LogCategory log("/Gfx/Device/GL");
|
||||
log.print(format("GLX Version: %d.%d",glxMajor,glxMinor));
|
||||
Assert(glxMajor == 1 && glxMinor >= 1,"GLXBind: Need GLX version 1.1 or greater");
|
||||
|
||||
#define GL_GROUP_BEGIN(name) \
|
||||
glx->has_##name = hasVersion(#name,"GLX_VERSION",glxMajor,glxMinor) || \
|
||||
hasExtension(#name,glxExtensions);
|
||||
#define GL_FUNCTION(fn_name, fn_return, fn_args)
|
||||
#define GL_GROUP_END()
|
||||
#include "../generated/glxefn.h"
|
||||
#undef GL_FUNCTION
|
||||
#undef GL_GROUP_BEGIN
|
||||
#undef GL_GROUP_END
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
bool gglBindExtensions(GLExtensionFlags* gl)
|
||||
{
|
||||
memset(gl,0,sizeof(GLExtensionFlags));
|
||||
|
||||
// Get GL version and extensions
|
||||
const char* glExtensions = (const char*)glGetString(GL_EXTENSIONS);
|
||||
const char* glVersion = (const char*) glGetString(GL_VERSION);
|
||||
if (!glExtensions || !glVersion)
|
||||
return false;
|
||||
|
||||
// Parse the GL version string "major.minor"
|
||||
const char *itr = glVersion;
|
||||
int glMajor = atoi(itr);
|
||||
while (isDigit(*itr))
|
||||
*itr++;
|
||||
int glMinor = atoi(++itr);
|
||||
|
||||
// Check which extensions are available on the active context.
|
||||
// GL and GLX versions ubove 1.0 are also tested here.
|
||||
#define GL_GROUP_BEGIN(name) \
|
||||
gl->has_##name = hasVersion(#name,"GL_VERSION",glMajor,glMinor) || \
|
||||
hasExtension(#name,glExtensions);
|
||||
#define GL_FUNCTION(fn_name, fn_return, fn_args)
|
||||
#define GL_GROUP_END()
|
||||
#include "../generated/glefn.h"
|
||||
#undef GL_FUNCTION
|
||||
#undef GL_GROUP_BEGIN
|
||||
#undef GL_GROUP_END
|
||||
|
||||
gl->bound = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
} // Namespace
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue