mirror of
https://git.code.sf.net/p/quake/newtree
synced 2024-11-25 21:41:57 +00:00
This adds multitexture for win32 back into the game.
This commit is contained in:
parent
8d08bc4d86
commit
19afb34084
4 changed files with 15 additions and 13 deletions
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue