Quake II RTX doxygen
1.0 dev
|
|
Go to the source code of this file.
◆ tessfunc_t
◆ cull_lerped_model()
◆ cull_static_model()
◆ draw_alias_mesh()
◆ draw_celshading()
◆ draw_shadow()
◆ get_lerped_normal()
◆ get_static_normal()
static vec_t* get_static_normal |
( |
vec_t * |
normal, |
|
|
const maliasvert_t * |
vert |
|
) |
| |
|
inlinestatic |
◆ GL_DrawAliasModel()
void GL_DrawAliasModel |
( |
model_t * |
model | ) |
|
Definition at line 623 of file mesh.c.
630 if (newframenum < 0 || newframenum >= model->numframes) {
631 Com_DPrintf(
"%s: no such frame %d\n", __func__,
newframenum);
636 if (oldframenum < 0 || oldframenum >= model->numframes) {
637 Com_DPrintf(
"%s: no such oldframe %d\n", __func__,
oldframenum);
649 if (ent->flags & RF_FRAMELERP)
650 LerpVector2(ent->oldorigin, ent->origin,
653 VectorCopy(ent->origin,
origin);
670 if (ent->flags & RF_SHELL_MASK) {
672 WEAPONSHELL_SCALE : POWERSUIT_SCALE;
684 if (ent->scale > 0.f)
689 if ((ent->flags & (RF_WEAPONMODEL | RF_LEFTHAND)) ==
690 (RF_WEAPONMODEL | RF_LEFTHAND)) {
697 if (ent->flags & RF_DEPTHHACK)
701 for (i = 0; i < model->nummeshes; i++)
704 if (ent->flags & RF_DEPTHHACK)
707 if ((ent->flags & (RF_WEAPONMODEL | RF_LEFTHAND)) ==
708 (RF_WEAPONMODEL | RF_LEFTHAND)) {
Referenced by GL_DrawEntities().
◆ setup_celshading()
◆ setup_color()
Definition at line 335 of file mesh.c.
337 int flags =
glr.
ent->flags;
343 if (flags & RF_SHELL_MASK) {
345 if (flags & RF_SHELL_HALF_DAM) {
350 if (flags & RF_SHELL_DOUBLE) {
354 if (flags & RF_SHELL_RED) {
357 if (flags & RF_SHELL_GREEN) {
360 if (flags & RF_SHELL_BLUE) {
363 }
else if (flags & RF_FULLBRIGHT) {
364 VectorSet(
color, 1, 1, 1);
365 }
else if ((flags & RF_IR_VISIBLE) && (
glr.
fd.rdflags & RDF_IRGOGGLES)) {
366 VectorSet(
color, 1, 0, 0);
370 if (flags & RF_MINLIGHT) {
371 for (i = 0; i < 3; i++) {
372 if (
color[i] > 0.1f) {
377 VectorSet(
color, 0.1f, 0.1f, 0.1f);
381 if (flags & RF_GLOW) {
382 f = 0.1f * sin(
glr.
fd.time * 7);
383 for (i = 0; i < 3; i++) {
391 for (i = 0; i < 3; i++) {
392 clamp(
color[i], 0, 1);
396 if (flags & RF_TRANSLUCENT) {
Referenced by GL_DrawAliasModel().
◆ setup_dotshading()
◆ setup_shadow()
Definition at line 440 of file mesh.c.
442 GLfloat matrix[16], tmp[16];
451 if (
glr.
ent->flags & (RF_WEAPONMODEL | RF_NOSHADOW))
459 VectorSet(dir, 0, 0, -1);
461 VectorSet(dir, 0, 0, 1);
466 matrix[0] = plane->normal[1] * dir[1] + plane->normal[2] * dir[2];
467 matrix[4] = -plane->normal[1] * dir[0];
468 matrix[8] = -plane->normal[2] * dir[0];
469 matrix[12] = plane->dist * dir[0];
471 matrix[1] = -plane->normal[0] * dir[1];
472 matrix[5] = plane->normal[0] * dir[0] + plane->normal[2] * dir[2];
473 matrix[9] = -plane->normal[2] * dir[1];
474 matrix[13] = plane->dist * dir[1];
476 matrix[2] = -plane->normal[0] * dir[2];
477 matrix[6] = -plane->normal[1] * dir[2];
478 matrix[10] = plane->normal[0] * dir[0] + plane->normal[1] * dir[1];
479 matrix[14] = plane->dist * dir[2];
484 matrix[15] = DotProduct(plane->normal, dir);
Referenced by GL_DrawAliasModel().
◆ shadedot()
static vec_t shadedot |
( |
const vec_t * |
normal | ) |
|
|
inlinestatic |
◆ tess_lerped_plain()
◆ tess_lerped_shade()
◆ tess_lerped_shell()
◆ tess_static_plain()
◆ tess_static_shade()
◆ tess_static_shell()
◆ texnum_for_mesh()
Definition at line 547 of file mesh.c.
551 if (ent->flags & RF_SHELL_MASK)
560 if (ent->skinnum < 0 || ent->skinnum >= mesh->
numskins) {
561 Com_DPrintf(
"%s: no such skin: %d\n",
"GL_DrawAliasModel", ent->skinnum);
562 return mesh->
skins[0]->texnum;
566 return mesh->
skins[0]->texnum;
568 return mesh->
skins[ent->skinnum]->texnum;
Referenced by draw_alias_mesh().
◆ backlerp
◆ celscale
◆ color
Definition at line 33 of file mesh.c.
Referenced by _GL_LightPoint(), _GL_StretchPic(), _R_LightPoint(), add_dlights(), build_surface_poly(), cast_u32_to_f32_color(), CL_AddExplosionLight(), CL_AddParticles(), CL_BlasterParticles2(), CL_BloodParticleEffect(), CL_ColorExplosionParticles(), CL_FlagTrail(), CL_ForceWall(), CL_GenericParticleEffect(), CL_HdrColor_m(), CL_LogoutEffect(), CL_ParticleEffect(), CL_ParticleEffect2(), CL_ParticleEffect3(), CL_ParticleEffectWaterSplash(), CL_ParticleSmokeEffect(), CL_ParticleSteamEffect(), CL_RailLights(), CL_TagTrail(), Cmd_EchoEx_f(), Com_SetColor(), Con_DrawLine(), Con_SetColor(), create_invalid_texture(), D_FlatFillSurface(), draw_alias_mesh(), draw_celshading(), draw_shadow(), enqueue_stretch_pic(), Field_Draw(), fire_lead(), GL_AdjustColor(), GL_Blend(), GL_DrawBeams(), GL_DrawParticles(), GL_LightPoint(), GL_SampleLightPoint(), HUD_DrawNumber(), MenuList_Draw(), PF_DebugGraph(), process_regular_entity(), R_AliasSetupBlend(), R_DrawBeam(), R_DrawFill32(), R_DrawFill32_GL(), R_DrawFill32_RTX(), R_DrawFill8(), R_DrawFixedData(), R_DrawParticles(), R_DrawStretchData(), R_IMFlatShadedQuad(), R_LightPoint(), R_LightPoint_GL(), R_SetColor(), R_SetColor_GL(), R_SetColor_RTX(), sample_surface_verts(), SCR_Color_g(), SCR_Draw_f(), SCR_ExecuteLayoutString(), SCR_ParseColor(), setup_color(), setup_dotshading(), vkpt_build_beam_lights(), vkpt_build_cylinder_light(), vkpt_extract_emissive_texture_info(), and vkpt_normalize_normal_map().
◆ frontlerp
◆ newframenum
◆ newscale
◆ oldframenum
◆ oldscale
◆ origin
Definition at line 27 of file mesh.c.
Referenced by AL_AddLoopSounds(), AL_Spatialize(), CL_AddExplosionLight(), CL_AddPacketEntities(), CL_FlyEffect(), CL_FlyParticles(), CL_MonsterPlasma_Shell(), CL_MuzzleFlash2(), CL_ParticleEffect(), CL_ParticleEffectWaterSplash(), CL_SmokeAndFlash(), CL_Tracker_Explode(), CL_Tracker_Shell(), CM_TransformedBoxTrace(), CM_TransformedPointContents(), create_entity_matrix(), cull_lerped_model(), cull_static_model(), entity_update(), entity_update_new(), entity_update_old(), floater_zap(), func_explosive_explode(), GL_CullLocalBox(), GL_CullSphere(), GL_DrawAliasModel(), GL_LightPoint(), GL_RotateForEntity(), Grenade_Explode(), M_Menu_PlayerConfig(), make_box_points(), MVD_ParseEntityString(), MVD_ParseSound(), PF_PositionedSound(), PF_StartSound(), PM_GoodPosition(), process_bsp_entity(), R_DrawBeam(), R_LightPoint_GL(), rocket_touch(), S_StartSound(), SelectSpawnPoint(), setup_celshading(), setup_color(), setup_shadow(), SpawnDamage(), SV_Multicast(), ThrowDebris(), ThrowGib(), UpdateTerrainShadowMapView(), and write_particle_geometry().
◆ shadedir
◆ shadelight
◆ shadowmatrix
◆ shellscale
◆ tessfunc
◆ translate
static GLfloat shadowmatrix[16]
static tessfunc_t tessfunc
static void draw_alias_mesh(maliasmesh_t *mesh)
static void GL_ColorFloatPointer(GLint size, GLsizei stride, const GLfloat *pointer)
static int texnum_for_mesh(maliasmesh_t *mesh)
static vec_t * get_static_normal(vec_t *normal, const maliasvert_t *vert)
static void tess_static_shade(const maliasmesh_t *mesh)
static void setup_color(void)
static glCullResult_t cull_static_model(model_t *model)
void GL_BindTexture(GLuint tmu, GLuint texnum)
glCullResult_t GL_CullSphere(const vec3_t origin, float radius)
static void GL_LockArrays(GLsizei count)
static void GL_UnlockArrays(void)
GLbitfield stencil_buffer_bit
void GL_MultMatrix(GLfloat *out, const GLfloat *a, const GLfloat *b)
static void setup_shadow(void)
image_t * skins[MAX_ALIAS_SKINS]
void GL_ArrayBits(glArrayBits_t bits)
void GL_RotateForEntity(vec3_t origin, float scale)
static void tess_lerped_plain(const maliasmesh_t *mesh)
static void draw_shadow(maliasmesh_t *mesh)
static void tess_lerped_shell(const maliasmesh_t *mesh)
void GL_LightPoint(vec3_t origin, vec3_t color)
float Cvar_ClampValue(cvar_t *var, float min, float max)
void UnionBounds(vec3_t a[2], vec3_t b[2], vec3_t c[2])
static vec_t shadedot(const vec_t *normal)
static void setup_dotshading(void)
static void tess_static_plain(const maliasmesh_t *mesh)
static void GL_TexCoordPointer(GLint size, GLsizei stride, const GLfloat *pointer)
glCullResult_t GL_CullLocalBox(const vec3_t origin, vec3_t bounds[2])
void GL_DisableOutlines(void)
static void draw_celshading(maliasmesh_t *mesh)
static void setup_celshading(void)
static void GL_VertexPointer(GLint size, GLsizei stride, const GLfloat *pointer)
static void GL_LoadMatrix(const GLfloat *matrix)
static glCullResult_t cull_lerped_model(model_t *model)
static const vec_t * shadelight
image_t * IMG_ForHandle(qhandle_t h)
static vec_t * get_lerped_normal(vec_t *normal, const maliasvert_t *oldvert, const maliasvert_t *newvert)
glCullResult_t GL_CullBox(vec3_t bounds[2])
GLfloat vertices[VERTEX_SIZE *TESS_MAX_VERTICES]
void GL_EnableOutlines(void)
void GL_StateBits(glStateBits_t bits)
static void tess_lerped_shade(const maliasmesh_t *mesh)
static void tess_static_shell(const maliasmesh_t *mesh)