mirror of
https://git.code.sf.net/p/quake/quakeforge-old
synced 2024-11-12 23:44:21 +00:00
uh, you don't want this yet. I'm screwing around with skyboxes and this
code doesn't work as advertised. Reverting.
This commit is contained in:
parent
d0fa63e804
commit
51e1267f45
1 changed files with 0 additions and 66 deletions
|
@ -724,63 +724,6 @@ ClipSkyPolygon (int nump, vec3_t vecs, int stage) {
|
||||||
ClipSkyPolygon (newc[1], newv[1][0], stage+1);
|
ClipSkyPolygon (newc[1], newv[1][0], stage+1);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
void
|
|
||||||
EmitSkyboxPolys ( msurface_t *fa )
|
|
||||||
{
|
|
||||||
glpoly_t *p;
|
|
||||||
float *v;
|
|
||||||
int i, axis, nump;
|
|
||||||
float s, t;
|
|
||||||
vec3_t dir, av, vp;
|
|
||||||
float length;
|
|
||||||
// vec3_t verts[MAX_CLIP_VERTS];
|
|
||||||
|
|
||||||
for (p=fa->polys ; p ; p=p->next)
|
|
||||||
{
|
|
||||||
v=p->verts[0] ;
|
|
||||||
nump = p->numverts;
|
|
||||||
|
|
||||||
// decide which face it maps to
|
|
||||||
for (i=0, vp=vecs ; i<nump ; i++, vp+=3) {
|
|
||||||
VectorAdd (vp, v, v);
|
|
||||||
}
|
|
||||||
av[0] = fabs(v[0]);
|
|
||||||
av[1] = fabs(v[1]);
|
|
||||||
av[2] = fabs(v[2]);
|
|
||||||
if (av[0] > av[1] && av[0] > av[2]) {
|
|
||||||
axis = (v[0] < 0) ? 1 : 0;
|
|
||||||
} else if (av[1] > av[2] && av[1] > av[0]) {
|
|
||||||
axis = (v[1] < 0) ? 3 : 2;
|
|
||||||
} else {
|
|
||||||
axis = (v[2] < 0) ? 5 : 4;
|
|
||||||
}
|
|
||||||
|
|
||||||
glBegin (GL_POLYGON);
|
|
||||||
for (i=0,v=p->verts[0] ; i<p->numverts ; i++, v+=VERTEXSIZE)
|
|
||||||
{
|
|
||||||
VectorSubtract (v, r_origin, dir);
|
|
||||||
dir[2] *= 3; // flatten the sphere
|
|
||||||
|
|
||||||
length = dir[0]*dir[0] + dir[1]*dir[1] + dir[2]*dir[2];
|
|
||||||
length = sqrt (length);
|
|
||||||
length = 6*63/length;
|
|
||||||
|
|
||||||
dir[0] *= length;
|
|
||||||
dir[1] *= length;
|
|
||||||
|
|
||||||
s = (speedscale + dir[0]) * (1.0/128);
|
|
||||||
t = (speedscale + dir[1]) * (1.0/128);
|
|
||||||
|
|
||||||
glTexCoord2f (s, t);
|
|
||||||
glVertex3fv (v);
|
|
||||||
}
|
|
||||||
glEnd ();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
R_DrawSkyChain
|
R_DrawSkyChain
|
||||||
*/
|
*/
|
||||||
|
@ -894,12 +837,6 @@ R_DrawSkyBox ( void )
|
||||||
glColor4f (1,1,1,0.5);
|
glColor4f (1,1,1,0.5);
|
||||||
glDisable (GL_DEPTH_TEST);
|
glDisable (GL_DEPTH_TEST);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// make sure skybox is always "infinite distance" from camera, maybe
|
|
||||||
// makes some of the ClipSkyPolygon stuff need to go away. --KB
|
|
||||||
glDepthRange (1.0, 1.0);
|
|
||||||
|
|
||||||
glDepthRange (1.0, 1.0);
|
|
||||||
for (i=0 ; i<6 ; i++)
|
for (i=0 ; i<6 ; i++)
|
||||||
{
|
{
|
||||||
if (skymins[0][i] >= skymaxs[0][i]
|
if (skymins[0][i] >= skymaxs[0][i]
|
||||||
|
@ -920,9 +857,6 @@ R_DrawSkyBox ( void )
|
||||||
MakeSkyVec (skymaxs[0][i], skymins[1][i], i);
|
MakeSkyVec (skymaxs[0][i], skymins[1][i], i);
|
||||||
glEnd ();
|
glEnd ();
|
||||||
}
|
}
|
||||||
|
|
||||||
glDepthRange (0.0, 1.0); // we need our depth buffer ! --KB
|
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
glDisable (GL_BLEND);
|
glDisable (GL_BLEND);
|
||||||
glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
|
glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
|
||||||
|
|
Loading…
Reference in a new issue