Rune Central

The Official Rune Quake Message Board
It is currently Thu Mar 28, 2024 5:56 am

All times are UTC - 5 hours [ DST ]




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Textureless JoeQuake
PostPosted: Sun Sep 12, 2004 3:44 am 
Offline
quake.intertex.net
User avatar

Joined: Sat Nov 15, 2003 7:39 pm
Posts: 243
Location: Kansas City!
Textureless Quake Tut in Joequake...
Code:
Gl_rmain.c
(add)
int      brushmodel = 0;

(in R_DrawEntitiesOnList add...)

//find this..
         case mod_brush:
         brushmodel = 1; //Add this
         R_DrawBrushModel (currententity);
         brushmodel = 0; //Add this
         break;



gl_draw.c
(add)
cvar_t      textureless = {"textureless", "0"};

(in Draw_Init add:)
         Cvar_RegisterVariable (&textureless);


Gl_surf.c
(add)
         extern cvar_t   textureless;
         extern int      brushmodel;

(in DrawTextureChains...)

Find this code block.....
            for (k = 0; k < s->polys->numverts; k++, v += VERTEXSIZE)
            {
                  if (gl_mtexable)
                  {
//ADD HERE - multitexture textureless world
                     if((textureless.value) && !brushmodel)
                     {                        
                        qglMultiTexCoord2f (GL_TEXTURE0_ARB, 0, 0);
                        qglMultiTexCoord2f (GL_TEXTURE1_ARB, v[5], v[6]);
                        if (mtex_fbs)
                           qglMultiTexCoord2f (GL_TEXTURE2_ARB, 0, 0);
                     }
                     else
                     {
                        qglMultiTexCoord2f (GL_TEXTURE0_ARB, v[3], v[4]);
                        qglMultiTexCoord2f (GL_TEXTURE1_ARB, v[5], v[6]);
                        if (mtex_fbs)
                           qglMultiTexCoord2f (GL_TEXTURE2_ARB, v[3], v[4]);
                     }
                  }
                  else
                  {
                     if((textureless.value) && !brushmodel)
                     {
                        glTexCoord2f (0, 0);
                     }
                     else
                     {
                        glTexCoord2f (v[3], v[4]);
                     }
                  }

               glVertex3fv (v);
            }

This may save some fps and if u use -no24bit and this then it may make some slow machines run that much faster....
who knows...


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: Google [Bot] and 33 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group