source: trunk/nv/lib/gl.hh @ 167

Last change on this file since 167 was 167, checked in by epyon, 12 years ago
  • freetype2 - using new function loading method
  • gl - using new function loading method
File size: 16.4 KB
Line 
1// Copyright (C) 2012-2013 ChaosForge / Kornel Kisielewicz
2// http://chaosforge.org/
3//
4// This file is part of NV Libraries.
5// For conditions of distribution and use, see copyright notice in nv.hh
6
7#ifndef NV_LIB_GL_HH
8#define NV_LIB_GL_HH
9
10#include <nv/common.hh>
11#include <stddef.h>
12
13//#define NV_SDL_GL
14#define NV_GL_DYNAMIC
15//#define NV_GL_SHARED
16
17#if NV_PLATFORM == NV_WINDOWS
18#       define NV_GL_PATH "opengl32.dll"
19#elif NV_PLATFORM == NV_APPLE
20#       define NV_GL_PATH "/System/Library/Frameworks/OpenGL.framework/Libraries/libGL.dylib"
21#else
22#       define NV_GL_PATH "libGL.so"
23#endif
24
25#include <stdint.h>
26
27extern "C" {
28
29#if NV_PLATFORM == NV_WINDOWS
30#       define NV_GL_APIENTRY __stdcall
31#else
32#       define NV_GL_APIENTRY
33#endif
34
35#if defined(NV_GL_SHARED) && (NV_PLATFORM == NV_WINDOWS)
36#       define NV_GL_API __declspec(dllimport)
37#else
38#       define NV_GL_API extern
39#endif
40
41typedef unsigned int GLenum;
42typedef unsigned int GLbitfield;
43typedef unsigned int GLuint;
44typedef int GLint;
45typedef int GLsizei;
46typedef unsigned char GLboolean;
47typedef signed char GLbyte;
48typedef short GLshort;
49typedef unsigned char GLubyte;
50typedef unsigned short GLushort;
51typedef unsigned long GLulong;
52typedef float GLfloat;
53typedef float GLclampf;
54typedef double GLdouble;
55typedef double GLclampd;
56typedef void GLvoid;
57typedef char GLchar;
58typedef ptrdiff_t GLintptr;
59typedef ptrdiff_t GLsizeiptr;
60
61
62/* OpenGL 1.1 non-deprecated defines */
63#define GL_DEPTH_BUFFER_BIT 0x00000100
64#define GL_STENCIL_BUFFER_BIT 0x00000400
65#define GL_COLOR_BUFFER_BIT 0x00004000
66#define GL_ZERO 0
67#define GL_FALSE 0
68#define GL_TRUE 1
69#define GL_POINTS 0x0000
70#define GL_LINES 0x0001
71#define GL_LINE_LOOP 0x0002
72#define GL_LINE_STRIP 0x0003
73#define GL_TRIANGLES 0x0004
74#define GL_TRIANGLE_STRIP 0x0005
75#define GL_TRIANGLE_FAN 0x0006
76#define GL_NEVER 0x0200
77#define GL_LESS 0x0201
78#define GL_EQUAL 0x0202
79#define GL_LEQUAL 0x0203
80#define GL_GREATER 0x0204
81#define GL_NOTEQUAL 0x0205
82#define GL_GEQUAL 0x0206
83#define GL_ALWAYS 0x0207
84#define GL_ONE 1
85#define GL_SRC_COLOR 0x0300
86#define GL_ONE_MINUS_SRC_COLOR 0x0301
87#define GL_SRC_ALPHA 0x0302
88#define GL_ONE_MINUS_SRC_ALPHA 0x0303
89#define GL_DST_ALPHA 0x0304
90#define GL_ONE_MINUS_DST_ALPHA 0x0305
91#define GL_DST_COLOR 0x0306
92#define GL_ONE_MINUS_DST_COLOR 0x0307
93#define GL_SRC_ALPHA_SATURATE 0x0308
94#define GL_FRONT_LEFT 0x0400
95#define GL_FRONT_RIGHT 0x0401
96#define GL_BACK_LEFT 0x0402
97#define GL_BACK_RIGHT 0x0403
98#define GL_FRONT 0x0404
99#define GL_BACK 0x0405
100#define GL_LEFT 0x0406
101#define GL_RIGHT 0x0407
102#define GL_FRONT_AND_BACK 0x0408
103#define GL_INVALID_ENUM 0x0500
104#define GL_INVALID_VALUE 0x0501
105#define GL_INVALID_OPERATION 0x0502
106#define GL_OUT_OF_MEMORY 0x0505
107#define GL_CW 0x0900
108#define GL_CCW 0x0901
109#define GL_POINT_SIZE 0x0B11
110#define GL_POINT_SIZE_RANGE 0x0B12
111#define GL_POINT_SIZE_GRANULARITY 0x0B13
112#define GL_LINE_SMOOTH 0x0B20
113#define GL_LINE_WIDTH 0x0B21
114#define GL_LINE_WIDTH_RANGE 0x0B22
115#define GL_LINE_WIDTH_GRANULARITY 0x0B23
116#define GL_POLYGON_SMOOTH 0x0B41
117#define GL_CULL_FACE 0x0B44
118#define GL_CULL_FACE_MODE 0x0B45
119#define GL_FRONT_FACE 0x0B46
120#define GL_DEPTH_TEST 0x0B71
121#define GL_DEPTH_WRITEMASK 0x0B72
122#define GL_DEPTH_CLEAR_VALUE 0x0B73
123#define GL_DEPTH_FUNC 0x0B74
124#define GL_STENCIL_TEST 0x0B90
125#define GL_STENCIL_CLEAR_VALUE 0x0B91
126#define GL_STENCIL_FUNC 0x0B92
127#define GL_STENCIL_VALUE_MASK 0x0B93
128#define GL_STENCIL_FAIL 0x0B94
129#define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95
130#define GL_STENCIL_PASS_DEPTH_PASS 0x0B96
131#define GL_STENCIL_REF 0x0B97
132#define GL_STENCIL_WRITEMASK 0x0B98
133#define GL_DITHER 0x0BD0
134#define GL_BLEND_DST 0x0BE0
135#define GL_BLEND_SRC 0x0BE1
136#define GL_BLEND 0x0BE2
137#define GL_LOGIC_OP_MODE 0x0BF0
138#define GL_COLOR_LOGIC_OP 0x0BF2
139#define GL_DRAW_BUFFER 0x0C01
140#define GL_READ_BUFFER 0x0C02
141#define GL_SCISSOR_TEST 0x0C11
142#define GL_COLOR_CLEAR_VALUE 0x0C22
143#define GL_COLOR_WRITEMASK 0x0C23
144#define GL_DOUBLEBUFFER 0x0C32
145#define GL_STEREO 0x0C33
146#define GL_LINE_SMOOTH_HINT 0x0C52
147#define GL_POLYGON_SMOOTH_HINT 0x0C53
148#define GL_UNPACK_SWAP_BYTES 0x0CF0
149#define GL_UNPACK_LSB_FIRST 0x0CF1
150#define GL_UNPACK_ROW_LENGTH 0x0CF2
151#define GL_UNPACK_SKIP_ROWS 0x0CF3
152#define GL_UNPACK_SKIP_PIXELS 0x0CF4
153#define GL_UNPACK_ALIGNMENT 0x0CF5
154#define GL_PACK_SWAP_BYTES 0x0D00
155#define GL_PACK_LSB_FIRST 0x0D01
156#define GL_PACK_ROW_LENGTH 0x0D02
157#define GL_PACK_SKIP_ROWS 0x0D03
158#define GL_PACK_SKIP_PIXELS 0x0D04
159#define GL_PACK_ALIGNMENT 0x0D05
160#define GL_MAX_TEXTURE_SIZE 0x0D33
161#define GL_MAX_VIEWPORT_DIMS 0x0D3A
162#define GL_SUBPIXEL_BITS 0x0D50
163#define GL_TEXTURE_2D 0x0DE1
164#define GL_POLYGON_OFFSET_UNITS 0x2A00
165#define GL_POLYGON_OFFSET_POINT 0x2A01
166#define GL_POLYGON_OFFSET_LINE 0x2A02
167#define GL_POLYGON_OFFSET_FILL 0x8037
168#define GL_POLYGON_OFFSET_FACTOR 0x8038
169#define GL_TEXTURE_BINDING_1D 0x8068
170#define GL_TEXTURE_BINDING_2D 0x8069
171#define GL_TEXTURE_WIDTH 0x1000
172#define GL_TEXTURE_HEIGHT 0x1001
173#define GL_TEXTURE_INTERNAL_FORMAT 0x1003
174#define GL_TEXTURE_BORDER_COLOR 0x1004
175#define GL_TEXTURE_RED_SIZE 0x805C
176#define GL_TEXTURE_GREEN_SIZE 0x805D
177#define GL_TEXTURE_BLUE_SIZE 0x805E
178#define GL_TEXTURE_ALPHA_SIZE 0x805F
179#define GL_DONT_CARE 0x1100
180#define GL_FASTEST 0x1101
181#define GL_NICEST 0x1102
182#define GL_BYTE 0x1400
183#define GL_UNSIGNED_BYTE 0x1401
184#define GL_SHORT 0x1402
185#define GL_UNSIGNED_SHORT 0x1403
186#define GL_INT 0x1404
187#define GL_UNSIGNED_INT 0x1405
188#define GL_FLOAT 0x1406
189#define GL_CLEAR 0x1500
190#define GL_AND 0x1501
191#define GL_AND_REVERSE 0x1502
192#define GL_COPY 0x1503
193#define GL_AND_INVERTED 0x1504
194#define GL_NOOP 0x1505
195#define GL_XOR 0x1506
196#define GL_OR 0x1507
197#define GL_NOR 0x1508
198#define GL_EQUIV 0x1509
199#define GL_INVERT 0x150A
200#define GL_OR_REVERSE 0x150B
201#define GL_COPY_INVERTED 0x150C
202#define GL_OR_INVERTED 0x150D
203#define GL_NAND 0x150E
204#define GL_SET 0x150F
205#define GL_TEXTURE 0x1702
206#define GL_COLOR 0x1800
207#define GL_DEPTH 0x1801
208#define GL_STENCIL 0x1802
209#define GL_STENCIL_INDEX 0x1901
210#define GL_DEPTH_COMPONENT 0x1902
211#define GL_RED 0x1903
212#define GL_GREEN 0x1904
213#define GL_BLUE 0x1905
214#define GL_ALPHA 0x1906
215#define GL_RGB 0x1907
216#define GL_RGBA 0x1908
217#define GL_POINT 0x1B00
218#define GL_LINE 0x1B01
219#define GL_FILL 0x1B02
220#define GL_KEEP 0x1E00
221#define GL_REPLACE 0x1E01
222#define GL_INCR 0x1E02
223#define GL_DECR 0x1E03
224#define GL_VENDOR 0x1F00
225#define GL_RENDERER 0x1F01
226#define GL_VERSION 0x1F02
227#define GL_EXTENSIONS 0x1F03
228#define GL_NEAREST 0x2600
229#define GL_LINEAR 0x2601
230#define GL_NEAREST_MIPMAP_NEAREST 0x2700
231#define GL_LINEAR_MIPMAP_NEAREST 0x2701
232#define GL_NEAREST_MIPMAP_LINEAR 0x2702
233#define GL_LINEAR_MIPMAP_LINEAR 0x2703
234#define GL_TEXTURE_MAG_FILTER 0x2800
235#define GL_TEXTURE_MIN_FILTER 0x2801
236#define GL_TEXTURE_WRAP_S 0x2802
237#define GL_TEXTURE_WRAP_T 0x2803
238#define GL_PROXY_TEXTURE_1D 0x8063
239#define GL_PROXY_TEXTURE_2D 0x8064
240#define GL_REPEAT 0x2901
241#define GL_R3_G3_B2 0x2A10
242#define GL_RGB4 0x804F
243#define GL_RGB5 0x8050
244#define GL_RGB8 0x8051
245#define GL_RGB10 0x8052
246#define GL_RGB12 0x8053
247#define GL_RGB16 0x8054
248#define GL_RGBA2 0x8055
249#define GL_RGBA4 0x8056
250#define GL_RGB5_A1 0x8057
251#define GL_RGBA8 0x8058
252#define GL_RGB10_A2 0x8059
253#define GL_RGBA12 0x805A
254#define GL_RGBA16 0x805B
255
256/* OpenGL 1.2 non-deprecated defines */
257#define GL_UNSIGNED_BYTE_3_3_2 0x8032
258#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033
259#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034
260#define GL_UNSIGNED_INT_8_8_8_8 0x8035
261#define GL_UNSIGNED_INT_10_10_10_2 0x8036
262#define GL_TEXTURE_BINDING_3D 0x806A
263#define GL_PACK_SKIP_IMAGES 0x806B
264#define GL_PACK_IMAGE_HEIGHT 0x806C
265#define GL_UNPACK_SKIP_IMAGES 0x806D
266#define GL_UNPACK_IMAGE_HEIGHT 0x806E
267#define GL_PROXY_TEXTURE_3D 0x8070
268#define GL_TEXTURE_DEPTH 0x8071
269#define GL_TEXTURE_WRAP_R 0x8072
270#define GL_MAX_3D_TEXTURE_SIZE 0x8073
271#define GL_UNSIGNED_BYTE_2_3_3_REV 0x8362
272#define GL_UNSIGNED_SHORT_5_6_5 0x8363
273#define GL_UNSIGNED_SHORT_5_6_5_REV 0x8364
274#define GL_UNSIGNED_SHORT_4_4_4_4_REV 0x8365
275#define GL_UNSIGNED_SHORT_1_5_5_5_REV 0x8366
276#define GL_UNSIGNED_INT_8_8_8_8_REV 0x8367
277#define GL_BGR 0x80E0
278#define GL_MAX_ELEMENTS_VERTICES 0x80E8
279#define GL_MAX_ELEMENTS_INDICES 0x80E9
280#define GL_CLAMP_TO_EDGE 0x812F
281#define GL_TEXTURE_MIN_LOD 0x813A
282#define GL_TEXTURE_MAX_LOD 0x813B
283#define GL_TEXTURE_BASE_LEVEL 0x813C
284#define GL_TEXTURE_MAX_LEVEL 0x813D
285#define GL_SMOOTH_POINT_SIZE_RANGE 0x0B12
286#define GL_SMOOTH_POINT_SIZE_GRANULARITY 0x0B13
287#define GL_SMOOTH_LINE_WIDTH_RANGE 0x0B22
288#define GL_SMOOTH_LINE_WIDTH_GRANULARITY 0x0B23
289#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E
290#define GL_CONSTANT_COLOR 0x8001
291#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002
292#define GL_CONSTANT_ALPHA 0x8003
293#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004
294#define GL_FUNC_ADD 0x8006
295#define GL_MIN 0x8007
296#define GL_MAX 0x8008
297#define GL_FUNC_SUBTRACT 0x800A
298#define GL_FUNC_REVERSE_SUBTRACT 0x800B
299
300/* OpenGL 1.3 non-deprecated defines */
301#define GL_TEXTURE0 0x84C0
302#define GL_TEXTURE1 0x84C1
303#define GL_TEXTURE2 0x84C2
304#define GL_TEXTURE3 0x84C3
305#define GL_TEXTURE4 0x84C4
306#define GL_TEXTURE5 0x84C5
307#define GL_TEXTURE6 0x84C6
308#define GL_TEXTURE7 0x84C7
309#define GL_TEXTURE8 0x84C8
310#define GL_TEXTURE9 0x84C9
311#define GL_TEXTURE10 0x84CA
312#define GL_TEXTURE11 0x84CB
313#define GL_TEXTURE12 0x84CC
314#define GL_TEXTURE13 0x84CD
315#define GL_TEXTURE14 0x84CE
316#define GL_TEXTURE15 0x84CF
317#define GL_TEXTURE16 0x84D0
318#define GL_TEXTURE17 0x84D1
319#define GL_TEXTURE18 0x84D2
320#define GL_TEXTURE19 0x84D3
321#define GL_TEXTURE20 0x84D4
322#define GL_TEXTURE21 0x84D5
323#define GL_TEXTURE22 0x84D6
324#define GL_TEXTURE23 0x84D7
325#define GL_TEXTURE24 0x84D8
326#define GL_TEXTURE25 0x84D9
327#define GL_TEXTURE26 0x84DA
328#define GL_TEXTURE27 0x84DB
329#define GL_TEXTURE28 0x84DC
330#define GL_TEXTURE29 0x84DD
331#define GL_TEXTURE30 0x84DE
332#define GL_TEXTURE31 0x84DF
333#define GL_ACTIVE_TEXTURE 0x84E0
334#define GL_MULTISAMPLE 0x809D
335#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E
336#define GL_SAMPLE_ALPHA_TO_ONE 0x809F
337#define GL_SAMPLE_COVERAGE 0x80A0
338#define GL_SAMPLE_BUFFERS 0x80A8
339#define GL_SAMPLE_COVERAGE_VALUE 0x80AA
340#define GL_SAMPLE_COVERAGE_INVERT 0x80AB
341#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514
342#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515
343#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516
344#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517
345#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518
346#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519
347#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A
348#define GL_PROXY_TEXTURE_CUBE_MAP 0x851B
349#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C
350#define GL_COMPRESSED_RGB 0x84ED
351#define GL_COMPRESSED_RGBA 0x84EE
352#define GL_TEXTURE_COMPRESSION_HINT 0x84EF
353#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE 0x86A0
354#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2
355#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3
356#define GL_CLAMP_TO_BORDER 0x812D
357
358/* OpenGL 1.4 non-deprecated defines */
359// this one is actually deprecated, but the method glGenerateMipmap isn't available yet in 2.1
360#define GL_GENERATE_MIPMAP 0x8191
361#define GL_BLEND_DST_RGB 0x80C8
362#define GL_BLEND_SRC_RGB 0x80C9
363#define GL_BLEND_DST_ALPHA 0x80CA
364#define GL_BLEND_SRC_ALPHA 0x80CB
365#define GL_POINT_FADE_THRESHOLD_SIZE 0x8128
366#define GL_DEPTH_COMPONENT16 0x81A5
367#define GL_DEPTH_COMPONENT24 0x81A6
368#define GL_DEPTH_COMPONENT32 0x81A7
369#define GL_MIRRORED_REPEAT 0x8370
370#define GL_MAX_TEXTURE_LOD_BIAS 0x84FD
371#define GL_TEXTURE_LOD_BIAS 0x8501
372#define GL_INCR_WRAP 0x8507
373#define GL_DECR_WRAP 0x8508
374#define GL_TEXTURE_DEPTH_SIZE 0x884A
375#define GL_TEXTURE_COMPARE_MODE 0x884C
376#define GL_TEXTURE_COMPARE_FUNC 0x884D
377
378/* OpenGL 1.5 non-deprecated defines */
379#define GL_BUFFER_SIZE 0x8764
380#define GL_BUFFER_USAGE 0x8765
381#define GL_QUERY_COUNTER_BITS 0x8864
382#define GL_CURRENT_QUERY 0x8865
383#define GL_QUERY_RESULT 0x8866
384#define GL_QUERY_RESULT_AVAILABLE 0x8867
385#define GL_ARRAY_BUFFER 0x8892
386#define GL_ELEMENT_ARRAY_BUFFER 0x8893
387#define GL_ARRAY_BUFFER_BINDING 0x8894
388#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895
389#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F
390#define GL_READ_ONLY 0x88B8
391#define GL_BUFFER_ACCESS 0x88BB
392#define GL_BUFFER_MAPPED 0x88BC
393#define GL_BUFFER_MAP_POINTER 0x88BD
394#define GL_STREAM_DRAW 0x88E0
395#define GL_STREAM_READ 0x88E1
396#define GL_STREAM_COPY 0x88E2
397#define GL_STATIC_DRAW 0x88E4
398#define GL_STATIC_READ 0x88E5
399#define GL_STATIC_COPY 0x88E6
400#define GL_DYNAMIC_DRAW 0x88E8
401#define GL_DYNAMIC_READ 0x88E9
402#define GL_DYNAMIC_COPY 0x88EA
403#define GL_SAMPLES_PASSED 0x8914
404
405/* OpenGL 2.0 non-deprecated defines */
406#define GL_BLEND_EQUATION_RGB 0x8009
407#define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622
408#define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623
409#define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624
410#define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625
411#define GL_CURRENT_VERTEX_ATTRIB 0x8626
412#define GL_VERTEX_PROGRAM_POINT_SIZE 0x8642
413#define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645
414#define GL_STENCIL_BACK_FUNC 0x8800
415#define GL_STENCIL_BACK_FAIL 0x8801
416#define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802
417#define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803
418#define GL_MAX_DRAW_BUFFERS 0x8824
419#define GL_DRAW_BUFFER0 0x8825
420#define GL_DRAW_BUFFER1 0x8826
421#define GL_DRAW_BUFFER2 0x8827
422#define GL_DRAW_BUFFER3 0x8828
423#define GL_DRAW_BUFFER4 0x8829
424#define GL_DRAW_BUFFER5 0x882A
425#define GL_DRAW_BUFFER6 0x882B
426#define GL_DRAW_BUFFER7 0x882C
427#define GL_DRAW_BUFFER8 0x882D
428#define GL_DRAW_BUFFER9 0x882E
429#define GL_DRAW_BUFFER10 0x882F
430#define GL_DRAW_BUFFER11 0x8830
431#define GL_DRAW_BUFFER12 0x8831
432#define GL_DRAW_BUFFER13 0x8832
433#define GL_DRAW_BUFFER14 0x8833
434#define GL_DRAW_BUFFER15 0x8834
435#define GL_BLEND_EQUATION_ALPHA 0x883D
436#define GL_MAX_VERTEX_ATTRIBS 0x8869
437#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A
438#define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872
439#define GL_FRAGMENT_SHADER 0x8B30
440#define GL_VERTEX_SHADER 0x8B31
441#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS 0x8B49
442#define GL_MAX_VERTEX_UNIFORM_COMPONENTS 0x8B4A
443#define GL_MAX_VARYING_FLOATS 0x8B4B
444#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C
445#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D
446#define GL_SHADER_TYPE 0x8B4F
447#define GL_FLOAT_VEC2 0x8B50
448#define GL_FLOAT_VEC3 0x8B51
449#define GL_FLOAT_VEC4 0x8B52
450#define GL_INT_VEC2 0x8B53
451#define GL_INT_VEC3 0x8B54
452#define GL_INT_VEC4 0x8B55
453#define GL_BOOL 0x8B56
454#define GL_BOOL_VEC2 0x8B57
455#define GL_BOOL_VEC3 0x8B58
456#define GL_BOOL_VEC4 0x8B59
457#define GL_FLOAT_MAT2 0x8B5A
458#define GL_FLOAT_MAT3 0x8B5B
459#define GL_FLOAT_MAT4 0x8B5C
460#define GL_SAMPLER_1D 0x8B5D
461#define GL_SAMPLER_2D 0x8B5E
462#define GL_SAMPLER_3D 0x8B5F
463#define GL_SAMPLER_CUBE 0x8B60
464#define GL_SAMPLER_1D_SHADOW 0x8B61
465#define GL_SAMPLER_2D_SHADOW 0x8B62
466#define GL_DELETE_STATUS 0x8B80
467#define GL_COMPILE_STATUS 0x8B81
468#define GL_LINK_STATUS 0x8B82
469#define GL_VALIDATE_STATUS 0x8B83
470#define GL_INFO_LOG_LENGTH 0x8B84
471#define GL_ATTACHED_SHADERS 0x8B85
472#define GL_ACTIVE_UNIFORMS 0x8B86
473#define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87
474#define GL_SHADER_SOURCE_LENGTH 0x8B88
475#define GL_ACTIVE_ATTRIBUTES 0x8B89
476#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A
477#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT 0x8B8B
478#define GL_SHADING_LANGUAGE_VERSION 0x8B8C
479#define GL_CURRENT_PROGRAM 0x8B8D
480#define GL_POINT_SPRITE_COORD_ORIGIN 0x8CA0
481#define GL_LOWER_LEFT 0x8CA1
482#define GL_UPPER_LEFT 0x8CA2
483#define GL_STENCIL_BACK_REF 0x8CA3
484#define GL_STENCIL_BACK_VALUE_MASK 0x8CA4
485#define GL_STENCIL_BACK_WRITEMASK 0x8CA5
486
487/* OpenGL 2.1 non-deprecated defines */
488#define GL_PIXEL_PACK_BUFFER 0x88EB
489#define GL_PIXEL_UNPACK_BUFFER 0x88EC
490#define GL_PIXEL_PACK_BUFFER_BINDING 0x88ED
491#define GL_PIXEL_UNPACK_BUFFER_BINDING 0x88EF
492#define GL_FLOAT_MAT2x3 0x8B65
493#define GL_FLOAT_MAT2x4 0x8B66
494#define GL_FLOAT_MAT3x2 0x8B67
495#define GL_FLOAT_MAT3x4 0x8B68
496#define GL_FLOAT_MAT4x2 0x8B69
497#define GL_FLOAT_MAT4x3 0x8B6A
498#define GL_SRGB 0x8C40
499#define GL_SRGB8 0x8C41
500#define GL_SRGB_ALPHA 0x8C42
501#define GL_SRGB8_ALPHA8 0x8C43
502#define GL_COMPRESSED_SRGB 0x8C48
503#define GL_COMPRESSED_SRGB_ALPHA 0x8C49
504
505#if defined(NV_GL_DYNAMIC)
506#       define NV_GL_FUN( rtype, fname, fparams ) NV_GL_API rtype ( NV_GL_APIENTRY *fname) fparams
507#else
508#       define NV_GL_FUN( rtype, fname, fparams ) NV_GL_API rtype NV_GL_APIENTRY fname fparams
509#endif
510#define NV_GL_FUN_EXT NV_GL_FUN
511
512#include <nv/lib/detail/gl_functions.inc>
513
514#undef NV_GL_FUN_EXT
515#undef NV_GL_FUN
516
517}
518
519namespace nv {
520/* Dynamic load support */
521#       if defined( NV_GL_DYNAMIC )
522                bool load_gl_library( const char* path = NV_GL_PATH );
523#       else
524                inline bool load_gl_library( const char* path = "" ) { return true; }
525#       endif
526}
527
528#endif // NV_LIB_GL_HH
Note: See TracBrowser for help on using the repository browser.