Rune Central http://forums.runequake.com/ |
|
Textureless JoeQuake http://forums.runequake.com/viewtopic.php?f=9&t=512 |
Page 1 of 1 |
Author: | sputnikutah [ Sun Sep 12, 2004 3:44 am ] |
Post subject: | Textureless JoeQuake |
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... |
Page 1 of 1 | All times are UTC - 5 hours [ DST ] |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |