Quake II RTX doxygen
1.0 dev
|
|
Go to the documentation of this file.
146 for (i = 0; i <
CYCLE * 2; i++) {
236 Com_DPrintf(
"R_Init( %i )\n", total);
245 Com_DPrintf(
"ref_soft " VERSION
", " __DATE__
"\n");
282 Com_DPrintf(
"R_Shutdown( %i )\n", total);
377 byte vis[VIS_MAX_BYTES];
407 for (i = 0, leaf =
r_worldmodel->leafs; i < r_worldmodel->numleafs; i++, leaf++) {
408 cluster = leaf->cluster;
411 if (Q_IsBitSet(vis, cluster)) {
412 node = (mnode_t *)leaf;
436 qboolean translucent_entities = 0;
442 if ((
currententity->flags & RF_TRANSLUCENT) == translucent) {
443 translucent_entities++;
475 Com_Error(ERR_FATAL,
"%s: bad model type", __func__);
479 return translucent_entities;
489 int translucent_entities;
495 if (translucent_entities) {
508 int i, *pindex, clipflags;
509 vec3_t acceptpt, rejectpt;
514 for (i = 0; i < 4; i++) {
521 rejectpt[0] = minmaxs[pindex[0]];
522 rejectpt[1] = minmaxs[pindex[1]];
523 rejectpt[2] = minmaxs[pindex[2]];
531 acceptpt[0] = minmaxs[pindex[3 + 0]];
532 acceptpt[1] = minmaxs[pindex[3 + 1]];
533 acceptpt[2] = minmaxs[pindex[3 + 2]];
539 clipflags |= (1 << i);
562 if (((mleaf_t *)node)->contents != CONTENTS_SOLID)
568 sides = BoxOnPlaneSideFast(mins, maxs, node->plane);
570 if (sides == BOX_INTERSECTS)
574 if (sides & BOX_INFRONT)
575 node = node->children[0];
577 node = node->children[1];
592 vec3_t tmins, vec3_t tmaxs)
598 if (!angles[0] && !angles[1] && !angles[2]) {
599 VectorCopy(mins, tmins);
600 VectorCopy(maxs, tmaxs);
604 for (i = 0; i < 3; i++) {
611 for (i = 0; i < 8; i++) {
628 VectorScale(
forward, tmp[0], v);
629 VectorMA(v, -tmp[1],
right, v);
630 VectorMA(v, tmp[2],
up, v);
632 for (j = 0; j < 3; j++) {
648 int i, index, clipflags;
665 if (!(index & 0x80000000)) {
670 Com_Error(ERR_DROP,
"%s: inline model %d out of range",
674 if (model->numfaces == 0)
702 if (topnode->plane) {
808 Com_Error(ERR_FATAL,
"R_RenderView: NULL worldmodel");
852 Com_Printf(
"Short roughly %d edges\n",
r_outofedges * 2 / 3);
873 #define NUM_BEAM_SEGS 6
879 vec3_t direction, normalized_direction;
883 oldorigin[0] = e->oldorigin[0];
884 oldorigin[1] = e->oldorigin[1];
885 oldorigin[2] = e->oldorigin[2];
891 normalized_direction[0] = direction[0] = oldorigin[0] -
origin[0];
892 normalized_direction[1] = direction[1] = oldorigin[1] -
origin[1];
893 normalized_direction[2] = direction[2] = oldorigin[2] -
origin[2];
898 PerpendicularVector(perpvec, normalized_direction);
899 VectorScale(perpvec, e->frame / 2, perpvec);
904 VectorAdd(start_points[i],
origin, start_points[i]);
905 VectorAdd(start_points[i], direction, end_points[i]);
908 if (e->skinnum == -1)
909 color.u32 = e->rgba.u32;
byte * IMG_ReadPixels(int *width, int *height, int *rowbytes)
void R_ShutdownImages(void)
void R_DrawParticles(void)
static void R_DrawNullModel(void)
static void RotatedBBox(vec3_t mins, vec3_t maxs, vec3_t angles, vec3_t tmins, vec3_t tmaxs)
model_t * MOD_ForHandle(qhandle_t h)
void Cmd_AddCommand(const char *name, xcommand_t function)
cvar_t * Cvar_Get(const char *var_name, const char *var_value, int flags)
static mnode_t * R_FindTopnode(vec3_t mins, vec3_t maxs)
byte * BSP_ClusterVis(bsp_t *bsp, byte *mask, int cluster, int vis)
static void R_Register(void)
void R_PrintAliasStats(void)
int r_frustum_indexes[4 *6]
cvar_t * sw_surfcacheoverride
#define BMODEL_FULLY_CLIPPED
uint32_t d_8to24table[256]
void R_Shutdown(qboolean total)
void R_DrawBeam(entity_t *e)
static int R_DrawEntities(int translucent)
void R_BeginEdgeFrame(void)
unsigned Sys_Milliseconds(void)
cvar_t * sw_reportedgeout
void R_AliasDrawModel(void)
static void R_DrawBEntitiesOnList(void)
static void R_UnRegister(void)
qboolean R_Init(qboolean total)
void Com_Error(error_type_t type, const char *fmt,...)
void BSP_Free(bsp_t *bsp)
void Cmd_RemoveCommand(const char *name)
int intsintable[CYCLE *2]
void R_DrawSubmodelPolygons(mmodel_t *pmodel, int clipflags, mnode_t *topnode)
void R_DrawAlphaSurfaces(void)
void R_ApplySIRDAlgorithum(void)
byte * d_spantable[MAXHEIGHT]
void R_RenderFrame(refdef_t *fd)
void AngleVectors(vec3_t angles, vec3_t forward, vec3_t right, vec3_t up)
short * d_zspantable[MAXHEIGHT]
void R_TransformFrustum(void)
static void R_MarkLeaves(void)
void R_AddDecal(decal_t *d)
void RotatePointAroundVector(vec3_t dst, const vec3_t dir, const vec3_t point, float degrees)
static int R_BmodelCheckBBox(float *minmaxs)
byte r_warpbuffer[WARP_WIDTH *WARP_HEIGHT *VID_BYTES]
void R_ModeChanged(int width, int height, int flags, int rowbytes, void *pixels)
void R_RotateBmodel(void)
int Cvar_ClampInteger(cvar_t *var, int min, int max)
void(* R_SetClipRect)(const clipRect_t *clip)
static void R_EdgeDrawing(void)
cvar_t * sw_reportsurfout
void VID_BeginFrame(void)
void R_IMFlatShadedQuad(vec3_t a, vec3_t b, vec3_t c, vec3_t d, color_t color, float alpha)
int * pfrustum_indexes[4]
void R_DrawSolidClippedSubmodelPolygons(mmodel_t *pmodel, mnode_t *topnode)
void R_MarkLights(mnode_t *headnode)
clipplane_t view_clipplanes[4]
vec_t VectorNormalize(vec3_t v)
static void R_DrawEntitiesOnList(void)