mirror of
https://git.code.sf.net/p/quake/newtree
synced 2024-11-29 07:12:30 +00:00
Fixed the GL water texture problem..
This commit is contained in:
parent
72ef6959b9
commit
66e9bfd98c
2 changed files with 33 additions and 14 deletions
2
ROADMAP
2
ROADMAP
|
@ -3,7 +3,7 @@ X = done
|
||||||
? = maybe but not likely
|
? = maybe but not likely
|
||||||
|
|
||||||
o it seems possible to crash a QF server still - need to fix this!
|
o it seems possible to crash a QF server still - need to fix this!
|
||||||
o water textures are seriously screwed in GL
|
X water textures are seriously screwed in GL
|
||||||
o GL is still way too slow
|
o GL is still way too slow
|
||||||
X R_DrawParticles in software hangs
|
X R_DrawParticles in software hangs
|
||||||
o Draw_Pic and friends need a cleanup in GL at least
|
o Draw_Pic and friends need a cleanup in GL at least
|
||||||
|
|
|
@ -778,8 +778,8 @@ void DrawTextureChains (void)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// if ((s->flags & SURF_DRAWTURB) && r_wateralpha->value != 1.0)
|
if ((s->flags & SURF_DRAWTURB) && r_wateralpha->value != 1.0)
|
||||||
// continue; // draw translucent water later
|
continue; // draw translucent water later
|
||||||
for ( ; s ; s=s->texturechain)
|
for ( ; s ; s=s->texturechain)
|
||||||
R_RenderBrushPoly (s);
|
R_RenderBrushPoly (s);
|
||||||
}
|
}
|
||||||
|
@ -914,10 +914,19 @@ R_RecursiveWorldNode
|
||||||
void R_RecursiveWorldNode (mnode_t *node)
|
void R_RecursiveWorldNode (mnode_t *node)
|
||||||
{
|
{
|
||||||
int c, side;
|
int c, side;
|
||||||
|
mplane_t *plane;
|
||||||
msurface_t *surf, **mark;
|
msurface_t *surf, **mark;
|
||||||
mleaf_t *pleaf;
|
mleaf_t *pleaf;
|
||||||
double dot;
|
double dot;
|
||||||
|
|
||||||
|
if (node->contents == CONTENTS_SOLID)
|
||||||
|
return; // solid
|
||||||
|
|
||||||
|
if (node->visframe != r_visframecount)
|
||||||
|
return;
|
||||||
|
if (R_CullBox (node->minmaxs, node->minmaxs+3))
|
||||||
|
return;
|
||||||
|
|
||||||
// if a leaf node, draw stuff
|
// if a leaf node, draw stuff
|
||||||
if (node->contents < 0)
|
if (node->contents < 0)
|
||||||
{
|
{
|
||||||
|
@ -943,19 +952,21 @@ void R_RecursiveWorldNode (mnode_t *node)
|
||||||
// node is just a decision point, so go down the apropriate sides
|
// node is just a decision point, so go down the apropriate sides
|
||||||
|
|
||||||
// find which side of the node we are on
|
// find which side of the node we are on
|
||||||
switch (node->plane->type)
|
plane = node->plane;
|
||||||
|
|
||||||
|
switch (plane->type)
|
||||||
{
|
{
|
||||||
case PLANE_X:
|
case PLANE_X:
|
||||||
dot = modelorg[0] - node->plane->dist;
|
dot = modelorg[0] - plane->dist;
|
||||||
break;
|
break;
|
||||||
case PLANE_Y:
|
case PLANE_Y:
|
||||||
dot = modelorg[1] - node->plane->dist;
|
dot = modelorg[1] - plane->dist;
|
||||||
break;
|
break;
|
||||||
case PLANE_Z:
|
case PLANE_Z:
|
||||||
dot = modelorg[2] - node->plane->dist;
|
dot = modelorg[2] - plane->dist;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
dot = DotProduct (modelorg, node->plane->normal) - node->plane->dist;
|
dot = DotProduct (modelorg, plane->normal) - plane->dist;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -985,12 +996,20 @@ void R_RecursiveWorldNode (mnode_t *node)
|
||||||
continue; // wrong side
|
continue; // wrong side
|
||||||
|
|
||||||
// if sorting by texture, just store it out
|
// if sorting by texture, just store it out
|
||||||
if (gl_texsort->value)
|
if (gl_texsort->value) {
|
||||||
{
|
if (!mirror || surf->texinfo->texture !=
|
||||||
|
cl.worldmodel->textures[mirrortexturenum]) {
|
||||||
|
|
||||||
surf->texturechain = surf->texinfo->texture->texturechain;
|
surf->texturechain = surf->texinfo->texture->texturechain;
|
||||||
surf->texinfo->texture->texturechain = surf;
|
surf->texinfo->texture->texturechain = surf;
|
||||||
}
|
}
|
||||||
else
|
} else if (surf->flags & SURF_DRAWSKY) {
|
||||||
|
surf->texturechain = skychain;
|
||||||
|
skychain = surf;
|
||||||
|
} else if (surf->flags & SURF_DRAWTURB) {
|
||||||
|
surf->texturechain = waterchain;
|
||||||
|
waterchain = surf;
|
||||||
|
} else
|
||||||
R_DrawSequentialPoly (surf);
|
R_DrawSequentialPoly (surf);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue