From 51e1267f4538e7ce99289fdc3a898e8f7068488c Mon Sep 17 00:00:00 2001 From: Joseph Carter Date: Wed, 12 Apr 2000 23:58:17 +0000 Subject: [PATCH] uh, you don't want this yet. I'm screwing around with skyboxes and this code doesn't work as advertised. Reverting. --- common/gl_warp.c | 66 ------------------------------------------------ 1 file changed, 66 deletions(-) diff --git a/common/gl_warp.c b/common/gl_warp.c index 5158b73..ce6ae82 100644 --- a/common/gl_warp.c +++ b/common/gl_warp.c @@ -724,63 +724,6 @@ ClipSkyPolygon (int nump, vec3_t vecs, int stage) { 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 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] ; inumverts ; 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 */ @@ -894,12 +837,6 @@ R_DrawSkyBox ( void ) glColor4f (1,1,1,0.5); glDisable (GL_DEPTH_TEST); #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++) { if (skymins[0][i] >= skymaxs[0][i] @@ -920,9 +857,6 @@ R_DrawSkyBox ( void ) MakeSkyVec (skymaxs[0][i], skymins[1][i], i); glEnd (); } - - glDepthRange (0.0, 1.0); // we need our depth buffer ! --KB - #if 0 glDisable (GL_BLEND); glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);