34 #define NUMVERTEXNORMALS 162
49 #define SHADEDOT_QUANT 16
63 for (
i=0 ;
i < nverts;
i++,
v++, ov++, lerp+=4 )
67 lerp[0] = move[0] + ov->v[0]*backv[0] +
v->v[0]*frontv[0] + normal[0] *
POWERSUIT_SCALE;
68 lerp[1] = move[1] + ov->v[1]*backv[1] +
v->v[1]*frontv[1] + normal[1] *
POWERSUIT_SCALE;
69 lerp[2] = move[2] + ov->v[2]*backv[2] +
v->v[2]*frontv[2] + normal[2] *
POWERSUIT_SCALE;
74 for (
i=0 ;
i < nverts;
i++,
v++, ov++, lerp+=4)
76 lerp[0] = move[0] + ov->v[0]*backv[0] +
v->v[0]*frontv[0];
77 lerp[1] = move[1] + ov->v[1]*backv[1] +
v->v[1]*frontv[1];
78 lerp[2] = move[2] + ov->v[2]*backv[2] +
v->v[2]*frontv[2];
101 vec3_t move, delta, vectors[3];
113 ov = oldframe->
verts;
127 qglDisable( GL_TEXTURE_2D );
129 frontlerp = 1.0 - backlerp;
141 for (
i=0 ;
i<3 ;
i++)
143 move[
i] = backlerp*move[
i] + frontlerp*frame->
translate[
i];
146 for (
i=0 ;
i<3 ;
i++)
148 frontv[
i] = frontlerp*frame->
scale[
i];
149 backv[
i] = backlerp*oldframe->
scale[
i];
160 qglEnableClientState( GL_VERTEX_ARRAY );
161 qglVertexPointer( 3, GL_FLOAT, 16,
s_lerped );
171 qglEnableClientState( GL_COLOR_ARRAY );
172 qglColorPointer( 3, GL_FLOAT, 0, colorArray );
187 if ( qglLockArraysEXT != 0 )
188 qglLockArraysEXT( 0, paliashdr->
num_xyz );
199 qglBegin (GL_TRIANGLE_FAN);
203 qglBegin (GL_TRIANGLE_STRIP);
211 index_xyz =
order[2];
214 qglVertex3fv(
s_lerped[index_xyz] );
223 qglTexCoord2f (((
float *)
order)[0], ((
float *)
order)[1]);
224 index_xyz =
order[2];
232 qglArrayElement( index_xyz );
239 if ( qglUnlockArraysEXT != 0 )
240 qglUnlockArraysEXT();
253 qglBegin (GL_TRIANGLE_FAN);
257 qglBegin (GL_TRIANGLE_STRIP);
264 index_xyz =
order[2];
277 qglTexCoord2f (((
float *)
order)[0], ((
float *)
order)[1]);
278 index_xyz =
order[2];
296 qglEnable( GL_TEXTURE_2D );
323 verts = frame->
verts;
333 qglEnable(GL_STENCIL_TEST);
334 qglStencilFunc(GL_EQUAL, 1, 2);
335 qglStencilOp(GL_KEEP, GL_KEEP, GL_INCR);
347 qglBegin (GL_TRIANGLE_FAN);
350 qglBegin (GL_TRIANGLE_STRIP);
367 qglVertex3fv (point);
380 qglDisable(GL_STENCIL_TEST);
394 vec3_t thismins, oldmins, thismaxs, oldmaxs;
424 if ( pframe == poldframe )
426 for (
i = 0;
i < 3;
i++ )
429 maxs[
i] = mins[
i] + pframe->
scale[
i]*255;
434 for (
i = 0;
i < 3;
i++ )
437 thismaxs[
i] = thismins[
i] + pframe->
scale[
i]*255;
440 oldmaxs[
i] = oldmins[
i] + poldframe->
scale[
i]*255;
442 if ( thismins[
i] < oldmins[
i] )
443 mins[
i] = thismins[
i];
445 mins[
i] = oldmins[
i];
447 if ( thismaxs[
i] > oldmaxs[
i] )
448 maxs[
i] = thismaxs[
i];
450 maxs[
i] = oldmaxs[
i];
457 for (
i = 0;
i < 8;
i++ )
483 angles[
YAW] = -angles[
YAW];
484 AngleVectors( angles, vectors[0], vectors[1], vectors[2] );
486 for (
i = 0;
i < 8;
i++ )
500 int p, f, aggregatemask = ~0;
502 for ( p = 0; p < 8; p++ )
506 for ( f = 0; f < 4; f++ )
510 if ( ( dp -
frustum[f].dist ) < 0 )
516 aggregatemask &=
mask;
649 for (
i=0 ;
i<3 ;
i++)
696 for (
i=0 ;
i<3 ;
i++)
713 for (
i=0 ;
i<3 ;
i++)
757 qglMatrixMode( GL_PROJECTION );
760 qglScalef( -1, 1, 1 );
762 qglMatrixMode( GL_MODELVIEW );
764 qglCullFace( GL_BACK );
792 qglShadeModel (GL_SMOOTH);
797 qglEnable (GL_BLEND);
824 qglShadeModel (GL_FLAT);
829 qglDisable( GL_CULL_FACE );
830 qglPolygonMode( GL_FRONT_AND_BACK, GL_LINE );
831 qglDisable( GL_TEXTURE_2D );
832 qglBegin( GL_TRIANGLE_STRIP );
833 for (
i = 0;
i < 8;
i++ )
835 qglVertex3fv( bbox[
i] );
838 qglEnable( GL_TEXTURE_2D );
839 qglPolygonMode( GL_FRONT_AND_BACK, GL_FILL );
840 qglEnable( GL_CULL_FACE );
845 qglMatrixMode( GL_PROJECTION );
847 qglMatrixMode( GL_MODELVIEW );
848 qglCullFace( GL_FRONT );
853 qglDisable (GL_BLEND);
866 qglRotatef(e->
angles[1], 0, 0, 1);
868 qglDisable (GL_TEXTURE_2D);
869 qglEnable (GL_BLEND);
870 qglColor4f (0,0,0,0.5);
872 qglEnable (GL_TEXTURE_2D);
873 qglDisable (GL_BLEND);
877 qglColor4f (1,1,1,1);