Portability fixes.
[wine.git] / dlls / ddraw / gl_private.h
blobcb330e1c0d7282f4870b47b479025a0068e578fa
1 /* GL 'hack' private include file
2 * Copyright (c) 2003 Lionel Ulmer / Mike McCormack
4 * This file contains all structures that are not exported
5 * through d3d.h and all common macros.
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 #ifndef __GRAPHICS_WINE_GL_PRIVATE_H
23 #define __GRAPHICS_WINE_GL_PRIVATE_H
25 #ifdef HAVE_OPENGL
27 #undef APIENTRY
28 #undef CALLBACK
29 #undef WINAPI
31 #define XMD_H /* This is to prevent the Xmd.h inclusion bug :-/ */
32 #include <GL/gl.h>
33 #include <GL/glx.h>
34 #ifdef HAVE_GL_GLEXT_H
35 # include <GL/glext.h>
36 #endif
37 #undef XMD_H
39 #undef APIENTRY
40 #undef CALLBACK
41 #undef WINAPI
43 /* Redefines the constants */
44 #define CALLBACK __stdcall
45 #define WINAPI __stdcall
46 #define APIENTRY WINAPI
48 #define GL_API_FUNCTION(f) extern typeof(f) * p##f;
49 #include "gl_api.h"
50 #undef GL_API_FUNCTION
52 /* This is also where I store our private extension defines...
53 I know that Raphael won't like it, but well, I prefer doing that than battling 10 different headers :-)
55 Note: this is perfectly 'legal' as the three variants of the enum have exactly the same value
57 #define GL_MIRRORED_REPEAT_WINE 0x8370
58 #define GL_TEXTURE_FILTER_CONTROL_WINE 0x8500
59 #define GL_TEXTURE_LOD_BIAS_WINE 0x8501
60 #define GL_TEXTURE0_WINE 0x84C0
61 #define GL_TEXTURE1_WINE 0x84C1
62 #define GL_TEXTURE2_WINE 0x84C2
63 #define GL_TEXTURE3_WINE 0x84C3
64 #define GL_TEXTURE4_WINE 0x84C4
65 #define GL_TEXTURE5_WINE 0x84C5
66 #define GL_TEXTURE6_WINE 0x84C6
67 #define GL_TEXTURE7_WINE 0x84C7
68 #define GL_MAX_TEXTURE_UNITS_WINE 0x84E2
70 #ifndef GLPRIVATE_NO_REDEFINE
72 #define glAlphaFunc pglAlphaFunc
73 #define glBegin pglBegin
74 #define glBindTexture pglBindTexture
75 #define glBlendFunc pglBlendFunc
76 #define glClear pglClear
77 #define glClearColor pglClearColor
78 #define glClearDepth pglClearDepth
79 #define glClearStencil pglClearStencil
80 #define glClipPlane pglClipPlane
81 #define glColor3f pglColor3f
82 #define glColor3ub pglColor3ub
83 #define glColor4ub pglColor4ub
84 #define glCopyPixels pglCopyPixels
85 #define glCopyTexSubImage2D pglCopyTexSubImage2D
86 #define glColorMaterial pglColorMaterial
87 #define glCullFace pglCullFace
88 #define glDeleteTextures pglDeleteTextures
89 #define glDepthFunc pglDepthFunc
90 #define glDepthMask pglDepthMask
91 #define glDepthRange pglDepthRange
92 #define glDisable pglDisable
93 #define glDrawBuffer pglDrawBuffer
94 #define glDrawPixels pglDrawPixels
95 #define glEnable pglEnable
96 #define glEnd pglEnd
97 #define glFlush pglFlush
98 #define glFogf pglFogf
99 #define glFogfv pglFogfv
100 #define glFogi pglFogi
101 #define glFrontFace pglFrontFace
102 #define glGenTextures pglGenTextures
103 #define glGetBooleanv pglGetBooleanv
104 #define glGetError pglGetError
105 #define glGetFloatv pglGetFloatv
106 #define glGetIntegerv pglGetIntegerv
107 #define glGetString pglGetString
108 #define glGetTexEnviv pglGetTexEnviv
109 #define glGetTexParameteriv pglGetTexParameteriv
110 #define glHint pglHint
111 #define glLightModelfv pglLightModelfv
112 #define glLightModeli pglLightModeli
113 #define glLightfv pglLightfv
114 #define glLoadIdentity pglLoadIdentity
115 #define glLoadMatrixf pglLoadMatrixf
116 #define glMaterialf pglMaterialf
117 #define glMaterialfv pglMaterialfv
118 #define glMatrixMode pglMatrixMode
119 #define glMultMatrixf pglMultMatrixf
120 #define glNormal3f pglNormal3f
121 #define glNormal3fv pglNormal3fv
122 #define glPixelStorei pglPixelStorei
123 #define glPolygonMode pglPolygonMode
124 #define glPolygonOffset pglPolygonOffset
125 #define glPopMatrix pglPopMatrix
126 #define glPushMatrix pglPushMatrix
127 #define glRasterPos3d pglRasterPos3d
128 #define glReadBuffer pglReadBuffer
129 #define glReadPixels pglReadPixels
130 #define glScissor pglScissor
131 #define glShadeModel pglShadeModel
132 #define glStencilFunc pglStencilFunc
133 #define glStencilMask pglStencilMask
134 #define glStencilOp pglStencilOp
135 #define glTexCoord2f pglTexCoord2f
136 #define glTexCoord2fv pglTexCoord2fv
137 #define glTexEnvf pglTexEnvf
138 #define glTexEnvfv pglTexEnvfv
139 #define glTexEnvi pglTexEnvi
140 #define glTexImage2D pglTexImage2D
141 #define glTexParameteri pglTexParameteri
142 #define glTexParameterfv pglTexParameterfv
143 #define glTexSubImage2D pglTexSubImage2D
144 #define glTranslatef pglTranslatef
145 #define glVertex3d pglVertex3d
146 #define glVertex3f pglVertex3f
147 #define glVertex3fv pglVertex3fv
148 #define glVertex4f pglVertex4f
149 #define glViewport pglViewport
150 #define glXCreateContext pglXCreateContext
151 #define glXDestroyContext pglXDestroyContext
152 #define glXMakeCurrent pglXMakeCurrent
153 #define glXQueryExtensionsString pglXQueryExtensionsString
154 #define glXSwapBuffers pglXSwapBuffers
156 #endif /* GLPRIVATE_NO_REDEFINE */
158 #endif /* HAVE_OPENGL */
160 #endif /* __GRAPHICS_WINE_GL_PRIVATE_H */