[quake2] Q2 Max Working
Ludwig Nussel
ludwig.nussel at gmx.de
Sun Jun 16 08:53:42 EDT 2002
Brendan Burns wrote:
> I've never tried compiling against Mesa 4, If there in Mesa's headers I
> think you can safely comment them out in ours. I'll put in a check
> before the defines.
The appended patch solves the problem for me. It's still necessary
to recode src/ref_candygl/gl_image.c to unix format to make it
compile.
ref_glx doesn't work:
------- Loading ref_glx.so -------
LoadLibrary("ref_glx.so") failed: ./ref_glx.so: undefined symbol: glGetIntegerv
sdlgl works but the menu and console font either doesn't exist or
has the same color as the background. The red "fog" that appears
occasionally looks really ugly and causes massive slowdowns (Nvidia
TNT2).
cu
Ludwig
--
(o_ Ludwig.Nussel at gmx.de
//\ PGP Key ID: FF8135CE
V_/_ ICQ: 52166811
-------------- next part --------------
? .gl_rsurf.c.swp
? .swp
Index: gl_image.c
===================================================================
RCS file: /cvs/cvsroot/quake2/src/ref_candygl/gl_image.c,v
retrieving revision 1.1
diff -u -r1.1 gl_image.c
--- gl_image.c 2002/06/15 13:51:44 1.1
+++ gl_image.c 2002/06/16 11:41:46
@@ -75,17 +75,17 @@
if ( enable )
{
- GL_SelectTexture( GL_TEXTURE1 );
+ GL_SelectTexture( QGL_TEXTURE1 );
qglEnable( GL_TEXTURE_2D );
GL_TexEnv( GL_REPLACE );
}
else
{
- GL_SelectTexture( GL_TEXTURE1 );
+ GL_SelectTexture( QGL_TEXTURE1 );
qglDisable( GL_TEXTURE_2D );
GL_TexEnv( GL_REPLACE );
}
- GL_SelectTexture( GL_TEXTURE0 );
+ GL_SelectTexture( QGL_TEXTURE0 );
GL_TexEnv( GL_REPLACE );
}
@@ -96,7 +96,7 @@
if ( !qglSelectTextureSGIS && !qglActiveTextureARB )
return;
- if ( texture == GL_TEXTURE0 )
+ if ( texture == QGL_TEXTURE0 )
{
tmu = 0;
}
@@ -150,7 +150,7 @@
void GL_MBind( GLenum target, int texnum )
{
GL_SelectTexture( target );
- if ( target == GL_TEXTURE0 )
+ if ( target == QGL_TEXTURE0 )
{
if ( gl_state.currenttextures[0] == texnum )
return;
Index: gl_rmain.c
===================================================================
RCS file: /cvs/cvsroot/quake2/src/ref_candygl/gl_rmain.c,v
retrieving revision 1.2
diff -u -r1.2 gl_rmain.c
--- gl_rmain.c 2002/06/15 17:51:52 1.2
+++ gl_rmain.c 2002/06/16 11:41:47
@@ -29,7 +29,7 @@
refimport_t ri;
-int GL_TEXTURE0, GL_TEXTURE1;
+int QGL_TEXTURE0, QGL_TEXTURE1;
model_t *r_worldmodel;
@@ -2002,8 +2002,8 @@
qglMTexCoord2fSGIS = ( void * ) qwglGetProcAddress( "glMultiTexCoord2fARB" );
qglActiveTextureARB = ( void * ) qwglGetProcAddress( "glActiveTextureARB" );
qglClientActiveTextureARB = ( void * ) qwglGetProcAddress( "glClientActiveTextureARB" );
- GL_TEXTURE0 = GL_TEXTURE0_ARB;
- GL_TEXTURE1 = GL_TEXTURE1_ARB;
+ QGL_TEXTURE0 = GL_TEXTURE0_ARB;
+ QGL_TEXTURE1 = GL_TEXTURE1_ARB;
}
else
{
@@ -2026,8 +2026,8 @@
ri.Con_Printf( PRINT_ALL, "...using GL_SGIS_multitexture\n" );
qglMTexCoord2fSGIS = ( void * ) qwglGetProcAddress( "glMTexCoord2fSGIS" );
qglSelectTextureSGIS = ( void * ) qwglGetProcAddress( "glSelectTextureSGIS" );
- GL_TEXTURE0 = GL_TEXTURE0_SGIS;
- GL_TEXTURE1 = GL_TEXTURE1_SGIS;
+ QGL_TEXTURE0 = GL_TEXTURE0_SGIS;
+ QGL_TEXTURE1 = GL_TEXTURE1_SGIS;
}
else
{
Index: gl_rsurf.c
===================================================================
RCS file: /cvs/cvsroot/quake2/src/ref_candygl/gl_rsurf.c,v
retrieving revision 1.1
diff -u -r1.1 gl_rsurf.c
--- gl_rsurf.c 2002/06/15 13:51:44 1.1
+++ gl_rsurf.c 2002/06/16 11:41:48
@@ -720,8 +720,8 @@
qglBegin (GL_POLYGON);
for (i=0, poly=v ; i< nv; i++, poly+= VERTEXSIZE)
{
- qglMTexCoord2fSGIS( GL_TEXTURE0, (poly[3]+scroll), poly[4]);
- qglMTexCoord2fSGIS( GL_TEXTURE1, poly[5], poly[6]);
+ qglMTexCoord2fSGIS( QGL_TEXTURE0, (poly[3]+scroll), poly[4]);
+ qglMTexCoord2fSGIS( QGL_TEXTURE1, poly[5], poly[6]);
qglVertex3fv (poly);
}
qglEnd ();
@@ -772,7 +772,7 @@
R_BuildLightMap( surf, (void *)temp, smax*4 );
R_SetCacheState( surf );
- GL_MBind( GL_TEXTURE1, gl_state.lightmap_textures + surf->lightmaptexturenum );
+ GL_MBind( QGL_TEXTURE1, gl_state.lightmap_textures + surf->lightmaptexturenum );
lmtex = surf->lightmaptexturenum;
@@ -790,7 +790,7 @@
R_BuildLightMap( surf, (void *)temp, smax*4 );
- GL_MBind( GL_TEXTURE1, gl_state.lightmap_textures + 0 );
+ GL_MBind( QGL_TEXTURE1, gl_state.lightmap_textures + 0 );
lmtex = 0;
@@ -804,8 +804,8 @@
c_brush_polys++;
- GL_MBind( GL_TEXTURE0, image->texnum );
- GL_MBind( GL_TEXTURE1, gl_state.lightmap_textures + lmtex );
+ GL_MBind( QGL_TEXTURE0, image->texnum );
+ GL_MBind( QGL_TEXTURE1, gl_state.lightmap_textures + lmtex );
//==========
//PGM
@@ -838,8 +838,8 @@
{
c_brush_polys++;
- GL_MBind( GL_TEXTURE0, image->texnum );
- GL_MBind( GL_TEXTURE1, gl_state.lightmap_textures + lmtex );
+ GL_MBind( QGL_TEXTURE0, image->texnum );
+ GL_MBind( QGL_TEXTURE1, gl_state.lightmap_textures + lmtex );
//==========
//PGM
@@ -1011,9 +1011,9 @@
e->angles[2] = -e->angles[2]; // stupid quake bug
GL_EnableMultitexture( true );
- GL_SelectTexture( GL_TEXTURE0);
+ GL_SelectTexture( QGL_TEXTURE0);
GL_TexEnv( GL_REPLACE );
- GL_SelectTexture( GL_TEXTURE1);
+ GL_SelectTexture( QGL_TEXTURE1);
GL_TexEnv( GL_MODULATE );
R_DrawInlineBModel ();
@@ -1225,9 +1225,9 @@
{
GL_EnableMultitexture( true );
- GL_SelectTexture( GL_TEXTURE0);
+ GL_SelectTexture( QGL_TEXTURE0);
GL_TexEnv( GL_REPLACE );
- GL_SelectTexture( GL_TEXTURE1);
+ GL_SelectTexture( QGL_TEXTURE1);
if ( gl_lightmap->value )
GL_TexEnv( GL_REPLACE );
@@ -1623,7 +1623,7 @@
r_framecount = 1; // no dlightcache
GL_EnableMultitexture( true );
- GL_SelectTexture( GL_TEXTURE1);
+ GL_SelectTexture( QGL_TEXTURE1);
/*
** setup the base lightstyles so the lightmaps won't have to be regenerated
Index: qgl.h
===================================================================
RCS file: /cvs/cvsroot/quake2/src/ref_candygl/qgl.h,v
retrieving revision 1.1
diff -u -r1.1 qgl.h
--- qgl.h 2002/06/15 13:51:44 1.1
+++ qgl.h 2002/06/16 11:41:48
@@ -478,9 +478,14 @@
#define GL_TEXTURE0_SGIS 0x835E
#define GL_TEXTURE1_SGIS 0x835F
-#define GL_TEXTURE0_ARB 0x84C0
-#define GL_TEXTURE1_ARB 0x84C1
-extern int GL_TEXTURE0, GL_TEXTURE1;
+#ifndef GL_TEXTURE0_ARB
+# define GL_TEXTURE0_ARB 0x84C0
+#endif
+#ifndef GL_TEXTURE1_ARB
+# define GL_TEXTURE1_ARB 0x84C1
+#endif
+
+extern int QGL_TEXTURE0, QGL_TEXTURE1;
#endif
More information about the quake2
mailing list