diff --git a/include/glquake.h b/include/glquake.h index 4981e14..0bf20ff 100644 --- a/include/glquake.h +++ b/include/glquake.h @@ -239,12 +239,10 @@ void GL_Bind (int texnum); #define TEXTURE0_SGIS 0x835E #define TEXTURE1_SGIS 0x835F -#ifdef _WIN32 typedef void (GLAPIENTRY *lpMTexFUNC) (GLenum, GLfloat, GLfloat); typedef void (GLAPIENTRY *lpSelTexFUNC) (GLenum); extern lpMTexFUNC qglMTexCoord2fSGIS; extern lpSelTexFUNC qglSelectTextureSGIS; -#endif extern qboolean gl_mtexable; diff --git a/source/gl_rsurf.c b/source/gl_rsurf.c index 572ea50..8e66fcd 100644 --- a/source/gl_rsurf.c +++ b/source/gl_rsurf.c @@ -341,10 +341,8 @@ extern float speedscale; // for top sky and bottom sky void DrawGLWaterPoly (glpoly_t *p); void DrawGLWaterPolyLightmap (glpoly_t *p); -#ifdef _WIN32 lpMTexFUNC qglMTexCoord2fSGIS = NULL; lpSelTexFUNC qglSelectTextureSGIS = NULL; -#endif qboolean mtexenabled = false; @@ -382,8 +380,8 @@ void R_DrawSequentialPoly (msurface_t *s) float *v; int i; texture_t *t; -// vec3_t nv; -// glRect_t *theRect; + vec3_t nv; + glRect_t *theRect; // // normal lightmaped poly @@ -392,9 +390,9 @@ void R_DrawSequentialPoly (msurface_t *s) if (! (s->flags & (SURF_DRAWSKY|SURF_DRAWTURB|SURF_UNDERWATER) ) ) { R_RenderDynamicLightmaps (s); - if (0) //gl_mtexable) + if (gl_mtexable) { -/* p = s->polys; + p = s->polys; t = R_TextureAnimation (s->texinfo->texture); // Binds world to texture env 0 @@ -427,7 +425,7 @@ void R_DrawSequentialPoly (msurface_t *s) glVertex3fv (v); } glEnd (); - return; */ + return; } else { p = s->polys; @@ -491,9 +489,9 @@ void R_DrawSequentialPoly (msurface_t *s) // underwater warped with lightmap // R_RenderDynamicLightmaps (s); - if (0) //gl_mtexable) + if (gl_mtexable) { -/* p = s->polys; + p = s->polys; t = R_TextureAnimation (s->texinfo->texture); GL_SelectTexture(TEXTURE0_SGIS); @@ -528,7 +526,6 @@ void R_DrawSequentialPoly (msurface_t *s) glVertex3fv (nv); } glEnd (); -*/ } else { p = s->polys; diff --git a/source/vid_glx.c b/source/vid_glx.c index 1255125..cd8d175 100644 --- a/source/vid_glx.c +++ b/source/vid_glx.c @@ -288,6 +288,11 @@ void VID_SetPalette (unsigned char *palette) } } +void +CheckMultiTextureExtensions ( void ) +{ + gl_mtexable = false; +} /* =============== @@ -308,6 +313,8 @@ void GL_Init (void) // Con_Printf ("%s %s\n", gl_renderer, gl_version); + CheckMultiTextureExtensions (); + glClearColor (0,0,0,0); glCullFace(GL_FRONT); glEnable(GL_TEXTURE_2D); diff --git a/source/vid_wgl.c b/source/vid_wgl.c index 385ff69..6854259 100644 --- a/source/vid_wgl.c +++ b/source/vid_wgl.c @@ -646,7 +646,7 @@ void GL_Init (void) CheckTextureExtensions (); CheckMultiTextureExtensions (); - glClearColor (1,0,0,0); + glClearColor (0,0,0,0); glCullFace(GL_FRONT); glEnable(GL_TEXTURE_2D);