Commiter   : knghtbrd
CVSROOT    : /cvsroot/twilight
Module     : twilight
Commit time: 2001-10-28 19:09:29 UTC

Modified files:
     nq/vid_sdl.c qw/gl_rsurf.c qw/vid_sdl.c

Log message:

Fix my own fuckup in vid_sdl.c - we now once again define both gl_mtex and
gl_mtexcombine if you have them both, but we also make sure that combine
can't be enabled without mtex.  Appropriate changes to gl_rsurf were made,
we still have fullbright bmodels and I'll be damned if I can see why.

---------------------- diff included ----------------------
Index: twilight/nq/vid_sdl.c
diff -u twilight/nq/vid_sdl.c:1.73 twilight/nq/vid_sdl.c:1.74
--- twilight/nq/vid_sdl.c:1.73  Tue Nov 27 15:20:30 2001
+++ twilight/nq/vid_sdl.c       Wed Nov 28 11:09:19 2001
@@ -24,7 +24,7 @@
 
 */
 static const char rcsid[] =
-    "$Id: vid_sdl.c,v 1.73 2001/11/27 23:20:30 knghtbrd Exp $";
+    "$Id: vid_sdl.c,v 1.74 2001/11/28 19:09:19 knghtbrd Exp $";
 
 #ifdef HAVE_CONFIG_H
 # include <config.h>
@@ -203,32 +203,32 @@
 void
 CheckExtensions (void)
 {
-       qboolean        gl_mtexable = 0, gl_mtexcombine_arb = 0, gl_mtexcombine_ext = 
0;
+       qboolean        gl_mtexcombine_arb = 0, gl_mtexcombine_ext = 0;
 
        if (!COM_CheckParm ("-nomtex")) {
-               gl_mtexable = DGL_HasExtension ("GL_ARB_multitexture");
+               gl_mtex = DGL_HasExtension ("GL_ARB_multitexture");
        }
        Con_Printf ("Checking for multitexture... %s\n",
-                       gl_mtexable ? "GL_ARB_multitexture." : "no.");
+                       gl_mtex ? "GL_ARB_multitexture." : "no.");
 
-       if (gl_mtexable && !COM_CheckParm ("-nomtexcombine")) {
+       if (gl_mtex && (!qglActiveTextureARB || !qglMultiTexCoord2fARB)) {
+               Sys_Error ("Missing GL_ARB_multitexture functions. (%p %p)\n",
+                               qglActiveTextureARB, qglMultiTexCoord2fARB);
+       }
+
+       if (gl_mtex && !COM_CheckParm ("-nomtexcombine")) {
                gl_mtexcombine_arb = DGL_HasExtension ("GL_ARB_texture_env_combine");
                gl_mtexcombine_ext = DGL_HasExtension ("GL_EXT_texture_env_combine");
-               Con_Printf ("Checking for texenv combine... ");
-               if (gl_mtexcombine_arb) {
-                       Con_Printf ("GL_ARB_texture_env_combine.\n");
-                       gl_mtexcombine = true;
-               } else if (gl_mtexcombine_ext) {
-                       Con_Printf ("GL_EXT_texture_env_combine.\n");
-                       gl_mtexcombine = true;
-               } else {
-                       Con_Printf ("no.\n");
-               }
        }
-
-       if (gl_mtexable && (!qglActiveTextureARB || !qglMultiTexCoord2fARB)) {
-               Sys_Error ("Missing GL_ARB_multitexture functions. (%p %p)\n",
-                               qglActiveTextureARB, qglMultiTexCoord2fARB);
+       Con_Printf ("Checking for texenv combine... ");
+       if (gl_mtex && gl_mtexcombine_arb) {
+               Con_Printf ("GL_ARB_texture_env_combine.\n");
+               gl_mtexcombine = true;
+       } else if (gl_mtex && gl_mtexcombine_ext) {
+               Con_Printf ("GL_EXT_texture_env_combine.\n");
+               gl_mtexcombine = true;
+       } else {
+               Con_Printf ("no.\n");
        }
 
        if (!COM_CheckParm ("-nocva"))
Index: twilight/qw/gl_rsurf.c
diff -u twilight/qw/gl_rsurf.c:1.66 twilight/qw/gl_rsurf.c:1.67
--- twilight/qw/gl_rsurf.c:1.66 Sun Nov 25 09:12:26 2001
+++ twilight/qw/gl_rsurf.c      Wed Nov 28 11:09:19 2001
@@ -23,7 +23,7 @@
 
 */
 static const char rcsid[] =
-    "$Id: gl_rsurf.c,v 1.66 2001/11/25 17:12:26 eviltypeguy Exp $";
+    "$Id: gl_rsurf.c,v 1.67 2001/11/28 19:09:19 knghtbrd Exp $";
 
 #ifdef HAVE_CONFIG_H
 # include <config.h>
@@ -582,7 +582,7 @@
                }
        }
 
-       if (gl_mtex || gl_mtexcombine)
+       if (gl_mtex)
        {
                qglDisable (GL_BLEND);
                if (gl_mtexcombine)
@@ -797,7 +797,7 @@
                if (psurf->visframe == r_framecount)
                {
                        t = R_TextureAnimation(psurf->texinfo->texture);
-                       if (gl_mtex || gl_mtexcombine)
+                       if (gl_mtex)
                        {
                                if (texnum != t->gl_texturenum)
                                {
@@ -820,7 +820,7 @@
                }
        }
 
-       if (gl_mtex || gl_mtexcombine) {
+       if (gl_mtex) {
                if (gl_mtexcombine)
                        qglTexEnvf (GL_TEXTURE_ENV, GL_RGB_SCALE_ARB, 1.0);
                qglTexEnvf (GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
Index: twilight/qw/vid_sdl.c
diff -u twilight/qw/vid_sdl.c:1.81 twilight/qw/vid_sdl.c:1.82
--- twilight/qw/vid_sdl.c:1.81  Tue Nov 27 15:20:30 2001
+++ twilight/qw/vid_sdl.c       Wed Nov 28 11:09:19 2001
@@ -24,7 +24,7 @@
 
 */
 static const char rcsid[] =
-    "$Id: vid_sdl.c,v 1.81 2001/11/27 23:20:30 knghtbrd Exp $";
+    "$Id: vid_sdl.c,v 1.82 2001/11/28 19:09:19 knghtbrd Exp $";
 
 #ifdef HAVE_CONFIG_H
 # include <config.h>
@@ -203,32 +203,32 @@
 void
 CheckExtensions (void)
 {
-       qboolean        gl_mtexable = 0, gl_mtexcombine_arb = 0, gl_mtexcombine_ext = 
0;
+       qboolean        gl_mtexcombine_arb = 0, gl_mtexcombine_ext = 0;
 
        if (!COM_CheckParm ("-nomtex")) {
-               gl_mtexable = DGL_HasExtension ("GL_ARB_multitexture");
+               gl_mtex = DGL_HasExtension ("GL_ARB_multitexture");
        }
        Con_Printf ("Checking for multitexture... %s\n",
-                       gl_mtexable ? "GL_ARB_multitexture." : "no.");
+                       gl_mtex ? "GL_ARB_multitexture." : "no.");
 
-       if (gl_mtexable && !COM_CheckParm ("-nomtexcombine")) {
+       if (gl_mtex && (!qglActiveTextureARB || !qglMultiTexCoord2fARB)) {
+               Sys_Error ("Missing GL_ARB_multitexture functions. (%p %p)\n",
+                               qglActiveTextureARB, qglMultiTexCoord2fARB);
+       }
+
+       if (gl_mtex && !COM_CheckParm ("-nomtexcombine")) {
                gl_mtexcombine_arb = DGL_HasExtension ("GL_ARB_texture_env_combine");
                gl_mtexcombine_ext = DGL_HasExtension ("GL_EXT_texture_env_combine");
-               Con_Printf ("Checking for texenv combine... ");
-               if (gl_mtexcombine_arb) {
-                       Con_Printf ("GL_ARB_texture_env_combine.\n");
-                       gl_mtexcombine = true;
-               } else if (gl_mtexcombine_ext) {
-                       Con_Printf ("GL_EXT_texture_env_combine.\n");
-                       gl_mtexcombine = true;
-               } else {
-                       Con_Printf ("no.\n");
-               }
        }
-
-       if (gl_mtexable && (!qglActiveTextureARB || !qglMultiTexCoord2fARB)) {
-               Sys_Error ("Missing GL_ARB_multitexture functions. (%p %p)\n",
-                               qglActiveTextureARB, qglMultiTexCoord2fARB);
+       Con_Printf ("Checking for texenv combine... ");
+       if (gl_mtex && gl_mtexcombine_arb) {
+               Con_Printf ("GL_ARB_texture_env_combine.\n");
+               gl_mtexcombine = true;
+       } else if (gl_mtex && gl_mtexcombine_ext) {
+               Con_Printf ("GL_EXT_texture_env_combine.\n");
+               gl_mtexcombine = true;
+       } else {
+               Con_Printf ("no.\n");
        }
 
        if (!COM_CheckParm ("-nocva"))
----------------------- End of diff -----------------------

_______________________________________________
twilight-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/twilight-devel

Reply via email to