mirror of
https://git.code.sf.net/p/quake/quakeforge-old
synced 2025-01-19 07:00:58 +00:00
*** empty log message ***
This commit is contained in:
parent
37dab64154
commit
b5c66ceb00
5 changed files with 1203 additions and 3 deletions
1168
standalone/gl_rmain.c
Normal file
1168
standalone/gl_rmain.c
Normal file
File diff suppressed because it is too large
Load diff
|
@ -84,6 +84,7 @@ cvar_t r_mirroralpha = {"r_mirroralpha","1"};
|
|||
cvar_t r_wateralpha = {"r_wateralpha","1"};
|
||||
cvar_t r_dynamic = {"r_dynamic","1"};
|
||||
cvar_t r_novis = {"r_novis","0"};
|
||||
cvar_t r_fog = {"r_fog", "0"};
|
||||
|
||||
cvar_t gl_finish = {"gl_finish","0"};
|
||||
cvar_t gl_clear = {"gl_clear","0"};
|
||||
|
@ -1085,8 +1086,15 @@ r_refdef must be set before the first call
|
|||
*/
|
||||
void R_RenderView (void)
|
||||
{
|
||||
//<<<<<<< gl_rmain.c
|
||||
// double time1, time2;
|
||||
//=======
|
||||
double time1 = 0, time2 = 0;
|
||||
// GLfloat colors[4] = {(GLfloat) 0.0, (GLfloat) 0.0, (GLfloat) 1, (GLfloat) 0.20};
|
||||
//>>>>>>> 1.3
|
||||
|
||||
// Fixme: the last argument should be a cvar... r_fog_gamma
|
||||
GLfloat colors[4] = {(GLfloat) 0.0, (GLfloat) 0.0, (GLfloat) 1, (GLfloat) 0.10};
|
||||
|
||||
if (r_norefresh.value)
|
||||
return;
|
||||
|
@ -1119,12 +1127,28 @@ void R_RenderView (void)
|
|||
glEnable(GL_FOG);
|
||||
********************************************/
|
||||
|
||||
/*
|
||||
Eric Windisch: I basicly rewrote what carmack had here to
|
||||
display _much_ prettier. small hack
|
||||
*/
|
||||
|
||||
if(r_fog.value) {
|
||||
|
||||
// fixme: would be nice if the user could select what fogmode... (r_fog_mode)
|
||||
// and if they want fog or not... (r_fog)
|
||||
glFogi (GL_FOG_MODE, GL_EXP2);
|
||||
glFogfv (GL_FOG_COLOR, colors);
|
||||
// fixme: GL_FOG_DENSITY should have r_fog_density cvar
|
||||
glFogf (GL_FOG_DENSITY, .0005);
|
||||
glEnable(GL_FOG);
|
||||
}
|
||||
|
||||
R_RenderScene ();
|
||||
R_DrawViewModel ();
|
||||
R_DrawWaterSurfaces ();
|
||||
|
||||
// More fog right here :)
|
||||
// glDisable(GL_FOG);
|
||||
glDisable(GL_FOG);
|
||||
// End of all fog code...
|
||||
|
||||
// render mirror view
|
||||
|
|
|
@ -187,6 +187,8 @@ void R_Init (void)
|
|||
Cvar_RegisterVariable (&r_dynamic);
|
||||
Cvar_RegisterVariable (&r_novis);
|
||||
Cvar_RegisterVariable (&r_speeds);
|
||||
Cvar_RegisterVariable (&r_fog);
|
||||
Cvar_RegisterVariable (&r_waterwarp);
|
||||
|
||||
Cvar_RegisterVariable (&gl_finish);
|
||||
Cvar_RegisterVariable (&gl_clear);
|
||||
|
|
|
@ -50,6 +50,8 @@ glRect_t lightmap_rectchange[MAX_LIGHTMAPS];
|
|||
|
||||
int allocated[MAX_LIGHTMAPS][BLOCK_WIDTH];
|
||||
|
||||
cvar_t r_waterwarp = {"r_waterwarp", "1"};
|
||||
|
||||
// the lightmap texture data needs to be kept in
|
||||
// main memory so texsubimage can update properly
|
||||
byte lightmaps[4*MAX_LIGHTMAPS*BLOCK_WIDTH*BLOCK_HEIGHT];
|
||||
|
@ -319,7 +321,8 @@ void R_DrawSequentialPoly (msurface_t *s)
|
|||
//
|
||||
// normal lightmaped poly
|
||||
//
|
||||
if (! (s->flags & (SURF_DRAWSKY|SURF_DRAWTURB|SURF_UNDERWATER) ) )
|
||||
if (! (s->flags &
|
||||
(SURF_DRAWSKY|SURF_DRAWTURB|(SURF_UNDERWATER*!(int)!r_waterwarp.value)) ) )
|
||||
{
|
||||
p = s->polys;
|
||||
|
||||
|
@ -419,7 +422,8 @@ void R_DrawSequentialPoly (msurface_t *s)
|
|||
// normal lightmaped poly
|
||||
//
|
||||
|
||||
if (! (s->flags & (SURF_DRAWSKY|SURF_DRAWTURB|SURF_UNDERWATER) ) )
|
||||
if (! (s->flags &
|
||||
(SURF_DRAWSKY|SURF_DRAWTURB|(SURF_UNDERWATER*!(int)!r_waterwarp.value)) ) )
|
||||
{
|
||||
R_RenderDynamicLightmaps (s);
|
||||
if (gl_mtexable) {
|
||||
|
|
|
@ -199,6 +199,8 @@ extern cvar_t r_mirroralpha;
|
|||
extern cvar_t r_wateralpha;
|
||||
extern cvar_t r_dynamic;
|
||||
extern cvar_t r_novis;
|
||||
extern cvar_t r_fog;
|
||||
extern cvar_t r_waterwarp;
|
||||
|
||||
extern cvar_t gl_clear;
|
||||
extern cvar_t gl_cull;
|
||||
|
|
Loading…
Reference in a new issue