aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llrender/llglheaders.h
diff options
context:
space:
mode:
authorJacek Antonelli2008-09-06 18:24:57 -0500
committerJacek Antonelli2008-09-06 18:25:07 -0500
commit798d367d54a6c6379ad355bd8345fa40e31e7fe9 (patch)
tree1921f1708cd0240648c97bc02df2c2ab5f2fc41e /linden/indra/llrender/llglheaders.h
parentSecond Life viewer sources 1.20.15 (diff)
downloadmeta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.zip
meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.gz
meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.bz2
meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.xz
Second Life viewer sources 1.21.0-RC
Diffstat (limited to 'linden/indra/llrender/llglheaders.h')
-rw-r--r--linden/indra/llrender/llglheaders.h588
1 files changed, 588 insertions, 0 deletions
diff --git a/linden/indra/llrender/llglheaders.h b/linden/indra/llrender/llglheaders.h
new file mode 100644
index 0000000..f047262
--- /dev/null
+++ b/linden/indra/llrender/llglheaders.h
@@ -0,0 +1,588 @@
1/**
2 * @file llglheaders.h
3 * @brief LLGL definitions
4 *
5 * $LicenseInfo:firstyear=2001&license=viewergpl$
6 *
7 * Copyright (c) 2001-2008, Linden Research, Inc.
8 *
9 * Second Life Viewer Source Code
10 * The source code in this file ("Source Code") is provided by Linden Lab
11 * to you under the terms of the GNU General Public License, version 2.0
12 * ("GPL"), unless you have obtained a separate licensing agreement
13 * ("Other License"), formally executed by you and Linden Lab. Terms of
14 * the GPL can be found in doc/GPL-license.txt in this distribution, or
15 * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
16 *
17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception
21 *
22 * By copying, modifying or distributing this software, you acknowledge
23 * that you have read and understood your obligations described above,
24 * and agree to abide by those obligations.
25 *
26 * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
27 * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
28 * COMPLETENESS OR PERFORMANCE.
29 * $/LicenseInfo$
30 */
31
32#ifndef LL_LLGLHEADERS_H
33#define LL_LLGLHEADERS_H
34
35#if LL_MESA
36//----------------------------------------------------------------------------
37// MESA headers
38// quotes so we get libraries/.../GL/ version
39#define GL_GLEXT_PROTOTYPES
40#include "GL/gl.h"
41#include "GL/glext.h"
42#include "GL/glu.h"
43
44// The __APPLE__ kludge is to make glh_extensions.h not symbol-clash horribly
45# define __APPLE__
46# include "GL/glh_extensions.h"
47# undef __APPLE__
48
49#elif LL_LINUX
50//----------------------------------------------------------------------------
51// Linux, MESA headers, but not necessarily assuming MESA runtime.
52// quotes so we get libraries/.../GL/ version
53#include "GL/gl.h"
54#include "GL/glext.h"
55#include "GL/glu.h"
56
57
58#if LL_LINUX && !LL_MESA_HEADLESS
59// The __APPLE__ kludge is to make glh_extensions.h not symbol-clash horribly
60# define __APPLE__
61# include "GL/glh_extensions.h"
62# undef __APPLE__
63
64/* Although SDL very likely ends up calling glXGetProcAddress() itself,
65 if we use SDL_GL_GetProcAddress() then we get bogus addresses back on
66 some systems. Weird. */
67/*# include "SDL/SDL.h"
68 # define GLH_EXT_GET_PROC_ADDRESS(p) SDL_GL_GetProcAddress(p) */
69#define GLX_GLXEXT_PROTOTYPES 1
70# include "GL/glx.h"
71# include "GL/glxext.h"
72// Use glXGetProcAddressARB instead of glXGetProcAddress - the ARB symbol
73// is considered 'legacy' but works on more machines.
74# define GLH_EXT_GET_PROC_ADDRESS(p) glXGetProcAddressARB((const GLubyte*)(p))
75// Whee, the X headers define 'Status'. Undefine to avoid confusion.
76#undef Status
77#endif // LL_LINUX && !LL_MESA_HEADLESS
78
79
80// GL_ARB_vertex_buffer_object
81extern PFNGLBINDBUFFERARBPROC glBindBufferARB;
82extern PFNGLDELETEBUFFERSARBPROC glDeleteBuffersARB;
83extern PFNGLGENBUFFERSARBPROC glGenBuffersARB;
84extern PFNGLISBUFFERARBPROC glIsBufferARB;
85extern PFNGLBUFFERDATAARBPROC glBufferDataARB;
86extern PFNGLBUFFERSUBDATAARBPROC glBufferSubDataARB;
87extern PFNGLGETBUFFERSUBDATAARBPROC glGetBufferSubDataARB;
88extern PFNGLMAPBUFFERARBPROC glMapBufferARB;
89extern PFNGLUNMAPBUFFERARBPROC glUnmapBufferARB;
90extern PFNGLGETBUFFERPARAMETERIVARBPROC glGetBufferParameterivARB;
91extern PFNGLGETBUFFERPOINTERVARBPROC glGetBufferPointervARB;
92
93// GL_ATI_vertex_array_object
94extern PFNGLNEWOBJECTBUFFERATIPROC glNewObjectBufferATI;
95extern PFNGLISOBJECTBUFFERATIPROC glIsObjectBufferATI;
96extern PFNGLUPDATEOBJECTBUFFERATIPROC glUpdateObjectBufferATI;
97extern PFNGLGETOBJECTBUFFERFVATIPROC glGetObjectBufferfvATI;
98extern PFNGLGETOBJECTBUFFERIVATIPROC glGetObjectBufferivATI;
99extern PFNGLFREEOBJECTBUFFERATIPROC glFreeObjectBufferATI;
100extern PFNGLARRAYOBJECTATIPROC glArrayObjectATI;
101extern PFNGLVERTEXATTRIBARRAYOBJECTATIPROC glVertexAttribArrayObjectATI;
102extern PFNGLGETARRAYOBJECTFVATIPROC glGetArrayObjectfvATI;
103extern PFNGLGETARRAYOBJECTIVATIPROC glGetArrayObjectivATI;
104extern PFNGLVARIANTARRAYOBJECTATIPROC glVariantObjectArrayATI;
105extern PFNGLGETVARIANTARRAYOBJECTFVATIPROC glGetVariantArrayObjectfvATI;
106extern PFNGLGETVARIANTARRAYOBJECTIVATIPROC glGetVariantArrayObjectivATI;
107
108// GL_ARB_occlusion_query
109extern PFNGLGENQUERIESARBPROC glGenQueriesARB;
110extern PFNGLDELETEQUERIESARBPROC glDeleteQueriesARB;
111extern PFNGLISQUERYARBPROC glIsQueryARB;
112extern PFNGLBEGINQUERYARBPROC glBeginQueryARB;
113extern PFNGLENDQUERYARBPROC glEndQueryARB;
114extern PFNGLGETQUERYIVARBPROC glGetQueryivARB;
115extern PFNGLGETQUERYOBJECTIVARBPROC glGetQueryObjectivARB;
116extern PFNGLGETQUERYOBJECTUIVARBPROC glGetQueryObjectuivARB;
117
118// GL_ARB_point_parameters
119extern PFNGLPOINTPARAMETERFARBPROC glPointParameterfARB;
120extern PFNGLPOINTPARAMETERFVARBPROC glPointParameterfvARB;
121
122// GL_ARB_shader_objects
123extern PFNGLDELETEOBJECTARBPROC glDeleteObjectARB;
124extern PFNGLGETHANDLEARBPROC glGetHandleARB;
125extern PFNGLDETACHOBJECTARBPROC glDetachObjectARB;
126extern PFNGLCREATESHADEROBJECTARBPROC glCreateShaderObjectARB;
127extern PFNGLSHADERSOURCEARBPROC glShaderSourceARB;
128extern PFNGLCOMPILESHADERARBPROC glCompileShaderARB;
129extern PFNGLCREATEPROGRAMOBJECTARBPROC glCreateProgramObjectARB;
130extern PFNGLATTACHOBJECTARBPROC glAttachObjectARB;
131extern PFNGLLINKPROGRAMARBPROC glLinkProgramARB;
132extern PFNGLUSEPROGRAMOBJECTARBPROC glUseProgramObjectARB;
133extern PFNGLVALIDATEPROGRAMARBPROC glValidateProgramARB;
134extern PFNGLUNIFORM1FARBPROC glUniform1fARB;
135extern PFNGLUNIFORM2FARBPROC glUniform2fARB;
136extern PFNGLUNIFORM3FARBPROC glUniform3fARB;
137extern PFNGLUNIFORM4FARBPROC glUniform4fARB;
138extern PFNGLUNIFORM1IARBPROC glUniform1iARB;
139extern PFNGLUNIFORM2IARBPROC glUniform2iARB;
140extern PFNGLUNIFORM3IARBPROC glUniform3iARB;
141extern PFNGLUNIFORM4IARBPROC glUniform4iARB;
142extern PFNGLUNIFORM1FVARBPROC glUniform1fvARB;
143extern PFNGLUNIFORM2FVARBPROC glUniform2fvARB;
144extern PFNGLUNIFORM3FVARBPROC glUniform3fvARB;
145extern PFNGLUNIFORM4FVARBPROC glUniform4fvARB;
146extern PFNGLUNIFORM1IVARBPROC glUniform1ivARB;
147extern PFNGLUNIFORM2IVARBPROC glUniform2ivARB;
148extern PFNGLUNIFORM3IVARBPROC glUniform3ivARB;
149extern PFNGLUNIFORM4IVARBPROC glUniform4ivARB;
150extern PFNGLUNIFORMMATRIX2FVARBPROC glUniformMatrix2fvARB;
151extern PFNGLUNIFORMMATRIX3FVARBPROC glUniformMatrix3fvARB;
152extern PFNGLUNIFORMMATRIX4FVARBPROC glUniformMatrix4fvARB;
153extern PFNGLGETOBJECTPARAMETERFVARBPROC glGetObjectParameterfvARB;
154extern PFNGLGETOBJECTPARAMETERIVARBPROC glGetObjectParameterivARB;
155extern PFNGLGETINFOLOGARBPROC glGetInfoLogARB;
156extern PFNGLGETATTACHEDOBJECTSARBPROC glGetAttachedObjectsARB;
157extern PFNGLGETUNIFORMLOCATIONARBPROC glGetUniformLocationARB;
158extern PFNGLGETACTIVEUNIFORMARBPROC glGetActiveUniformARB;
159extern PFNGLGETUNIFORMFVARBPROC glGetUniformfvARB;
160extern PFNGLGETUNIFORMIVARBPROC glGetUniformivARB;
161extern PFNGLGETSHADERSOURCEARBPROC glGetShaderSourceARB;
162
163// GL_ARB_vertex_shader
164extern PFNGLVERTEXATTRIB1DARBPROC glVertexAttrib1dARB;
165extern PFNGLVERTEXATTRIB1DVARBPROC glVertexAttrib1dvARB;
166extern PFNGLVERTEXATTRIB1FARBPROC glVertexAttrib1fARB;
167extern PFNGLVERTEXATTRIB1FVARBPROC glVertexAttrib1fvARB;
168extern PFNGLVERTEXATTRIB1SARBPROC glVertexAttrib1sARB;
169extern PFNGLVERTEXATTRIB1SVARBPROC glVertexAttrib1svARB;
170extern PFNGLVERTEXATTRIB2DARBPROC glVertexAttrib2dARB;
171extern PFNGLVERTEXATTRIB2DVARBPROC glVertexAttrib2dvARB;
172extern PFNGLVERTEXATTRIB2FARBPROC glVertexAttrib2fARB;
173extern PFNGLVERTEXATTRIB2FVARBPROC glVertexAttrib2fvARB;
174extern PFNGLVERTEXATTRIB2SARBPROC glVertexAttrib2sARB;
175extern PFNGLVERTEXATTRIB2SVARBPROC glVertexAttrib2svARB;
176extern PFNGLVERTEXATTRIB3DARBPROC glVertexAttrib3dARB;
177extern PFNGLVERTEXATTRIB3DVARBPROC glVertexAttrib3dvARB;
178extern PFNGLVERTEXATTRIB3FARBPROC glVertexAttrib3fARB;
179extern PFNGLVERTEXATTRIB3FVARBPROC glVertexAttrib3fvARB;
180extern PFNGLVERTEXATTRIB3SARBPROC glVertexAttrib3sARB;
181extern PFNGLVERTEXATTRIB3SVARBPROC glVertexAttrib3svARB;
182extern PFNGLVERTEXATTRIB4NBVARBPROC glVertexAttrib4nbvARB;
183extern PFNGLVERTEXATTRIB4NIVARBPROC glVertexAttrib4nivARB;
184extern PFNGLVERTEXATTRIB4NSVARBPROC glVertexAttrib4nsvARB;
185extern PFNGLVERTEXATTRIB4NUBARBPROC glVertexAttrib4nubARB;
186extern PFNGLVERTEXATTRIB4NUBVARBPROC glVertexAttrib4nubvARB;
187extern PFNGLVERTEXATTRIB4NUIVARBPROC glVertexAttrib4nuivARB;
188extern PFNGLVERTEXATTRIB4NUSVARBPROC glVertexAttrib4nusvARB;
189extern PFNGLVERTEXATTRIB4BVARBPROC glVertexAttrib4bvARB;
190extern PFNGLVERTEXATTRIB4DARBPROC glVertexAttrib4dARB;
191extern PFNGLVERTEXATTRIB4DVARBPROC glVertexAttrib4dvARB;
192extern PFNGLVERTEXATTRIB4FARBPROC glVertexAttrib4fARB;
193extern PFNGLVERTEXATTRIB4FVARBPROC glVertexAttrib4fvARB;
194extern PFNGLVERTEXATTRIB4IVARBPROC glVertexAttrib4ivARB;
195extern PFNGLVERTEXATTRIB4SARBPROC glVertexAttrib4sARB;
196extern PFNGLVERTEXATTRIB4SVARBPROC glVertexAttrib4svARB;
197extern PFNGLVERTEXATTRIB4UBVARBPROC glVertexAttrib4ubvARB;
198extern PFNGLVERTEXATTRIB4UIVARBPROC glVertexAttrib4uivARB;
199extern PFNGLVERTEXATTRIB4USVARBPROC glVertexAttrib4usvARB;
200extern PFNGLVERTEXATTRIBPOINTERARBPROC glVertexAttribPointerARB;
201extern PFNGLENABLEVERTEXATTRIBARRAYARBPROC glEnableVertexAttribArrayARB;
202extern PFNGLDISABLEVERTEXATTRIBARRAYARBPROC glDisableVertexAttribArrayARB;
203extern PFNGLPROGRAMSTRINGARBPROC glProgramStringARB;
204extern PFNGLBINDPROGRAMARBPROC glBindProgramARB;
205extern PFNGLDELETEPROGRAMSARBPROC glDeleteProgramsARB;
206extern PFNGLGENPROGRAMSARBPROC glGenProgramsARB;
207extern PFNGLPROGRAMENVPARAMETER4DARBPROC glProgramEnvParameter4dARB;
208extern PFNGLPROGRAMENVPARAMETER4DVARBPROC glProgramEnvParameter4dvARB;
209extern PFNGLPROGRAMENVPARAMETER4FARBPROC glProgramEnvParameter4fARB;
210extern PFNGLPROGRAMENVPARAMETER4FVARBPROC glProgramEnvParameter4fvARB;
211extern PFNGLPROGRAMLOCALPARAMETER4DARBPROC glProgramLocalParameter4dARB;
212extern PFNGLPROGRAMLOCALPARAMETER4DVARBPROC glProgramLocalParameter4dvARB;
213extern PFNGLPROGRAMLOCALPARAMETER4FARBPROC glProgramLocalParameter4fARB;
214extern PFNGLPROGRAMLOCALPARAMETER4FVARBPROC glProgramLocalParameter4fvARB;
215extern PFNGLGETPROGRAMENVPARAMETERDVARBPROC glGetProgramEnvParameterdvARB;
216extern PFNGLGETPROGRAMENVPARAMETERFVARBPROC glGetProgramEnvParameterfvARB;
217extern PFNGLGETPROGRAMLOCALPARAMETERDVARBPROC glGetProgramLocalParameterdvARB;
218extern PFNGLGETPROGRAMLOCALPARAMETERFVARBPROC glGetProgramLocalParameterfvARB;
219extern PFNGLGETPROGRAMIVARBPROC glGetProgramivARB;
220extern PFNGLGETPROGRAMSTRINGARBPROC glGetProgramStringARB;
221extern PFNGLGETVERTEXATTRIBDVARBPROC glGetVertexAttribdvARB;
222extern PFNGLGETVERTEXATTRIBFVARBPROC glGetVertexAttribfvARB;
223extern PFNGLGETVERTEXATTRIBIVARBPROC glGetVertexAttribivARB;
224extern PFNGLGETVERTEXATTRIBPOINTERVARBPROC glGetVertexAttribPointervARB;
225extern PFNGLISPROGRAMARBPROC glIsProgramARB;
226extern PFNGLBINDATTRIBLOCATIONARBPROC glBindAttribLocationARB;
227extern PFNGLGETACTIVEATTRIBARBPROC glGetActiveAttribARB;
228extern PFNGLGETATTRIBLOCATIONARBPROC glGetAttribLocationARB;
229
230extern PFNGLCOMPRESSEDTEXIMAGE2DARBPROC glCompressedTexImage2DARB;
231extern PFNGLGETCOMPRESSEDTEXIMAGEARBPROC glGetCompressedTexImageARB;
232
233extern PFNGLCOLORTABLEEXTPROC glColorTableEXT;
234
235//GL_EXT_framebuffer_object
236extern PFNGLISRENDERBUFFEREXTPROC glIsRenderbufferEXT;
237extern PFNGLBINDRENDERBUFFEREXTPROC glBindRenderbufferEXT;
238extern PFNGLDELETERENDERBUFFERSEXTPROC glDeleteRenderbuffersEXT;
239extern PFNGLGENRENDERBUFFERSEXTPROC glGenRenderbuffersEXT;
240extern PFNGLRENDERBUFFERSTORAGEEXTPROC glRenderbufferStorageEXT;
241extern PFNGLGETRENDERBUFFERPARAMETERIVEXTPROC glGetRenderbufferParameterivEXT;
242extern PFNGLISFRAMEBUFFEREXTPROC glIsFramebufferEXT;
243extern PFNGLBINDFRAMEBUFFEREXTPROC glBindFramebufferEXT;
244extern PFNGLDELETEFRAMEBUFFERSEXTPROC glDeleteFramebuffersEXT;
245extern PFNGLGENFRAMEBUFFERSEXTPROC glGenFramebuffersEXT;
246extern PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC glCheckFramebufferStatusEXT;
247extern PFNGLFRAMEBUFFERTEXTURE1DEXTPROC glFramebufferTexture1DEXT;
248extern PFNGLFRAMEBUFFERTEXTURE2DEXTPROC glFramebufferTexture2DEXT;
249extern PFNGLFRAMEBUFFERTEXTURE3DEXTPROC glFramebufferTexture3DEXT;
250extern PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC glFramebufferRenderbufferEXT;
251extern PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC glGetFramebufferAttachmentParameterivEXT;
252extern PFNGLGENERATEMIPMAPEXTPROC glGenerateMipmapEXT;
253
254
255#elif LL_WINDOWS
256
257// windows gl headers depend on things like APIENTRY, so include windows.
258#define WIN32_LEAN_AND_MEAN
259#include <winsock2.h>
260#include <windows.h>
261
262//----------------------------------------------------------------------------
263#include <GL/gl.h>
264#include <GL/glu.h>
265
266// quotes so we get libraries/.../GL/ version
267#include "GL/glext.h"
268#include "GL/glh_extensions.h"
269
270
271// GL_ARB_vertex_buffer_object
272extern PFNGLBINDBUFFERARBPROC glBindBufferARB;
273extern PFNGLDELETEBUFFERSARBPROC glDeleteBuffersARB;
274extern PFNGLGENBUFFERSARBPROC glGenBuffersARB;
275extern PFNGLISBUFFERARBPROC glIsBufferARB;
276extern PFNGLBUFFERDATAARBPROC glBufferDataARB;
277extern PFNGLBUFFERSUBDATAARBPROC glBufferSubDataARB;
278extern PFNGLGETBUFFERSUBDATAARBPROC glGetBufferSubDataARB;
279extern PFNGLMAPBUFFERARBPROC glMapBufferARB;
280extern PFNGLUNMAPBUFFERARBPROC glUnmapBufferARB;
281extern PFNGLGETBUFFERPARAMETERIVARBPROC glGetBufferParameterivARB;
282extern PFNGLGETBUFFERPOINTERVARBPROC glGetBufferPointervARB;
283
284// GL_ATI_vertex_array_object
285extern PFNGLNEWOBJECTBUFFERATIPROC glNewObjectBufferATI;
286extern PFNGLISOBJECTBUFFERATIPROC glIsObjectBufferATI;
287extern PFNGLUPDATEOBJECTBUFFERATIPROC glUpdateObjectBufferATI;
288extern PFNGLGETOBJECTBUFFERFVATIPROC glGetObjectBufferfvATI;
289extern PFNGLGETOBJECTBUFFERIVATIPROC glGetObjectBufferivATI;
290extern PFNGLFREEOBJECTBUFFERATIPROC glFreeObjectBufferATI;
291extern PFNGLARRAYOBJECTATIPROC glArrayObjectATI;
292extern PFNGLVERTEXATTRIBARRAYOBJECTATIPROC glVertexAttribArrayObjectATI;
293extern PFNGLGETARRAYOBJECTFVATIPROC glGetArrayObjectfvATI;
294extern PFNGLGETARRAYOBJECTIVATIPROC glGetArrayObjectivATI;
295extern PFNGLVARIANTARRAYOBJECTATIPROC glVariantObjectArrayATI;
296extern PFNGLGETVARIANTARRAYOBJECTFVATIPROC glGetVariantArrayObjectfvATI;
297extern PFNGLGETVARIANTARRAYOBJECTIVATIPROC glGetVariantArrayObjectivATI;
298
299extern PFNWGLSWAPINTERVALEXTPROC wglSwapIntervalEXT;
300
301// GL_ARB_occlusion_query
302extern PFNGLGENQUERIESARBPROC glGenQueriesARB;
303extern PFNGLDELETEQUERIESARBPROC glDeleteQueriesARB;
304extern PFNGLISQUERYARBPROC glIsQueryARB;
305extern PFNGLBEGINQUERYARBPROC glBeginQueryARB;
306extern PFNGLENDQUERYARBPROC glEndQueryARB;
307extern PFNGLGETQUERYIVARBPROC glGetQueryivARB;
308extern PFNGLGETQUERYOBJECTIVARBPROC glGetQueryObjectivARB;
309extern PFNGLGETQUERYOBJECTUIVARBPROC glGetQueryObjectuivARB;
310
311// GL_ARB_point_parameters
312extern PFNGLPOINTPARAMETERFARBPROC glPointParameterfARB;
313extern PFNGLPOINTPARAMETERFVARBPROC glPointParameterfvARB;
314
315// GL_ARB_shader_objects
316extern PFNGLDELETEOBJECTARBPROC glDeleteObjectARB;
317extern PFNGLGETHANDLEARBPROC glGetHandleARB;
318extern PFNGLDETACHOBJECTARBPROC glDetachObjectARB;
319extern PFNGLCREATESHADEROBJECTARBPROC glCreateShaderObjectARB;
320extern PFNGLSHADERSOURCEARBPROC glShaderSourceARB;
321extern PFNGLCOMPILESHADERARBPROC glCompileShaderARB;
322extern PFNGLCREATEPROGRAMOBJECTARBPROC glCreateProgramObjectARB;
323extern PFNGLATTACHOBJECTARBPROC glAttachObjectARB;
324extern PFNGLLINKPROGRAMARBPROC glLinkProgramARB;
325extern PFNGLUSEPROGRAMOBJECTARBPROC glUseProgramObjectARB;
326extern PFNGLVALIDATEPROGRAMARBPROC glValidateProgramARB;
327extern PFNGLUNIFORM1FARBPROC glUniform1fARB;
328extern PFNGLUNIFORM2FARBPROC glUniform2fARB;
329extern PFNGLUNIFORM3FARBPROC glUniform3fARB;
330extern PFNGLUNIFORM4FARBPROC glUniform4fARB;
331extern PFNGLUNIFORM1IARBPROC glUniform1iARB;
332extern PFNGLUNIFORM2IARBPROC glUniform2iARB;
333extern PFNGLUNIFORM3IARBPROC glUniform3iARB;
334extern PFNGLUNIFORM4IARBPROC glUniform4iARB;
335extern PFNGLUNIFORM1FVARBPROC glUniform1fvARB;
336extern PFNGLUNIFORM2FVARBPROC glUniform2fvARB;
337extern PFNGLUNIFORM3FVARBPROC glUniform3fvARB;
338extern PFNGLUNIFORM4FVARBPROC glUniform4fvARB;
339extern PFNGLUNIFORM1IVARBPROC glUniform1ivARB;
340extern PFNGLUNIFORM2IVARBPROC glUniform2ivARB;
341extern PFNGLUNIFORM3IVARBPROC glUniform3ivARB;
342extern PFNGLUNIFORM4IVARBPROC glUniform4ivARB;
343extern PFNGLUNIFORMMATRIX2FVARBPROC glUniformMatrix2fvARB;
344extern PFNGLUNIFORMMATRIX3FVARBPROC glUniformMatrix3fvARB;
345extern PFNGLUNIFORMMATRIX4FVARBPROC glUniformMatrix4fvARB;
346extern PFNGLGETOBJECTPARAMETERFVARBPROC glGetObjectParameterfvARB;
347extern PFNGLGETOBJECTPARAMETERIVARBPROC glGetObjectParameterivARB;
348extern PFNGLGETINFOLOGARBPROC glGetInfoLogARB;
349extern PFNGLGETATTACHEDOBJECTSARBPROC glGetAttachedObjectsARB;
350extern PFNGLGETUNIFORMLOCATIONARBPROC glGetUniformLocationARB;
351extern PFNGLGETACTIVEUNIFORMARBPROC glGetActiveUniformARB;
352extern PFNGLGETUNIFORMFVARBPROC glGetUniformfvARB;
353extern PFNGLGETUNIFORMIVARBPROC glGetUniformivARB;
354extern PFNGLGETSHADERSOURCEARBPROC glGetShaderSourceARB;
355
356// GL_ARB_vertex_shader
357extern PFNGLVERTEXATTRIB1DARBPROC glVertexAttrib1dARB;
358extern PFNGLVERTEXATTRIB1DVARBPROC glVertexAttrib1dvARB;
359extern PFNGLVERTEXATTRIB1FARBPROC glVertexAttrib1fARB;
360extern PFNGLVERTEXATTRIB1FVARBPROC glVertexAttrib1fvARB;
361extern PFNGLVERTEXATTRIB1SARBPROC glVertexAttrib1sARB;
362extern PFNGLVERTEXATTRIB1SVARBPROC glVertexAttrib1svARB;
363extern PFNGLVERTEXATTRIB2DARBPROC glVertexAttrib2dARB;
364extern PFNGLVERTEXATTRIB2DVARBPROC glVertexAttrib2dvARB;
365extern PFNGLVERTEXATTRIB2FARBPROC glVertexAttrib2fARB;
366extern PFNGLVERTEXATTRIB2FVARBPROC glVertexAttrib2fvARB;
367extern PFNGLVERTEXATTRIB2SARBPROC glVertexAttrib2sARB;
368extern PFNGLVERTEXATTRIB2SVARBPROC glVertexAttrib2svARB;
369extern PFNGLVERTEXATTRIB3DARBPROC glVertexAttrib3dARB;
370extern PFNGLVERTEXATTRIB3DVARBPROC glVertexAttrib3dvARB;
371extern PFNGLVERTEXATTRIB3FARBPROC glVertexAttrib3fARB;
372extern PFNGLVERTEXATTRIB3FVARBPROC glVertexAttrib3fvARB;
373extern PFNGLVERTEXATTRIB3SARBPROC glVertexAttrib3sARB;
374extern PFNGLVERTEXATTRIB3SVARBPROC glVertexAttrib3svARB;
375extern PFNGLVERTEXATTRIB4NBVARBPROC glVertexAttrib4nbvARB;
376extern PFNGLVERTEXATTRIB4NIVARBPROC glVertexAttrib4nivARB;
377extern PFNGLVERTEXATTRIB4NSVARBPROC glVertexAttrib4nsvARB;
378extern PFNGLVERTEXATTRIB4NUBARBPROC glVertexAttrib4nubARB;
379extern PFNGLVERTEXATTRIB4NUBVARBPROC glVertexAttrib4nubvARB;
380extern PFNGLVERTEXATTRIB4NUIVARBPROC glVertexAttrib4nuivARB;
381extern PFNGLVERTEXATTRIB4NUSVARBPROC glVertexAttrib4nusvARB;
382extern PFNGLVERTEXATTRIB4BVARBPROC glVertexAttrib4bvARB;
383extern PFNGLVERTEXATTRIB4DARBPROC glVertexAttrib4dARB;
384extern PFNGLVERTEXATTRIB4DVARBPROC glVertexAttrib4dvARB;
385extern PFNGLVERTEXATTRIB4FARBPROC glVertexAttrib4fARB;
386extern PFNGLVERTEXATTRIB4FVARBPROC glVertexAttrib4fvARB;
387extern PFNGLVERTEXATTRIB4IVARBPROC glVertexAttrib4ivARB;
388extern PFNGLVERTEXATTRIB4SARBPROC glVertexAttrib4sARB;
389extern PFNGLVERTEXATTRIB4SVARBPROC glVertexAttrib4svARB;
390extern PFNGLVERTEXATTRIB4UBVARBPROC glVertexAttrib4ubvARB;
391extern PFNGLVERTEXATTRIB4UIVARBPROC glVertexAttrib4uivARB;
392extern PFNGLVERTEXATTRIB4USVARBPROC glVertexAttrib4usvARB;
393extern PFNGLVERTEXATTRIBPOINTERARBPROC glVertexAttribPointerARB;
394extern PFNGLENABLEVERTEXATTRIBARRAYARBPROC glEnableVertexAttribArrayARB;
395extern PFNGLDISABLEVERTEXATTRIBARRAYARBPROC glDisableVertexAttribArrayARB;
396extern PFNGLPROGRAMSTRINGARBPROC glProgramStringARB;
397extern PFNGLBINDPROGRAMARBPROC glBindProgramARB;
398extern PFNGLDELETEPROGRAMSARBPROC glDeleteProgramsARB;
399extern PFNGLGENPROGRAMSARBPROC glGenProgramsARB;
400extern PFNGLPROGRAMENVPARAMETER4DARBPROC glProgramEnvParameter4dARB;
401extern PFNGLPROGRAMENVPARAMETER4DVARBPROC glProgramEnvParameter4dvARB;
402extern PFNGLPROGRAMENVPARAMETER4FARBPROC glProgramEnvParameter4fARB;
403extern PFNGLPROGRAMENVPARAMETER4FVARBPROC glProgramEnvParameter4fvARB;
404extern PFNGLPROGRAMLOCALPARAMETER4DARBPROC glProgramLocalParameter4dARB;
405extern PFNGLPROGRAMLOCALPARAMETER4DVARBPROC glProgramLocalParameter4dvARB;
406extern PFNGLPROGRAMLOCALPARAMETER4FARBPROC glProgramLocalParameter4fARB;
407extern PFNGLPROGRAMLOCALPARAMETER4FVARBPROC glProgramLocalParameter4fvARB;
408extern PFNGLGETPROGRAMENVPARAMETERDVARBPROC glGetProgramEnvParameterdvARB;
409extern PFNGLGETPROGRAMENVPARAMETERFVARBPROC glGetProgramEnvParameterfvARB;
410extern PFNGLGETPROGRAMLOCALPARAMETERDVARBPROC glGetProgramLocalParameterdvARB;
411extern PFNGLGETPROGRAMLOCALPARAMETERFVARBPROC glGetProgramLocalParameterfvARB;
412extern PFNGLGETPROGRAMIVARBPROC glGetProgramivARB;
413extern PFNGLGETPROGRAMSTRINGARBPROC glGetProgramStringARB;
414extern PFNGLGETVERTEXATTRIBDVARBPROC glGetVertexAttribdvARB;
415extern PFNGLGETVERTEXATTRIBFVARBPROC glGetVertexAttribfvARB;
416extern PFNGLGETVERTEXATTRIBIVARBPROC glGetVertexAttribivARB;
417extern PFNGLGETVERTEXATTRIBPOINTERVARBPROC glGetVertexAttribPointervARB;
418extern PFNGLISPROGRAMARBPROC glIsProgramARB;
419extern PFNGLBINDATTRIBLOCATIONARBPROC glBindAttribLocationARB;
420extern PFNGLGETACTIVEATTRIBARBPROC glGetActiveAttribARB;
421extern PFNGLGETATTRIBLOCATIONARBPROC glGetAttribLocationARB;
422
423//GL_EXT_framebuffer_object
424extern PFNGLISRENDERBUFFEREXTPROC glIsRenderbufferEXT;
425extern PFNGLBINDRENDERBUFFEREXTPROC glBindRenderbufferEXT;
426extern PFNGLDELETERENDERBUFFERSEXTPROC glDeleteRenderbuffersEXT;
427extern PFNGLGENRENDERBUFFERSEXTPROC glGenRenderbuffersEXT;
428extern PFNGLRENDERBUFFERSTORAGEEXTPROC glRenderbufferStorageEXT;
429extern PFNGLGETRENDERBUFFERPARAMETERIVEXTPROC glGetRenderbufferParameterivEXT;
430extern PFNGLISFRAMEBUFFEREXTPROC glIsFramebufferEXT;
431extern PFNGLBINDFRAMEBUFFEREXTPROC glBindFramebufferEXT;
432extern PFNGLDELETEFRAMEBUFFERSEXTPROC glDeleteFramebuffersEXT;
433extern PFNGLGENFRAMEBUFFERSEXTPROC glGenFramebuffersEXT;
434extern PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC glCheckFramebufferStatusEXT;
435extern PFNGLFRAMEBUFFERTEXTURE1DEXTPROC glFramebufferTexture1DEXT;
436extern PFNGLFRAMEBUFFERTEXTURE2DEXTPROC glFramebufferTexture2DEXT;
437extern PFNGLFRAMEBUFFERTEXTURE3DEXTPROC glFramebufferTexture3DEXT;
438extern PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC glFramebufferRenderbufferEXT;
439extern PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC glGetFramebufferAttachmentParameterivEXT;
440extern PFNGLGENERATEMIPMAPEXTPROC glGenerateMipmapEXT;
441
442
443#elif LL_DARWIN
444//----------------------------------------------------------------------------
445// LL_DARWIN
446
447#include <OpenGL/gl.h>
448#include <OpenGL/glu.h>
449
450#define GL_EXT_separate_specular_color 1
451#include <OpenGL/glext.h>
452
453#include "GL/glh_extensions.h"
454
455// These symbols don't exist on 10.3.9, so they have to be declared weak. Redeclaring them here fixes the problem.
456// Note that they also must not be called on 10.3.9. This should be taken care of by a runtime check for the existence of the GL extension.
457#include <AvailabilityMacros.h>
458
459// GL_EXT_framebuffer_object
460extern GLboolean glIsRenderbufferEXT(GLuint renderbuffer) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER;
461extern void glBindRenderbufferEXT(GLenum target, GLuint renderbuffer) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER;
462extern void glDeleteRenderbuffersEXT(GLsizei n, const GLuint *renderbuffers) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER;
463extern void glGenRenderbuffersEXT(GLsizei n, GLuint *renderbuffers) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER;
464extern void glRenderbufferStorageEXT(GLenum target, GLenum internalformat, GLsizei width, GLsizei height) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER;
465extern void glGetRenderbufferParameterivEXT(GLenum target, GLenum pname, GLint *params) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER;
466extern GLboolean glIsFramebufferEXT(GLuint framebuffer) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER;
467extern void glBindFramebufferEXT(GLenum target, GLuint framebuffer) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER;
468extern void glDeleteFramebuffersEXT(GLsizei n, const GLuint *framebuffers) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER;
469extern void glGenFramebuffersEXT(GLsizei n, GLuint *framebuffers) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER;
470extern GLenum glCheckFramebufferStatusEXT(GLenum target) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER;
471extern void glFramebufferTexture1DEXT(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER;
472extern void glFramebufferTexture2DEXT(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER;
473extern void glFramebufferTexture3DEXT(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER;
474extern void glFramebufferRenderbufferEXT(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER;
475extern void glGetFramebufferAttachmentParameterivEXT(GLenum target, GLenum attachment, GLenum pname, GLint *params) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER;
476extern void glGenerateMipmapEXT(GLenum target) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER;
477
478
479#ifdef __cplusplus
480extern "C" {
481#endif
482//
483// Define vertex buffer object headers on Mac
484//
485#ifndef GL_ARB_vertex_buffer_object
486#define GL_BUFFER_SIZE_ARB 0x8764
487#define GL_BUFFER_USAGE_ARB 0x8765
488#define GL_ARRAY_BUFFER_ARB 0x8892
489#define GL_ELEMENT_ARRAY_BUFFER_ARB 0x8893
490#define GL_ARRAY_BUFFER_BINDING_ARB 0x8894
491#define GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB 0x8895
492#define GL_VERTEX_ARRAY_BUFFER_BINDING_ARB 0x8896
493#define GL_NORMAL_ARRAY_BUFFER_BINDING_ARB 0x8897
494#define GL_COLOR_ARRAY_BUFFER_BINDING_ARB 0x8898
495#define GL_INDEX_ARRAY_BUFFER_BINDING_ARB 0x8899
496#define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB 0x889A
497#define GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB 0x889B
498#define GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB 0x889C
499#define GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB 0x889D
500#define GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB 0x889E
501#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB 0x889F
502#define GL_READ_ONLY_ARB 0x88B8
503#define GL_WRITE_ONLY_ARB 0x88B9
504#define GL_READ_WRITE_ARB 0x88BA
505#define GL_BUFFER_ACCESS_ARB 0x88BB
506#define GL_BUFFER_MAPPED_ARB 0x88BC
507#define GL_BUFFER_MAP_POINTER_ARB 0x88BD
508#define GL_STREAM_DRAW_ARB 0x88E0
509#define GL_STREAM_READ_ARB 0x88E1
510#define GL_STREAM_COPY_ARB 0x88E2
511#define GL_STATIC_DRAW_ARB 0x88E4
512#define GL_STATIC_READ_ARB 0x88E5
513#define GL_STATIC_COPY_ARB 0x88E6
514#define GL_DYNAMIC_DRAW_ARB 0x88E8
515#define GL_DYNAMIC_READ_ARB 0x88E9
516#define GL_DYNAMIC_COPY_ARB 0x88EA
517#endif
518
519
520
521#ifndef GL_ARB_vertex_buffer_object
522/* GL types for handling large vertex buffer objects */
523typedef intptr_t GLintptrARB;
524typedef intptr_t GLsizeiptrARB;
525#endif
526
527
528#ifndef GL_ARB_vertex_buffer_object
529#define GL_ARB_vertex_buffer_object 1
530#ifdef GL_GLEXT_FUNCTION_POINTERS
531typedef void (* glBindBufferARBProcPtr) (GLenum target, GLuint buffer);
532typedef void (* glDeleteBufferARBProcPtr) (GLsizei n, const GLuint *buffers);
533typedef void (* glGenBuffersARBProcPtr) (GLsizei n, GLuint *buffers);
534typedef GLboolean (* glIsBufferARBProcPtr) (GLuint buffer);
535typedef void (* glBufferDataARBProcPtr) (GLenum target, GLsizeiptrARB size, const GLvoid *data, GLenum usage);
536typedef void (* glBufferSubDataARBProcPtr) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, const GLvoid *data);
537typedef void (* glGetBufferSubDataARBProcPtr) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, GLvoid *data);
538typedef GLvoid* (* glMapBufferARBProcPtr) (GLenum target, GLenum access); /* Flawfinder: ignore */
539typedef GLboolean (* glUnmapBufferARBProcPtr) (GLenum target);
540typedef void (* glGetBufferParameterivARBProcPtr) (GLenum target, GLenum pname, GLint *params);
541typedef void (* glGetBufferPointervARBProcPtr) (GLenum target, GLenum pname, GLvoid* *params);
542#else
543extern void glBindBufferARB (GLenum, GLuint);
544extern void glDeleteBuffersARB (GLsizei, const GLuint *);
545extern void glGenBuffersARB (GLsizei, GLuint *);
546extern GLboolean glIsBufferARB (GLuint);
547extern void glBufferDataARB (GLenum, GLsizeiptrARB, const GLvoid *, GLenum);
548extern void glBufferSubDataARB (GLenum, GLintptrARB, GLsizeiptrARB, const GLvoid *);
549extern void glGetBufferSubDataARB (GLenum, GLintptrARB, GLsizeiptrARB, GLvoid *);
550extern GLvoid* glMapBufferARB (GLenum, GLenum);
551extern GLboolean glUnmapBufferARB (GLenum);
552extern void glGetBufferParameterivARB (GLenum, GLenum, GLint *);
553extern void glGetBufferPointervARB (GLenum, GLenum, GLvoid* *);
554#endif /* GL_GLEXT_FUNCTION_POINTERS */
555#endif
556
557// May be needed for DARWIN...
558// #ifndef GL_ARB_compressed_tex_image
559// #define GL_ARB_compressed_tex_image 1
560// #ifdef GL_GLEXT_FUNCTION_POINTERS
561// typedef void (* glCompressedTexImage1D) (GLenum, GLint, GLenum, GLsizei, GLint, GLsizei, const GLvoid*);
562// typedef void (* glCompressedTexImage2D) (GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, const GLvoid*);
563// typedef void (* glCompressedTexImage3D) (GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLsizei, const GLvoid*);
564// typedef void (* glCompressedTexSubImage1D) (GLenum, GLint, GLint, GLsizei, GLenum, GLsizei, const GLvoid*);
565// typedef void (* glCompressedTexSubImage2D) (GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid*);
566// typedef void (* glCompressedTexSubImage3D) (GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid*);
567// typedef void (* glGetCompressedTexImage) (GLenum, GLint, GLvoid*);
568// #else
569// extern void glCompressedTexImage1D (GLenum, GLint, GLenum, GLsizei, GLint, GLsizei, const GLvoid*);
570// extern void glCompressedTexImage2D (GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, const GLvoid*);
571// extern void glCompressedTexImage3D (GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLsizei, const GLvoid*);
572// extern void glCompressedTexSubImage1D (GLenum, GLint, GLint, GLsizei, GLenum, GLsizei, const GLvoid*);
573// extern void glCompressedTexSubImage2D (GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid*);
574// extern void glCompressedTexSubImage3D (GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid*);
575// extern void glGetCompressedTexImage (GLenum, GLint, GLvoid*);
576// #endif /* GL_GLEXT_FUNCTION_POINTERS */
577// #endif
578
579#ifdef __cplusplus
580}
581#endif
582
583#include <AGL/gl.h>
584
585#endif // LL_MESA / LL_WINDOWS / LL_DARWIN
586
587
588#endif // LL_LLGLHEADERS_H