ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

gl_compat.c
Go to the documentation of this file.
00001 /*
00002  * Compatibility functions for older GL implementations
00003  *
00004  * Copyright 2008 Stefan Dösinger for CodeWeavers
00005  *
00006  * This library is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU Lesser General Public
00008  * License as published by the Free Software Foundation; either
00009  * version 2.1 of the License, or (at your option) any later version.
00010  *
00011  * This library is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014  * Lesser General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU Lesser General Public
00017  * License along with this library; if not, write to the Free Software
00018  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
00019  */
00020 
00021 #include "config.h"
00022 #include <stdio.h>
00023 #ifdef HAVE_FLOAT_H
00024 # include <float.h>
00025 #endif
00026 #include "wined3d_private.h"
00027 
00028 WINE_DEFAULT_DEBUG_CHANNEL(gl_compat);
00029 
00030 /* Start GL_ARB_multitexture emulation */
00031 static void WINE_GLAPI wine_glMultiTexCoord1fARB(GLenum target, GLfloat s) {
00032     if(target != GL_TEXTURE0) {
00033         ERR("Texture unit > 0 used, but GL_ARB_multitexture is not supported\n");
00034         return;
00035     }
00036     glTexCoord1f(s);
00037 }
00038 
00039 static void WINE_GLAPI wine_glMultiTexCoord1fvARB(GLenum target, const GLfloat *v) {
00040     if(target != GL_TEXTURE0) {
00041         ERR("Texture unit > 0 used, but GL_ARB_multitexture is not supported\n");
00042         return;
00043     }
00044     glTexCoord1fv(v);
00045 }
00046 
00047 static void WINE_GLAPI wine_glMultiTexCoord2fARB(GLenum target, GLfloat s, GLfloat t) {
00048     if(target != GL_TEXTURE0) {
00049         ERR("Texture unit > 0 used, but GL_ARB_multitexture is not supported\n");
00050         return;
00051     }
00052     glTexCoord2f(s, t);
00053 }
00054 
00055 static void WINE_GLAPI wine_glMultiTexCoord2fvARB(GLenum target, const GLfloat *v) {
00056     if(target != GL_TEXTURE0) {
00057         ERR("Texture unit > 0 used, but GL_ARB_multitexture is not supported\n");
00058         return;
00059     }
00060     glTexCoord2fv(v);
00061 }
00062 
00063 static void WINE_GLAPI wine_glMultiTexCoord3fARB(GLenum target, GLfloat s, GLfloat t, GLfloat r) {
00064     if(target != GL_TEXTURE0) {
00065         ERR("Texture unit > 0 used, but GL_ARB_multitexture is not supported\n");
00066         return;
00067     }
00068     glTexCoord3f(s, t, r);
00069 }
00070 
00071 static void WINE_GLAPI wine_glMultiTexCoord3fvARB(GLenum target, const GLfloat *v) {
00072     if(target != GL_TEXTURE0) {
00073         ERR("Texture unit > 0 used, but GL_ARB_multitexture is not supported\n");
00074         return;
00075     }
00076     glTexCoord3fv(v);
00077 }
00078 
00079 static void WINE_GLAPI wine_glMultiTexCoord4fARB(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q) {
00080     if(target != GL_TEXTURE0) {
00081         ERR("Texture unit > 0 used, but GL_ARB_multitexture is not supported\n");
00082         return;
00083     }
00084     glTexCoord4f(s, t, r, q);
00085 }
00086 
00087 static void WINE_GLAPI wine_glMultiTexCoord4fvARB(GLenum target, const GLfloat *v) {
00088     if(target != GL_TEXTURE0) {
00089         ERR("Texture unit > 0 used, but GL_ARB_multitexture is not supported\n");
00090         return;
00091     }
00092     glTexCoord4fv(v);
00093 }
00094 
00095 static void WINE_GLAPI wine_glMultiTexCoord2svARB(GLenum target, const GLshort *v) {
00096     if(target != GL_TEXTURE0) {
00097         ERR("Texture unit > 0 used, but GL_ARB_multitexture is not supported\n");
00098         return;
00099     }
00100     glTexCoord2sv(v);
00101 }
00102 
00103 static void WINE_GLAPI wine_glMultiTexCoord4svARB(GLenum target, const GLshort *v) {
00104     if(target != GL_TEXTURE0) {
00105         ERR("Texture unit > 0 used, but GL_ARB_multitexture is not supported\n");
00106         return;
00107     }
00108     glTexCoord4sv(v);
00109 }
00110 
00111 static void WINE_GLAPI wine_glActiveTextureARB(GLenum texture) {
00112     if(texture != GL_TEXTURE0) {
00113         ERR("Texture unit > 0 used, but GL_ARB_multitexture is not supported\n");
00114         return;
00115     }
00116 }
00117 
00118 static void WINE_GLAPI wine_glClientActiveTextureARB(GLenum texture) {
00119     if(texture != GL_TEXTURE0) {
00120         ERR("Texture unit > 0 used, but GL_ARB_multitexture is not supported\n");
00121         return;
00122     }
00123 }
00124 
00125 static void (WINE_GLAPI *old_multitex_glGetIntegerv) (GLenum pname, GLint* params) = NULL;
00126 static void WINE_GLAPI wine_glGetIntegerv(GLenum pname, GLint* params) {
00127     switch(pname) {
00128         case GL_ACTIVE_TEXTURE:         *params = 0;    break;
00129         case GL_MAX_TEXTURE_UNITS_ARB:  *params = 1;    break;
00130         default: old_multitex_glGetIntegerv(pname, params);
00131     }
00132 }
00133 
00134 static void (WINE_GLAPI *old_multitex_glGetFloatv) (GLenum pname, GLfloat* params) = NULL;
00135 static void WINE_GLAPI wine_glGetFloatv(GLenum pname, GLfloat* params) {
00136     if (pname == GL_ACTIVE_TEXTURE) *params = 0.0f;
00137     else old_multitex_glGetFloatv(pname, params);
00138 }
00139 
00140 static void (WINE_GLAPI *old_multitex_glGetDoublev) (GLenum pname, GLdouble* params) = NULL;
00141 static void WINE_GLAPI wine_glGetDoublev(GLenum pname, GLdouble* params) {
00142     if(pname == GL_ACTIVE_TEXTURE) *params = 0.0;
00143     else old_multitex_glGetDoublev(pname, params);
00144 }
00145 
00146 /* Start GL_EXT_fogcoord emulation */
00147 static void (WINE_GLAPI *old_fogcoord_glEnable) (GLenum cap) = NULL;
00148 static void WINE_GLAPI wine_glEnable(GLenum cap) {
00149     if(cap == GL_FOG) {
00150         struct wined3d_context *ctx = context_get_current();
00151         ctx->fog_enabled = 1;
00152         if(ctx->gl_fog_source != GL_FRAGMENT_DEPTH_EXT) return;
00153     }
00154     old_fogcoord_glEnable(cap);
00155 }
00156 
00157 static void (WINE_GLAPI *old_fogcoord_glDisable) (GLenum cap) = NULL;
00158 static void WINE_GLAPI wine_glDisable(GLenum cap) {
00159     if(cap == GL_FOG) {
00160         struct wined3d_context *ctx = context_get_current();
00161         ctx->fog_enabled = 0;
00162         if(ctx->gl_fog_source != GL_FRAGMENT_DEPTH_EXT) return;
00163     }
00164     old_fogcoord_glDisable(cap);
00165 }
00166 
00167 static void (WINE_GLAPI *old_fogcoord_glFogi) (GLenum pname, GLint param) = NULL;
00168 static void WINE_GLAPI wine_glFogi(GLenum pname, GLint param) {
00169     struct wined3d_context *ctx = context_get_current();
00170 
00171     if(pname == GL_FOG_COORDINATE_SOURCE_EXT) {
00172         ctx->gl_fog_source = param;
00173         if(param == GL_FRAGMENT_DEPTH_EXT) {
00174             if(ctx->fog_enabled) old_fogcoord_glEnable(GL_FOG);
00175         } else {
00176             WARN("Fog coords activated, but not supported. Using slow emulation\n");
00177             old_fogcoord_glDisable(GL_FOG);
00178         }
00179     } else {
00180         if(pname == GL_FOG_START) {
00181             ctx->fogstart = (float) param;
00182         } else if(pname == GL_FOG_END) {
00183             ctx->fogend = (float) param;
00184         }
00185         old_fogcoord_glFogi(pname, param);
00186     }
00187 }
00188 
00189 static void (WINE_GLAPI *old_fogcoord_glFogiv) (GLenum pname, const GLint *param) = NULL;
00190 static void WINE_GLAPI wine_glFogiv(GLenum pname, const GLint *param) {
00191     struct wined3d_context *ctx = context_get_current();
00192     if(pname == GL_FOG_COORDINATE_SOURCE_EXT) {
00193         ctx->gl_fog_source = *param;
00194         if(*param == GL_FRAGMENT_DEPTH_EXT) {
00195             if(ctx->fog_enabled) old_fogcoord_glEnable(GL_FOG);
00196         } else {
00197             WARN("Fog coords activated, but not supported. Using slow emulation\n");
00198             old_fogcoord_glDisable(GL_FOG);
00199         }
00200     } else {
00201         if(pname == GL_FOG_START) {
00202             ctx->fogstart = (float) *param;
00203         } else if(pname == GL_FOG_END) {
00204             ctx->fogend = (float) *param;
00205         }
00206         old_fogcoord_glFogiv(pname, param);
00207     }
00208 }
00209 
00210 static void (WINE_GLAPI *old_fogcoord_glFogf) (GLenum pname, GLfloat param) = NULL;
00211 static void WINE_GLAPI wine_glFogf(GLenum pname, GLfloat param) {
00212     struct wined3d_context *ctx = context_get_current();
00213     if(pname == GL_FOG_COORDINATE_SOURCE_EXT) {
00214         ctx->gl_fog_source = (GLint) param;
00215         if(param == GL_FRAGMENT_DEPTH_EXT) {
00216             if(ctx->fog_enabled) old_fogcoord_glEnable(GL_FOG);
00217         } else {
00218             WARN("Fog coords activated, but not supported. Using slow emulation\n");
00219             old_fogcoord_glDisable(GL_FOG);
00220         }
00221     } else {
00222         if(pname == GL_FOG_START) {
00223             ctx->fogstart = param;
00224         } else if(pname == GL_FOG_END) {
00225             ctx->fogend = param;
00226         }
00227         old_fogcoord_glFogf(pname, param);
00228     }
00229 }
00230 
00231 static void (WINE_GLAPI *old_fogcoord_glFogfv) (GLenum pname, const GLfloat *param) = NULL;
00232 static void WINE_GLAPI wine_glFogfv(GLenum pname, const GLfloat *param) {
00233     struct wined3d_context *ctx = context_get_current();
00234     if(pname == GL_FOG_COORDINATE_SOURCE_EXT) {
00235         ctx->gl_fog_source = (GLint) *param;
00236         if(*param == GL_FRAGMENT_DEPTH_EXT) {
00237             if(ctx->fog_enabled) old_fogcoord_glEnable(GL_FOG);
00238         } else {
00239             WARN("Fog coords activated, but not supported. Using slow emulation\n");
00240             old_fogcoord_glDisable(GL_FOG);
00241         }
00242     } else {
00243         if(pname == GL_FOG_COLOR) {
00244             ctx->fogcolor[0] = param[0];
00245             ctx->fogcolor[1] = param[1];
00246             ctx->fogcolor[2] = param[2];
00247             ctx->fogcolor[3] = param[3];
00248         } else if(pname == GL_FOG_START) {
00249             ctx->fogstart = *param;
00250         } else if(pname == GL_FOG_END) {
00251             ctx->fogend = *param;
00252         }
00253         old_fogcoord_glFogfv(pname, param);
00254     }
00255 }
00256 
00257 static void (WINE_GLAPI *old_fogcoord_glVertex4f) (GLfloat x, GLfloat y, GLfloat z, GLfloat w) = NULL;
00258 static void (WINE_GLAPI *old_fogcoord_glVertex4fv) (const GLfloat *pos) = NULL;
00259 static void (WINE_GLAPI *old_fogcoord_glVertex3f) (GLfloat x, GLfloat y, GLfloat z) = NULL;
00260 static void (WINE_GLAPI *old_fogcoord_glVertex3fv) (const GLfloat *pos) = NULL;
00261 static void (WINE_GLAPI *old_fogcoord_glColor4f) (GLfloat r, GLfloat g, GLfloat b, GLfloat a) = NULL;
00262 static void (WINE_GLAPI *old_fogcoord_glColor4fv) (const GLfloat *color) = NULL;
00263 static void (WINE_GLAPI *old_fogcoord_glColor3f) (GLfloat r, GLfloat g, GLfloat b) = NULL;
00264 static void (WINE_GLAPI *old_fogcoord_glColor3fv) (const GLfloat *color) = NULL;
00265 static void (WINE_GLAPI *old_fogcoord_glColor4ub) (GLubyte r, GLubyte g, GLubyte b, GLubyte a) = NULL;
00266 static void (WINE_GLAPI *old_fogcoord_glFogCoordfEXT) (GLfloat f) = NULL;
00267 static void (WINE_GLAPI *old_fogcoord_glFogCoorddEXT) (GLdouble f) = NULL;
00268 static void (WINE_GLAPI *old_fogcoord_glFogCoordfvEXT) (const GLfloat *f) = NULL;
00269 static void (WINE_GLAPI *old_fogcoord_glFogCoorddvEXT) (const GLdouble *f) = NULL;
00270 
00271 static void WINE_GLAPI wine_glVertex4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w) {
00272     struct wined3d_context *ctx = context_get_current();
00273     if(ctx->gl_fog_source == GL_FOG_COORDINATE_EXT && ctx->fog_enabled) {
00274         GLfloat c[4] = {ctx->color[0], ctx->color[1], ctx->color[2], ctx->color[3]};
00275         GLfloat i;
00276 
00277         i = (ctx->fogend - ctx->fog_coord_value) / (ctx->fogend - ctx->fogstart);
00278         c[0] = i * c[0] + (1.0f - i) * ctx->fogcolor[0];
00279         c[1] = i * c[1] + (1.0f - i) * ctx->fogcolor[1];
00280         c[2] = i * c[2] + (1.0f - i) * ctx->fogcolor[2];
00281 
00282         old_fogcoord_glColor4f(c[0], c[1], c[2], c[3]);
00283         old_fogcoord_glVertex4f(x, y, z, w);
00284     } else {
00285         old_fogcoord_glVertex4f(x, y, z, w);
00286     }
00287 }
00288 
00289 static void WINE_GLAPI wine_glVertex4fv(const GLfloat *pos) {
00290     wine_glVertex4f(pos[0], pos[1], pos[2], pos[3]);
00291 }
00292 
00293 static void WINE_GLAPI wine_glVertex3f(GLfloat x, GLfloat y, GLfloat z) {
00294     wine_glVertex4f(x, y, z, 1.0f);
00295 }
00296 
00297 static void WINE_GLAPI wine_glVertex3fv(const GLfloat *pos) {
00298     wine_glVertex4f(pos[0], pos[1], pos[2], 1.0f);
00299 }
00300 
00301 static void WINE_GLAPI wine_glColor4f(GLfloat r, GLfloat g, GLfloat b, GLfloat a) {
00302     struct wined3d_context *ctx = context_get_current();
00303     ctx->color[0] = r;
00304     ctx->color[1] = g;
00305     ctx->color[2] = b;
00306     ctx->color[3] = a;
00307     old_fogcoord_glColor4f(r, g, b, a);
00308 }
00309 
00310 static void WINE_GLAPI wine_glColor4fv(const GLfloat *c) {
00311     wine_glColor4f(c[0], c[1], c[2], c[3]);
00312 }
00313 
00314 static void WINE_GLAPI wine_glColor3f(GLfloat r, GLfloat g, GLfloat b) {
00315     wine_glColor4f(r, g, b, 1.0f);
00316 }
00317 
00318 static void WINE_GLAPI wine_glColor3fv(const GLfloat *c) {
00319     wine_glColor4f(c[0], c[1], c[2], 1.0f);
00320 }
00321 
00322 static void WINE_GLAPI wine_glColor4ub(GLubyte r, GLubyte g, GLubyte b, GLubyte a) {
00323     wine_glColor4f(r / 255.0f, g / 255.0f, b / 255.0f, a / 255.0f);
00324 }
00325 
00326 /* In D3D the fog coord is a UBYTE, so there's no problem with using the single
00327  * precision function
00328  */
00329 static void WINE_GLAPI wine_glFogCoordfEXT(GLfloat f) {
00330     struct wined3d_context *ctx = context_get_current();
00331     ctx->fog_coord_value = f;
00332 }
00333 static void WINE_GLAPI wine_glFogCoorddEXT(GLdouble f) {
00334     wine_glFogCoordfEXT((GLfloat) f);
00335 }
00336 static void WINE_GLAPI wine_glFogCoordfvEXT(const GLfloat *f) {
00337     wine_glFogCoordfEXT(*f);
00338 }
00339 static void WINE_GLAPI wine_glFogCoorddvEXT(const GLdouble *f) {
00340     wine_glFogCoordfEXT((GLfloat) *f);
00341 }
00342 
00343 /* End GL_EXT_fog_coord emulation */
00344 
00345 void add_gl_compat_wrappers(struct wined3d_gl_info *gl_info)
00346 {
00347     if (!gl_info->supported[ARB_MULTITEXTURE])
00348     {
00349         TRACE("Applying GL_ARB_multitexture emulation hooks\n");
00350         gl_info->glActiveTextureARB         = wine_glActiveTextureARB;
00351         gl_info->glClientActiveTextureARB   = wine_glClientActiveTextureARB;
00352         gl_info->glMultiTexCoord1fARB       = wine_glMultiTexCoord1fARB;
00353         gl_info->glMultiTexCoord1fvARB      = wine_glMultiTexCoord1fvARB;
00354         gl_info->glMultiTexCoord2fARB       = wine_glMultiTexCoord2fARB;
00355         gl_info->glMultiTexCoord2fvARB      = wine_glMultiTexCoord2fvARB;
00356         gl_info->glMultiTexCoord3fARB       = wine_glMultiTexCoord3fARB;
00357         gl_info->glMultiTexCoord3fvARB      = wine_glMultiTexCoord3fvARB;
00358         gl_info->glMultiTexCoord4fARB       = wine_glMultiTexCoord4fARB;
00359         gl_info->glMultiTexCoord4fvARB      = wine_glMultiTexCoord4fvARB;
00360         gl_info->glMultiTexCoord2svARB      = wine_glMultiTexCoord2svARB;
00361         gl_info->glMultiTexCoord4svARB      = wine_glMultiTexCoord4svARB;
00362         if(old_multitex_glGetIntegerv) {
00363             FIXME("GL_ARB_multitexture glGetIntegerv hook already applied\n");
00364         } else {
00365             old_multitex_glGetIntegerv = glGetIntegerv;
00366             glGetIntegerv = wine_glGetIntegerv;
00367         }
00368         if(old_multitex_glGetFloatv) {
00369             FIXME("GL_ARB_multitexture glGetGloatv hook already applied\n");
00370         } else {
00371             old_multitex_glGetFloatv = glGetFloatv;
00372             glGetFloatv = wine_glGetFloatv;
00373         }
00374         if(old_multitex_glGetDoublev) {
00375             FIXME("GL_ARB_multitexture glGetDoublev hook already applied\n");
00376         } else {
00377             old_multitex_glGetDoublev = glGetDoublev;
00378             glGetDoublev = wine_glGetDoublev;
00379         }
00380         gl_info->supported[ARB_MULTITEXTURE] = TRUE;
00381     }
00382 
00383     if (!gl_info->supported[EXT_FOG_COORD])
00384     {
00385         /* This emulation isn't perfect. There are a number of potential problems, but they should
00386          * not matter in practise:
00387          *
00388          * Fog vs fragment shader: If we are using GL_ARB_fragment_program with the fog option, the
00389          * glDisable(GL_FOG) here won't matter. However, if we have GL_ARB_fragment_program, it is pretty
00390          * unlikely that we don't have GL_EXT_fog_coord. Besides, we probably have GL_ARB_vertex_program
00391          * too, which would allow fog coord emulation in a fixed function vertex pipeline replacement.
00392          *
00393          * Fog vs texture: We apply the fog in the vertex color. An app could set up texturing settings which
00394          * ignore the vertex color, thus effectively disabling our fog. However, in D3D this type of fog is
00395          * a per-vertex fog too, so the apps shouldn't do that.
00396          *
00397          * Fog vs lighting: The app could in theory use D3DFOG_NONE table and D3DFOG_NONE vertex fog with
00398          * untransformed vertices. That enables lighting and fog coords at the same time, and the lighting
00399          * calculations could affect the already blended in fog color. There's nothing we can do against that,
00400          * but most apps using fog color do their own lighting too and often even use RHW vertices. So live
00401          * with it.
00402          */
00403         TRACE("Applying GL_ARB_fog_coord emulation hooks\n");
00404 
00405         /* This probably means that the implementation doesn't advertise the extension, but implicitly supports
00406          * it via the GL core version, or someone messed around in the extension table in directx.c. Add version-
00407          * dependent loading for this extension if we ever hit this situation
00408          */
00409         if (gl_info->supported[ARB_FRAGMENT_PROGRAM])
00410         {
00411             FIXME("GL implementation supports GL_ARB_fragment_program but not GL_EXT_fog_coord\n");
00412             FIXME("The fog coord emulation will most likely fail\n");
00413         }
00414         else if (gl_info->supported[ARB_FRAGMENT_SHADER])
00415         {
00416             FIXME("GL implementation supports GL_ARB_fragment_shader but not GL_EXT_fog_coord\n");
00417             FIXME("The fog coord emulation will most likely fail\n");
00418         }
00419 
00420         if(old_fogcoord_glFogi) {
00421             FIXME("GL_EXT_fogcoord glFogi hook already applied\n");
00422         } else {
00423             old_fogcoord_glFogi = glFogi;
00424             glFogi = wine_glFogi;
00425         }
00426         if(old_fogcoord_glFogiv) {
00427             FIXME("GL_EXT_fogcoord glFogiv hook already applied\n");
00428         } else {
00429             old_fogcoord_glFogiv = glFogiv;
00430             glFogiv = wine_glFogiv;
00431         }
00432         if(old_fogcoord_glFogf) {
00433             FIXME("GL_EXT_fogcoord glFogf hook already applied\n");
00434         } else {
00435             old_fogcoord_glFogf = glFogf;
00436             glFogf = wine_glFogf;
00437         }
00438         if(old_fogcoord_glFogfv) {
00439             FIXME("GL_EXT_fogcoord glFogfv hook already applied\n");
00440         } else {
00441             old_fogcoord_glFogfv = glFogfv;
00442             glFogfv = wine_glFogfv;
00443         }
00444         if(old_fogcoord_glEnable) {
00445             FIXME("GL_EXT_fogcoord glEnable hook already applied\n");
00446         } else {
00447             old_fogcoord_glEnable = glEnableWINE;
00448             glEnableWINE = wine_glEnable;
00449         }
00450         if(old_fogcoord_glDisable) {
00451             FIXME("GL_EXT_fogcoord glDisable hook already applied\n");
00452         } else {
00453             old_fogcoord_glDisable = glDisableWINE;
00454             glDisableWINE = wine_glDisable;
00455         }
00456 
00457         if(old_fogcoord_glVertex4f) {
00458             FIXME("GL_EXT_fogcoord glVertex4f hook already applied\n");
00459         } else {
00460             old_fogcoord_glVertex4f = glVertex4f;
00461             glVertex4f = wine_glVertex4f;
00462         }
00463         if(old_fogcoord_glVertex4fv) {
00464             FIXME("GL_EXT_fogcoord glVertex4fv hook already applied\n");
00465         } else {
00466             old_fogcoord_glVertex4fv = glVertex4fv;
00467             glVertex4fv = wine_glVertex4fv;
00468         }
00469         if(old_fogcoord_glVertex3f) {
00470             FIXME("GL_EXT_fogcoord glVertex3f hook already applied\n");
00471         } else {
00472             old_fogcoord_glVertex3f = glVertex3f;
00473             glVertex3f = wine_glVertex3f;
00474         }
00475         if(old_fogcoord_glVertex3fv) {
00476             FIXME("GL_EXT_fogcoord glVertex3fv hook already applied\n");
00477         } else {
00478             old_fogcoord_glVertex3fv = glVertex3fv;
00479             glVertex3fv = wine_glVertex3fv;
00480         }
00481 
00482         if(old_fogcoord_glColor4f) {
00483             FIXME("GL_EXT_fogcoord glColor4f hook already applied\n");
00484         } else {
00485             old_fogcoord_glColor4f = glColor4f;
00486             glColor4f = wine_glColor4f;
00487         }
00488         if(old_fogcoord_glColor4fv) {
00489             FIXME("GL_EXT_fogcoord glColor4fv hook already applied\n");
00490         } else {
00491             old_fogcoord_glColor4fv = glColor4fv;
00492             glColor4fv = wine_glColor4fv;
00493         }
00494         if(old_fogcoord_glColor3f) {
00495             FIXME("GL_EXT_fogcoord glColor3f hook already applied\n");
00496         } else {
00497             old_fogcoord_glColor3f = glColor3f;
00498             glColor3f = wine_glColor3f;
00499         }
00500         if(old_fogcoord_glColor3fv) {
00501             FIXME("GL_EXT_fogcoord glColor3fv hook already applied\n");
00502         } else {
00503             old_fogcoord_glColor3fv = glColor3fv;
00504             glColor3fv = wine_glColor3fv;
00505         }
00506         if(old_fogcoord_glColor4ub) {
00507             FIXME("GL_EXT_fogcoord glColor4ub hook already applied\n");
00508         } else {
00509             old_fogcoord_glColor4ub = glColor4ub;
00510             glColor4ub = wine_glColor4ub;
00511         }
00512 
00513         if(old_fogcoord_glFogCoordfEXT) {
00514             FIXME("GL_EXT_fogcoord glFogCoordfEXT hook already applied\n");
00515         } else {
00516             old_fogcoord_glFogCoordfEXT = gl_info->glFogCoordfEXT;
00517             gl_info->glFogCoordfEXT = wine_glFogCoordfEXT;
00518         }
00519         if(old_fogcoord_glFogCoordfvEXT) {
00520             FIXME("GL_EXT_fogcoord glFogCoordfvEXT hook already applied\n");
00521         } else {
00522             old_fogcoord_glFogCoordfvEXT = gl_info->glFogCoordfvEXT;
00523             gl_info->glFogCoordfvEXT = wine_glFogCoordfvEXT;
00524         }
00525         if(old_fogcoord_glFogCoorddEXT) {
00526             FIXME("GL_EXT_fogcoord glFogCoorddEXT hook already applied\n");
00527         } else {
00528             old_fogcoord_glFogCoorddEXT = gl_info->glFogCoorddEXT;
00529             gl_info->glFogCoorddEXT = wine_glFogCoorddEXT;
00530         }
00531         if(old_fogcoord_glFogCoorddvEXT) {
00532             FIXME("GL_EXT_fogcoord glFogCoorddvEXT hook already applied\n");
00533         } else {
00534             old_fogcoord_glFogCoorddvEXT = gl_info->glFogCoorddvEXT;
00535             gl_info->glFogCoorddvEXT = wine_glFogCoorddvEXT;
00536         }
00537         gl_info->supported[EXT_FOG_COORD] = TRUE;
00538     }
00539 }

Generated on Sat May 26 2012 04:20:48 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.