| 
    Quake II RTX doxygen
    1.0 dev
    
   | 
           
 | 
 
 
 
 
Go to the source code of this file.
◆ BBOX_MUST_CLIP_XY
      
        
          | #define BBOX_MUST_CLIP_XY   1 | 
        
      
 
 
◆ BBOX_MUST_CLIP_Z
      
        
          | #define BBOX_MUST_CLIP_Z   2 | 
        
      
 
 
◆ BBOX_TRIVIAL_ACCEPT
      
        
          | #define BBOX_TRIVIAL_ACCEPT   0 | 
        
      
 
 
◆ BBOX_TRIVIAL_REJECT
      
        
          | #define BBOX_TRIVIAL_REJECT   8 | 
        
      
 
 
◆ R_AliasCheckBBox()
  
  
      
        
          | static qboolean R_AliasCheckBBox  | 
          ( | 
          void  | 
           | ) | 
           | 
         
       
   | 
  
static   | 
  
 
 
◆ R_AliasCheckFrameBBox()
  
  
      
        
          | static unsigned long R_AliasCheckFrameBBox  | 
          ( | 
          maliasframe_t *  | 
          frame,  | 
         
        
           | 
           | 
          float  | 
          worldxf[3][4]  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
static   | 
  
 
Definition at line 68 of file alias.c.
   70     unsigned long aggregate_and_clipcode = ~0U,
 
   71                   aggregate_or_clipcode = 0;
 
   74     vec3_t        transformed_min, transformed_max;
 
   75     qboolean      zclipped = qfalse, zfullyclipped = qtrue;
 
   80     for (i = 0; i < 3; i++) {
 
   82         maxs[i] = mins[i] + frame->
scale[i] * 255;
 
   92         zfullyclipped = qfalse;
 
   94         zfullyclipped = qfalse;
 
  106     for (i = 0; i < 8; i++) {
 
  108         vec3_t   tmp, transformed;
 
  109         unsigned long clipcode = 0;
 
  128         for (j = 0; j < 4; j++) {
 
  135         aggregate_and_clipcode &= clipcode;
 
  136         aggregate_or_clipcode  |= clipcode;
 
  139     if (aggregate_and_clipcode) {
 
  142     if (!aggregate_or_clipcode) {
 
 
Referenced by R_AliasCheckBBox().
 
 
◆ R_AliasDrawModel()
Definition at line 674 of file alias.c.
  679     if ((
currententity->flags & (RF_WEAPONMODEL | RF_LEFTHAND)) == (RF_WEAPONMODEL | RF_LEFTHAND))
 
  709         s_ziscale = (float)0x8000 * (
float)0x10000 * 3.0;
 
  711         s_ziscale = (float)0x8000 * (
float)0x10000;
 
  716     if ((
currententity->flags & (RF_WEAPONMODEL | RF_LEFTHAND)) == (RF_WEAPONMODEL | RF_LEFTHAND))
 
 
Referenced by R_DrawEntities().
 
 
◆ R_AliasPreparePoints()
  
  
      
        
          | static void R_AliasPreparePoints  | 
          ( | 
          void  | 
           | ) | 
           | 
         
       
   | 
  
static   | 
  
 
Definition at line 274 of file alias.c.
  296     if ((
currententity->flags & (RF_WEAPONMODEL | RF_LEFTHAND)) == (RF_WEAPONMODEL | RF_LEFTHAND)) {
 
  298             pfv[0] = &pfinalverts[ptri->
index_xyz[0]];
 
  299             pfv[1] = &pfinalverts[ptri->
index_xyz[1]];
 
  300             pfv[2] = &pfinalverts[ptri->
index_xyz[2]];
 
  302             if (pfv[0]->flags & pfv[1]->flags & pfv[2]->flags)
 
  306             pfv[0]->
s = pstverts[ptri->
index_st[0]].
s << 16;
 
  307             pfv[0]->
t = pstverts[ptri->
index_st[0]].
t << 16;
 
  309             pfv[1]->
s = pstverts[ptri->
index_st[1]].
s << 16;
 
  310             pfv[1]->
t = pstverts[ptri->
index_st[1]].
t << 16;
 
  312             pfv[2]->
s = pstverts[ptri->
index_st[2]].
s << 16;
 
  313             pfv[2]->
t = pstverts[ptri->
index_st[2]].
t << 16;
 
  315             if (!(pfv[0]->flags | pfv[1]->flags | pfv[2]->flags)) {
 
  328             pfv[0] = &pfinalverts[ptri->
index_xyz[0]];
 
  329             pfv[1] = &pfinalverts[ptri->
index_xyz[1]];
 
  330             pfv[2] = &pfinalverts[ptri->
index_xyz[2]];
 
  332             if (pfv[0]->flags & pfv[1]->flags & pfv[2]->flags)
 
  336             pfv[0]->
s = pstverts[ptri->
index_st[0]].
s << 16;
 
  337             pfv[0]->
t = pstverts[ptri->
index_st[0]].
t << 16;
 
  339             pfv[1]->
s = pstverts[ptri->
index_st[1]].
s << 16;
 
  340             pfv[1]->
t = pstverts[ptri->
index_st[1]].
t << 16;
 
  342             pfv[2]->
s = pstverts[ptri->
index_st[2]].
s << 16;
 
  343             pfv[2]->
t = pstverts[ptri->
index_st[2]].
t << 16;
 
  345             if (!(pfv[0]->flags | pfv[1]->flags | pfv[2]->flags)) {
 
 
Referenced by R_AliasDrawModel().
 
 
◆ R_AliasProjectAndClipTestFinalVert()
◆ R_AliasSetupBlend()
Definition at line 612 of file alias.c.
  635         if (mask == RF_SHELL_RED)
 
  637         else if (mask == RF_SHELL_GREEN)
 
  639         else if (mask == RF_SHELL_BLUE)
 
  641         else if (mask == (RF_SHELL_RED | RF_SHELL_GREEN))
 
  643         else if (mask == (RF_SHELL_RED | RF_SHELL_BLUE))
 
  645         else if (mask == (RF_SHELL_BLUE | RF_SHELL_GREEN))
 
  647         else if (mask == RF_SHELL_DOUBLE)
 
  649         else if (mask == RF_SHELL_HALF_DAM)
 
 
Referenced by R_AliasDrawModel().
 
 
◆ R_AliasSetupFrames()
Definition at line 550 of file alias.c.
  555     if (thisframe >= 
currentmodel->numframes || thisframe < 0) {
 
  556         Com_DPrintf(
"%s: %s: no such thisframe %d\n",
 
  560     if (lastframe >= 
currentmodel->numframes || lastframe < 0) {
 
  561         Com_DPrintf(
"%s: %s: no such lastframe %d\n",
 
 
Referenced by R_AliasDrawModel().
 
 
◆ R_AliasSetUpLerpData()
  
  
      
        
          | static void R_AliasSetUpLerpData  | 
          ( | 
          float  | 
          backlerp | ) | 
           | 
         
       
   | 
  
static   | 
  
 
Definition at line 575 of file alias.c.
  578     vec3_t  translation, vectors[3];
 
  596     r_lerp_move[0] =  DotProduct(translation, vectors[0]);  
 
  597     r_lerp_move[1] = -DotProduct(translation, vectors[1]);  
 
  598     r_lerp_move[2] =  DotProduct(translation, vectors[2]);  
 
  602     for (i = 0; i < 3; i++) {
 
  606     for (i = 0; i < 3; i++) {
 
 
Referenced by R_AliasDrawModel().
 
 
◆ R_AliasSetupLighting()
  
  
      
        
          | static void R_AliasSetupLighting  | 
          ( | 
          void  | 
           | ) | 
           | 
         
       
   | 
  
static   | 
  
 
Definition at line 491 of file alias.c.
  493     float           cp, cy, sp, sy;
 
  500         VectorSet(light, 1, 1, 1);
 
  506         for (i = 0; i < 3; i++)
 
  517         for (i = 0; i < 3; i++) {
 
  518             min = light[i] * 0.8;
 
  525     for (i = 0; i < 3; i++)
 
  526         clamp(light[i], 0, 1);
 
 
Referenced by R_AliasDrawModel().
 
 
◆ R_AliasSetupSkin()
Definition at line 454 of file alias.c.
  463         if ((skinnum >= 
currentmodel->numskins) || (skinnum < 0)) {
 
  464             Com_DPrintf(
"R_AliasSetupSkin %s: no such skin # %d\n",
 
  471     if (pskindesc == NULL ||
 
  474         Com_DPrintf(
"R_AliasSetupSkin %s: bad skin %p\n",
 
 
Referenced by R_AliasDrawModel().
 
 
◆ R_AliasSetUpTransform()
  
  
      
        
          | static void R_AliasSetUpTransform  | 
          ( | 
          void  | 
           | ) | 
           | 
         
       
   | 
  
static   | 
  
 
Definition at line 387 of file alias.c.
  390     float           viewmatrix[3][4];
 
  407     for (i = 0; i < 3; i++) {
 
  427     VectorCopy(
vright, viewmatrix[0]);
 
  428     VectorCopy(
vup, viewmatrix[1]);
 
  429     VectorNegate(viewmatrix[1], viewmatrix[1]);
 
  430     VectorCopy(
vpn, viewmatrix[2]);
 
  432     viewmatrix[0][3] = 0;
 
  433     viewmatrix[1][3] = 0;
 
  434     viewmatrix[2][3] = 0;
 
 
Referenced by R_AliasDrawModel().
 
 
◆ R_AliasTransformFinalVerts()
Definition at line 219 of file alias.c.
  223     for (i = 0; i < numpoints; i++, 
fv++, oldv++, newv++) {
 
  225         const vec_t *plightnormal;
 
  232         plightnormal = 
bytedirs[newv->lightnormalindex];
 
  238                 WEAPONSHELL_SCALE : POWERSUIT_SCALE;
 
  240             lerped_vert[0] += plightnormal[0] * scale;
 
  241             lerped_vert[1] += plightnormal[1] * scale;
 
  242             lerped_vert[2] += plightnormal[2] * scale;
 
  256         fv->l = 0x8000 + (
int)(0x7fff * lightcos);
 
 
Referenced by R_AliasPreparePoints().
 
 
◆ R_AliasTransformVector()
  
  
      
        
          | static void R_AliasTransformVector  | 
          ( | 
          vec3_t  | 
          in,  | 
         
        
           | 
           | 
          vec3_t  | 
          out,  | 
         
        
           | 
           | 
          float  | 
          xf[3][4]  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
static   | 
  
 
Definition at line 55 of file alias.c.
   57     out[0] = DotProduct(in, xf[0]) + xf[0][3];
 
   58     out[1] = DotProduct(in, xf[1]) + xf[1][3];
 
   59     out[2] = DotProduct(in, xf[2]) + xf[2][3];
 
 
Referenced by R_AliasCheckFrameBBox().
 
 
◆ R_ConcatTransforms()
  
  
      
        
          | static void R_ConcatTransforms  | 
          ( | 
          float  | 
          in1[3][4],  | 
         
        
           | 
           | 
          float  | 
          in2[3][4],  | 
         
        
           | 
           | 
          float  | 
          out[3][4]  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
static   | 
  
 
Definition at line 365 of file alias.c.
  367     out[0][0] = in1[0][0] * in2[0][0] + in1[0][1] * in2[1][0] + in1[0][2] * in2[2][0];
 
  368     out[0][1] = in1[0][0] * in2[0][1] + in1[0][1] * in2[1][1] + in1[0][2] * in2[2][1];
 
  369     out[0][2] = in1[0][0] * in2[0][2] + in1[0][1] * in2[1][2] + in1[0][2] * in2[2][2];
 
  370     out[0][3] = in1[0][0] * in2[0][3] + in1[0][1] * in2[1][3] + in1[0][2] * in2[2][3] + in1[0][3];
 
  371     out[1][0] = in1[1][0] * in2[0][0] + in1[1][1] * in2[1][0] + in1[1][2] * in2[2][0];
 
  372     out[1][1] = in1[1][0] * in2[0][1] + in1[1][1] * in2[1][1] + in1[1][2] * in2[2][1];
 
  373     out[1][2] = in1[1][0] * in2[0][2] + in1[1][1] * in2[1][2] + in1[1][2] * in2[2][2];
 
  374     out[1][3] = in1[1][0] * in2[0][3] + in1[1][1] * in2[1][3] + in1[1][2] * in2[2][3] + in1[1][3];
 
  375     out[2][0] = in1[2][0] * in2[0][0] + in1[2][1] * in2[1][0] + in1[2][2] * in2[2][0];
 
  376     out[2][1] = in1[2][0] * in2[0][1] + in1[2][1] * in2[1][1] + in1[2][2] * in2[2][1];
 
  377     out[2][2] = in1[2][0] * in2[0][2] + in1[2][1] * in2[1][2] + in1[2][2] * in2[2][2];
 
  378     out[2][3] = in1[2][0] * in2[0][3] + in1[2][1] * in2[1][3] + in1[2][2] * in2[2][3] + in1[2][3];
 
 
Referenced by R_AliasSetUpTransform().
 
 
◆ aliasoldworldtransform
  
  
      
        
          | float aliasoldworldtransform[3][4] | 
         
       
   | 
  
static   | 
  
 
 
◆ aliastransform
  
  
      
        
          | float aliastransform[3][4] | 
         
       
   | 
  
static   | 
  
 
 
◆ aliasworldtransform
  
  
      
        
          | float aliasworldtransform[3][4] | 
         
       
   | 
  
static   | 
  
 
 
◆ r_affinetridesc
◆ r_alias_alpha
◆ r_alias_one_minus_alpha
      
        
          | int r_alias_one_minus_alpha | 
        
      
 
 
◆ r_aliasblendcolor
      
        
          | fixed8_t r_aliasblendcolor[3] | 
        
      
 
 
◆ r_amodels_drawn
◆ r_lastframe
◆ r_lerp_backv
◆ r_lerp_frontv
◆ r_lerp_move
◆ r_plightvec
◆ r_thisframe
◆ s_alias_forward
◆ s_alias_right
◆ s_alias_up
◆ s_ziscale
 
 
#define ALIAS_Z_CLIP_PLANE
 
static void R_ConcatTransforms(float in1[3][4], float in2[3][4], float out[3][4])
 
void R_PolysetDrawSpans8_Opaque(spanpackage_t *pspanpackage)
 
static void R_AliasSetupLighting(void)
 
unsigned short index_xyz[3]
 
void R_PolysetDrawSpansConstant8_Blended(spanpackage_t *pspanpackage)
 
static void R_AliasTransformVector(vec3_t in, vec3_t out, float xf[3][4])
 
#define BBOX_TRIVIAL_REJECT
 
static float aliasoldworldtransform[3][4]
 
static void R_AliasSetUpTransform(void)
 
fixed8_t r_aliasblendcolor[3]
 
void(* R_LightPoint)(vec3_t origin, vec3_t light)
 
unsigned short index_st[3]
 
void R_PolysetDrawSpans8_Blended(spanpackage_t *pspanpackage)
 
static vec3_t r_lerp_backv
 
static void R_AliasPreparePoints(void)
 
static void R_AliasSetUpLerpData(float backlerp)
 
static float aliasworldtransform[3][4]
 
void R_AliasClipTriangle(finalvert_t *index0, finalvert_t *index1, finalvert_t *index2)
 
#define BBOX_MUST_CLIP_XY
 
uint32_t d_8to24table[256]
 
static vec3_t r_plightvec
 
static void R_AliasSetupBlend(void)
 
#define ALIAS_BOTTOM_CLIP
 
static vec3_t r_lerp_move
 
static void R_AliasSetupSkin(void)
 
static vec3_t r_lerp_frontv
 
static void R_AliasTransformFinalVerts(int numpoints, finalvert_t *fv, maliasvert_t *oldv, maliasvert_t *newv)
 
static void R_AliasSetupFrames(void)
 
void AngleVectors(vec3_t angles, vec3_t forward, vec3_t right, vec3_t up)
 
void(APIENTRY *qwglDrawBuffer)(GLenum mode)
 
void(* d_pdrawspans)(spanpackage_t *pspanpackage)
 
static float aliastransform[3][4]
 
#define BBOX_TRIVIAL_ACCEPT
 
static maliasframe_t * r_thisframe
 
static vec3_t s_alias_forward
 
int r_alias_one_minus_alpha
 
static maliasframe_t * r_lastframe
 
void R_DrawTriangle(void)
 
static vec3_t s_alias_right
 
affinetridesc_t r_affinetridesc
 
image_t * IMG_ForHandle(qhandle_t h)
 
CONST PIXELFORMATDESCRIPTOR int
 
void R_AliasProjectAndClipTestFinalVert(finalvert_t *fv)
 
const vec3_t bytedirs[NUMVERTEXNORMALS]
 
static qboolean R_AliasCheckBBox(void)
 
aliastriangleparms_t aliastriangleparms
 
clipplane_t view_clipplanes[4]
 
static unsigned long R_AliasCheckFrameBBox(maliasframe_t *frame, float worldxf[3][4])