Go to the documentation of this file.
158 #define STRINGER(x) "x"
225 for (m = 0; m < 4; m++)
228 for (
y = 0;
y < (16 >> m);
y++)
229 for (
x = 0;
x < (16 >> m);
x++)
231 if ((
y < (8 >> m)) ^ (
x < (8 >> m)))
250 for (
i = 0;
i < 4200;
i++)
503 if (vis[cluster >> 3] & (1 << (cluster & 7)))
519 if (vis[
i>>3] & (1<<(
i&7)))
551 qboolean translucent_entities =
false;
563 translucent_entities =
true;
602 if (!translucent_entities)
656 int i, *pindex, clipflags;
657 vec3_t acceptpt, rejectpt;
662 for (
i = 0;
i < 4;
i++)
670 rejectpt[0] = minmaxs[pindex[0]];
671 rejectpt[1] = minmaxs[pindex[1]];
672 rejectpt[2] = minmaxs[pindex[2]];
680 acceptpt[0] = minmaxs[pindex[3 + 0]];
681 acceptpt[1] = minmaxs[pindex[3 + 1]];
682 acceptpt[2] = minmaxs[pindex[3 + 2]];
688 clipflags |= (1 <<
i);
723 splitplane = node->
plane;
751 if (!angles[0] && !angles[1] && !angles[2])
758 for (
i = 0;
i < 3;
i++)
766 for (
i = 0;
i < 8;
i++)
788 for (
j = 0;
j < 3;
j++)
956 byte palette[256][4], *in, *out;
958 float alpha, one_minus_alpha;
982 one_minus_alpha = (1.0 -
alpha);
986 for (
i = 0;
i < 256;
i++, in += 4, out += 4)
988 for (
j = 0;
j<3;
j++)
990 v = premult[
j] + one_minus_alpha * in[
j];
1172 void SetStereoBuffer(
int buf);
1181 SetStereoBuffer((camera_separation <= 0.0) ? 0 : 1);
1261 for (
i = 0;
i < 256;
i++)
1276 byte palette32[1024];
1285 for (
j = 0;
j <
w;
j++)
1293 for (
i = 0;
i < 256;
i++)
1295 palette32[
i * 4 + 0] = palette[
i * 3 + 0];
1296 palette32[
i * 4 + 1] = palette[
i * 3 + 1];
1297 palette32[
i * 4 + 2] = palette[
i * 3 + 2];
1298 palette32[
i * 4 + 3] = 0xFF;
1323 for (
i = 0;
i < 256;
i++)
1328 for (
i = 0;
i < 256;
i++)
1330 inf = 255 * pow((
i + 0.5) / 255.5, g) + 0.5;
1344 #define NUM_BEAM_SEGS 6
1349 vec3_t direction, normalized_direction;
1351 vec3_t oldorigin, origin;
1357 origin[0] = e->
origin[0];
1358 origin[1] = e->
origin[1];
1359 origin[2] = e->
origin[2];
1361 normalized_direction[0] = direction[0] = oldorigin[0] - origin[0];
1362 normalized_direction[1] = direction[1] = oldorigin[1] - origin[1];
1363 normalized_direction[2] = direction[2] = oldorigin[2] - origin[2];
1374 VectorAdd(start_points[
i], origin, start_points[
i]);
1375 VectorAdd(start_points[
i], direction, end_points[
i]);
1398 char *
suf[6] = {
"rt",
"bk",
"lf",
"ft",
"up",
"dn" };
1410 for (
i = 0;
i < 6;
i++)
1435 for (
i=0 ;
i<256 ;
i++, out+=4)
1497 #ifndef REF_HARD_LINKED
1504 va_start(argptr,
error);
1505 vsnprintf(text, 1024,
error, argptr);
1516 va_start(argptr, fmt);
1517 vsnprintf (text, 1024, fmt, argptr);
mvertex_t * r_pcurrentvertbase
struct image_s *(* RegisterSkin)(char *name)
refexport_t GetRefAPI(refimport_t rimp)
mtexinfo_t r_skytexinfo[6]
void(* Cmd_RemoveCommand)(char *name)
cvar_t * sw_reportedgeout
void R_BeginEdgeFrame(void)
void R_DrawBeam(entity_t *e)
unsigned d_8to24tabble[256]
#define VectorSubtract(a, b, c)
void R_ShutdownImages(void)
void R_BeginRegistration(char *map)
int R_BmodelCheckBBox(float *minmaxs)
cvar_t * sw_reportsurfout
void Sys_MakeCodeWriteable(unsigned long startaddr, unsigned long length)
void R_ScreenShot_f(void)
#define BOX_ON_PLANE_SIDE(emins, emaxs, p)
void R_PushDlights(model_t *model)
void Draw_StretchRaw(int x, int y, int w, int h, int cols, int rows, byte *data)
void R_SurfacePatch(void)
#define BMODEL_FULLY_CLIPPED
void R_SetSky(char *name, float rotate, vec3_t axis)
void(* DrawStretchRaw)(int x, int y, int w, int h, int cols, int rows, byte *data)
void R_InitGraphics(int width, int height)
unsigned d_8to24table[256]
struct image_s *(* RegisterPic)(char *name)
void(* DrawFill)(int x, int y, int w, int h, int c)
void R_LightPoint(vec3_t p, vec3_t color)
cvar_t *(* Cvar_Get)(char *name, char *value, int flags)
void VectorScale(vec3_t in, vec_t scale, vec3_t out)
cvar_t * sw_surfcacheoverride
image_t * R_FindImage(char *name, imagetype_t type)
void SWimp_AppActivate(qboolean active)
void SWimp_Shutdown(void)
byte r_notexture_buffer[1024]
struct mnode_s * children[2]
void R_DrawSolidClippedSubmodelPolygons(model_t *pmodel, mnode_t *topnode)
void(* AppActivate)(qboolean activate)
image_t * r_notexture_mip
void(* EndRegistration)(void)
qboolean R_Init(void *hInstance, void *wndProc)
void SWimp_SetPalette(const unsigned char *palette)
void Draw_GetPalette(void)
int r_frustum_indexes[4 *6]
void AngleVectors(vec3_t angles, vec3_t forward, vec3_t right, vec3_t up)
void Draw_InitRGBMap(void)
void(* Con_Printf)(int print_level, char *str,...)
void R_SetLightLevel(void)
void(* DrawFadeScreen)(void)
void RotatedBBox(vec3_t mins, vec3_t maxs, vec3_t angles, vec3_t tmins, vec3_t tmaxs)
void Draw_FadeScreen(void)
void R_DrawEntitiesOnList(void)
void SWimp_EndFrame(void)
void Draw_InitLocal(void)
void R_InitTextures(void)
void(* Cmd_AddCommand)(char *name, void(*cmd)(void))
float verticalFieldOfView
void R_GammaCorrectAndSetPalette(const unsigned char *palette)
void PerpendicularVector(vec3_t dst, const vec3_t src)
void R_RotateBmodel(void)
void R_DrawParticles(void)
void(* Sys_Error)(int err_level, char *str,...)
void R_PrintAliasStats(void)
void Draw_TileClear(int x, int y, int w, int h, char *name)
static int error(vorb *f, enum STBVorbisError e)
vec_t VectorNormalize(vec3_t v)
void(* DrawGetPicSize)(int *w, int *h, char *name)
void(* CinematicSetPalette)(const unsigned char *palette)
rserr_t SWimp_SetMode(int *pwidth, int *pheight, int mode, qboolean fullscreen)
void R_DrawNullModel(void)
void(* DrawPic)(int x, int y, char *name)
GLfloat GLfloat GLfloat alpha
void R_CinematicSetPalette(const unsigned char *palette)
struct model_s *(* RegisterModel)(char *name)
void R_EndWorldRenderpass(void)
void(* BeginRegistration)(char *map)
#define VectorAdd(a, b, c)
void R_RenderFrame(refdef_t *fd)
int * pfrustum_indexes[4]
struct model_s * R_RegisterModel(char *name)
void R_IMFlatShadedQuad(vec3_t a, vec3_t b, vec3_t c, vec3_t d, int color, float alpha)
mnode_t * R_FindTopnode(vec3_t mins, vec3_t maxs)
void Draw_BuildGammaTable(void)
void(* BeginFrame)(float camera_separation)
void R_EdgeCodeStart(void)
void(* EndWorldRenderpass)(void)
void(* SetSky)(char *name, float rotate, vec3_t axis)
void R_EndRegistration(void)
void Draw_GetPicSize(int *w, int *h, char *pic)
int SWimp_Init(void *hInstance, void *wndProc)
clipplane_t view_clipplanes[4]
void VectorMA(vec3_t veca, float scale, vec3_t vecb, vec3_t vecc)
void(* DrawStretchPic)(int x, int y, int w, int h, char *name)
void Draw_Pic(int x, int y, char *name)
void R_AliasDrawModel(void)
void R_TransformFrustum(void)
void(* DrawTileClear)(int x, int y, int w, int h, char *name)
void(* DrawChar)(int x, int y, int c)
void R_PrintDSpeeds(void)
void R_DrawAlphaSurfaces(void)
image_t * Draw_FindPic(char *name)
GLdouble GLdouble GLdouble w
void R_DrawBEntitiesOnList(void)
cvar_t * r_lightsaturation
void R_DrawSubmodelPolygons(model_t *pmodel, int clipflags, mnode_t *topnode)
void(* Cvar_SetValue)(char *name, float value)
int Sys_Milliseconds(void)
void Draw_StretchPic(int x, int y, int w, int h, char *name)
void Sys_Error(char *error,...)
qboolean(* Init)(void *hinstance, void *wndproc)
byte currentpalette[1024]
void Mod_Modellist_f(void)
void R_BeginFrame(float camera_separation)
byte * Mod_ClusterPVS(int cluster, model_t *model)
@ rserr_invalid_fullscreen
struct image_s * R_RegisterSkin(char *name)
void Com_Printf(char *fmt,...)
void Com_sprintf(char *dest, int size, char *fmt,...)
void(* RenderFrame)(refdef_t *fd)
void LoadPCX(char *filename, byte **pic, byte **palette, int *width, int *height)
void RotatePointAroundVector(vec3_t dst, const vec3_t dir, const vec3_t point, float degrees)