diff --git a/README b/README index 4506472..c644453 100644 --- a/README +++ b/README @@ -209,6 +209,7 @@ User testimonies: Linux, RedHat 6.1, dual V2, Mesa 3.1 Linux, Debian 2.2, PII 266 CPU, 3Dfx Voodoo3 3000 AGP, Mesa 3.1 Linux, Debian Potato, K6-2, TNT1, ancient nvida glx drivers + Linux 2.2 (Suse 6.1) Pentium-133, 8meg V2, with all targets at 16bpp; Mesa 3.1 Linux 2.2, k6-2-350, quake-x11 -bpp 16 Linux 2.2, k6-2-350, quake-gl mesa 3.1 glide2x voodoo2 8M Linux 2.0, k6-2-266, quake-x11 -bpp 16 diff --git a/TODO b/TODO index a5e25b1..94f7b5e 100644 --- a/TODO +++ b/TODO @@ -50,3 +50,6 @@ to quake-devel@lists.sourceforge.net with details. * Implement mp3 player * Implement mod/s3m/it/xm/etc player * Add compiled shared mod support .dll/.so, q2/q3-style + * Finish Volumetric fog + * Colored lighting for common tasks such as emitting a blue dynamic light + from players with quad damage.. diff --git a/common/gl_rmain.c b/common/gl_rmain.c index 7e72cfe..fd378fc 100644 --- a/common/gl_rmain.c +++ b/common/gl_rmain.c @@ -1164,7 +1164,7 @@ void R_RenderView (void) { double time1 = 0, time2 = 0; // Fixme: the last argument should be a cvar... r_fog_gamma - GLfloat colors[4] = {(GLfloat) 0.0, (GLfloat) 0.0, (GLfloat) 1, (GLfloat) 0.15}; + GLfloat colors[4] = {(GLfloat) 0.0, (GLfloat) 0.0, (GLfloat) 1, (GLfloat) 0.1}; if (r_norefresh.value) return; @@ -1202,20 +1202,34 @@ Eric Windisch: I basicly rewrote what carmack had here to display _much_ prettier. small hack */ + // The volume fog probally will not work yet :) + if(r_volfog.value) + { + + gl_Clear(GL_STENCIL_BUFFER_BIT); + gl_ColorMask(); + glEnable(GL_STENCIL_TEST); + glStencilFunc(GL_ALWAYS, 1, 1); + glStencilOp(GL_KEEP, GL_ZERO, GL_REPLACE); + + glFogi (GL_FOG_MODE, GL_EXP2); + glFogfv (GL_FOG_COLOR, colors); + // fixme: GL_FOG_DENSITY should have r_volfog_density var + glFogf (GL_FOG_DENSITY, 1); + + glEnable(GL_FOG); + //R_RenderScene (); + + R_DrawWaterSurfaces(); + glDisable(GL_FOG); + + glStencilFunc(GL_EQUAL, 1, 1); + glStencilMask(GL_FALSE); + glDisable(GL_DEPTH_TEST); + } + if(r_fog.value) { - // The volume fog probally will not work yet :) - if(r_volfog.value) - { - - glEnable(GL_STENCIL_TEST); - glStencilFunc(GL_ALWAYS, 1, 1); - glStencilOp(GL_KEEP, GL_ZERO, GL_REPLACE); - R_DrawWaterSurfaces(); - glStencilFunc(GL_EQUAL, 1, 1); - glStencilMask(GL_FALSE); - glDisable(GL_DEPTH_TEST); - } // fixme: would be nice if the user could select what fogmode... (r_fog_mode) glFogi (GL_FOG_MODE, GL_EXP2); @@ -1226,10 +1240,12 @@ display _much_ prettier. small hack } +glEnable(GL_STEREO); + R_RenderScene (); R_DrawViewModel (); -if((!r_fog.value)||(!r_volfog.value)) +if(!r_volfog.value) { R_DrawWaterSurfaces (); }