Quake II RTX doxygen  1.0 dev
fixed.h
Go to the documentation of this file.
1 /*
2 Copyright (C) 1997-2001 Id Software, Inc.
3 
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
8 
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13 
14 You should have received a copy of the GNU General Public License along
15 with this program; if not, write to the Free Software Foundation, Inc.,
16 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17 */
18 
19 #ifndef QGL_H
20 #define QGL_H
21 
22 #if USE_SDL
23 #include <SDL_opengl.h>
24 #else // USE_SDL
25 #ifdef _MSC_VER
26 #define WIN32_LEAN_AND_MEAN 1
27 #include <windows.h>
28 #endif // _MSC_VER
29 #include <GL/gl.h>
30 #include <GL/glext.h>
31 #endif // !USE_SDL
32 
33 // ==========================================================
34 
35 // subset of OpenGL 1.1 core functions
36 #define qglAlphaFunc glAlphaFunc
37 #define qglBindTexture glBindTexture
38 #define qglBlendFunc glBlendFunc
39 #define qglClear glClear
40 #define qglClearColor glClearColor
41 #define qglClearDepth glClearDepth
42 #define qglClearStencil glClearStencil
43 #define qglColor4f glColor4f
44 #define qglColor4fv glColor4fv
45 #define qglColorMask glColorMask
46 #define qglColorPointer glColorPointer
47 #define qglCopyTexImage2D glCopyTexImage2D
48 #define qglCopyTexSubImage2D glCopyTexSubImage2D
49 #define qglCullFace glCullFace
50 #define qglDeleteTextures glDeleteTextures
51 #define qglDepthFunc glDepthFunc
52 #define qglDepthMask glDepthMask
53 #define qglDepthRange glDepthRange
54 #define qglDisable glDisable
55 #define qglDisableClientState glDisableClientState
56 #define qglDrawArrays glDrawArrays
57 #define qglDrawElements glDrawElements
58 #define qglEnable glEnable
59 #define qglEnableClientState glEnableClientState
60 #define qglFinish glFinish
61 #define qglFlush glFlush
62 #define qglFogf glFogf
63 #define qglFogfv glFogfv
64 #define qglFrontFace glFrontFace
65 #define qglFrustum glFrustum
66 #define qglGenTextures glGenTextures
67 #define qglGetError glGetError
68 #define qglGetFloatv glGetFloatv
69 #define qglGetIntegerv glGetIntegerv
70 #define qglGetString glGetString
71 #define qglHint glHint
72 #define qglIsEnabled glIsEnabled
73 #define qglIsTexture glIsTexture
74 #define qglLightModelf glLightModelf
75 #define qglLightModelfv glLightModelfv
76 #define qglLightf glLightf
77 #define qglLightfv glLightfv
78 #define qglLineWidth glLineWidth
79 #define qglLoadIdentity glLoadIdentity
80 #define qglLoadMatrixf glLoadMatrixf
81 #define qglLogicOp glLogicOp
82 #define qglMaterialf glMaterialf
83 #define qglMaterialfv glMaterialfv
84 #define qglMatrixMode glMatrixMode
85 #define qglMultMatrixf glMultMatrixf
86 #define qglNormal3f glNormal3f
87 #define qglNormal3fv glNormal3fv
88 #define qglNormalPointer glNormalPointer
89 #define qglOrtho glOrtho
90 #define qglPixelStorei glPixelStorei
91 #define qglPointSize glPointSize
92 #define qglPolygonMode glPolygonMode
93 #define qglPolygonOffset glPolygonOffset
94 #define qglPopMatrix glPopMatrix
95 #define qglPushMatrix glPushMatrix
96 #define qglReadPixels glReadPixels
97 #define qglRotatef glRotatef
98 #define qglScalef glScalef
99 #define qglScissor glScissor
100 #define qglShadeModel glShadeModel
101 #define qglStencilFunc glStencilFunc
102 #define qglStencilMask glStencilMask
103 #define qglStencilOp glStencilOp
104 #define qglTexCoordPointer glTexCoordPointer
105 #define qglTexEnvf glTexEnvf
106 #define qglTexEnvfv glTexEnvfv
107 #define qglTexImage2D glTexImage2D
108 #define qglTexParameterf glTexParameterf
109 #define qglTexParameterfv glTexParameterfv
110 #define qglTexSubImage2D glTexSubImage2D
111 #define qglTranslatef glTranslatef
112 #define qglVertexPointer glVertexPointer
113 #define qglViewport glViewport
114 
115 // OpenGL 3.0 core function
116 extern PFNGLGENERATEMIPMAPPROC qglGenerateMipmap;
117 
118 // GL_ARB_fragment_program
119 extern PFNGLPROGRAMSTRINGARBPROC qglProgramStringARB;
120 extern PFNGLBINDPROGRAMARBPROC qglBindProgramARB;
121 extern PFNGLDELETEPROGRAMSARBPROC qglDeleteProgramsARB;
122 extern PFNGLGENPROGRAMSARBPROC qglGenProgramsARB;
123 extern PFNGLPROGRAMENVPARAMETER4FVARBPROC qglProgramEnvParameter4fvARB;
124 extern PFNGLPROGRAMLOCALPARAMETER4FVARBPROC qglProgramLocalParameter4fvARB;
125 
126 // GL_ARB_multitexture
127 extern PFNGLACTIVETEXTUREARBPROC qglActiveTextureARB;
128 extern PFNGLCLIENTACTIVETEXTUREARBPROC qglClientActiveTextureARB;
129 
130 // GL_ARB_vertex_buffer_object
131 extern PFNGLBINDBUFFERARBPROC qglBindBufferARB;
132 extern PFNGLDELETEBUFFERSARBPROC qglDeleteBuffersARB;
133 extern PFNGLGENBUFFERSARBPROC qglGenBuffersARB;
134 extern PFNGLBUFFERDATAARBPROC qglBufferDataARB;
135 extern PFNGLBUFFERSUBDATAARBPROC qglBufferSubDataARB;
136 
137 // GL_EXT_compiled_vertex_array
138 extern PFNGLLOCKARRAYSEXTPROC qglLockArraysEXT;
139 extern PFNGLUNLOCKARRAYSEXTPROC qglUnlockArraysEXT;
140 
141 // ==========================================================
142 
143 #define QGL_ARB_fragment_program (1 << 0)
144 #define QGL_ARB_multitexture (1 << 1)
145 #define QGL_ARB_vertex_buffer_object (1 << 2)
146 #define QGL_EXT_compiled_vertex_array (1 << 3)
147 #define QGL_EXT_texture_filter_anisotropic (1 << 4)
148 
149 #define QGL_3_0_core_functions (1 << 31)
150 
151 #define QGL_Init() qtrue
152 #define QGL_Shutdown() QGL_ShutdownExtensions(~0)
153 
154 void QGL_InitExtensions(unsigned mask);
155 void QGL_ShutdownExtensions(unsigned mask);
156 
157 unsigned QGL_ParseExtensionString(const char *s);
158 
159 #ifdef _DEBUG
160 #define QGL_EnableLogging(mask) (void)0
161 #define QGL_DisableLogging(mask) (void)0
162 #define QGL_LogComment(...) (void)0
163 #endif
164 
165 #endif // QGL_H
qglDeleteProgramsARB
PFNGLDELETEPROGRAMSARBPROC qglDeleteProgramsARB
Definition: fixed.c:32
qglDeleteBuffersARB
PFNGLDELETEBUFFERSARBPROC qglDeleteBuffersARB
Definition: fixed.c:43
qglBufferDataARB
PFNGLBUFFERDATAARBPROC qglBufferDataARB
Definition: fixed.c:45
qglBindBufferARB
PFNGLBINDBUFFERARBPROC qglBindBufferARB
Definition: fixed.c:42
qglActiveTextureARB
PFNGLACTIVETEXTUREARBPROC qglActiveTextureARB
Definition: fixed.c:38
QGL_ParseExtensionString
unsigned QGL_ParseExtensionString(const char *s)
Definition: dynamic.c:712
qglProgramEnvParameter4fvARB
PFNGLPROGRAMENVPARAMETER4FVARBPROC qglProgramEnvParameter4fvARB
Definition: fixed.c:34
QGL_InitExtensions
void QGL_InitExtensions(unsigned mask)
Definition: dynamic.c:683
qglBindProgramARB
PFNGLBINDPROGRAMARBPROC qglBindProgramARB
Definition: fixed.c:31
qglLockArraysEXT
PFNGLLOCKARRAYSEXTPROC qglLockArraysEXT
Definition: fixed.c:49
qglUnlockArraysEXT
PFNGLUNLOCKARRAYSEXTPROC qglUnlockArraysEXT
Definition: fixed.c:50
qglGenProgramsARB
PFNGLGENPROGRAMSARBPROC qglGenProgramsARB
Definition: fixed.c:33
qglClientActiveTextureARB
PFNGLCLIENTACTIVETEXTUREARBPROC qglClientActiveTextureARB
Definition: fixed.c:39
qglBufferSubDataARB
PFNGLBUFFERSUBDATAARBPROC qglBufferSubDataARB
Definition: fixed.c:46
qglGenerateMipmap
PFNGLGENERATEMIPMAPPROC qglGenerateMipmap
Definition: dynamic.c:34
QGL_ShutdownExtensions
void QGL_ShutdownExtensions(unsigned mask)
Definition: dynamic.c:643
qglProgramLocalParameter4fvARB
PFNGLPROGRAMLOCALPARAMETER4FVARBPROC qglProgramLocalParameter4fvARB
Definition: fixed.c:35
qglProgramStringARB
PFNGLPROGRAMSTRINGARBPROC qglProgramStringARB
Definition: fixed.c:30
gl.h
qglGenBuffersARB
PFNGLGENBUFFERSARBPROC qglGenBuffersARB
Definition: fixed.c:44