From fedb845e665b669ff11df23ce713842bd89c4ec4 Mon Sep 17 00:00:00 2001 From: havoc Date: Fri, 6 Sep 2002 11:48:47 +0000 Subject: [PATCH] transform matrix is now separate from R_Mesh_State, a new function called R_Mesh_Matrix takes up the task of changing transforms, and is used a lot less frequently in the engine than R_Mesh_State, this gets a nice speed gain in cavetest2 git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@2340 d7cf8633-e32d-0410-b094-e92efae38249 --- cl_particles.c | 2 +- gl_backend.c | 22 ++++++++++++---------- gl_backend.h | 4 +++- gl_models.c | 12 +++--------- gl_rmain.c | 9 ++++++--- gl_rsurf.c | 27 ++++++++++----------------- makefile | 8 ++++---- r_crosshairs.c | 2 +- r_explosion.c | 2 +- r_light.c | 2 +- r_sky.c | 5 +++-- r_sprites.c | 3 ++- render.h | 2 ++ 13 files changed, 49 insertions(+), 51 deletions(-) diff --git a/cl_particles.c b/cl_particles.c index 20bb95de..962f9cfa 100644 --- a/cl_particles.c +++ b/cl_particles.c @@ -1202,7 +1202,7 @@ void R_DrawParticleCallback(const void *calldata1, int calldata2) else m.blendfunc2 = GL_ONE_MINUS_SRC_ALPHA; m.tex[0] = R_GetTexture(particlefonttexture); - Matrix4x4_CreateIdentity(&m.matrix); + R_Mesh_Matrix(&r_identitymatrix); R_Mesh_State(&m); varray_element[0] = 0; diff --git a/gl_backend.c b/gl_backend.c index 8702cbf4..b89fdaf9 100644 --- a/gl_backend.c +++ b/gl_backend.c @@ -606,7 +606,7 @@ void GL_DrawRangeElements(int firstvert, int endvert, int indexcount, GLuint *in qglColor4ub(c[0], c[1], c[2], c[3]); if (gl_state.texture[0]) { - v = varray_texcoord[j] + in * 2; + v = varray_texcoord[0] + in * 2; qglTexCoord2f(v[0], v[1]); } v = varray_vertex + in * 4; @@ -712,6 +712,17 @@ void R_Mesh_ClearDepth(void) R_Mesh_Start(r_mesh_farclip); } +void R_Mesh_Matrix(const matrix4x4_t *matrix) +{ + if (memcmp(matrix, &backend_modelmatrix, sizeof(matrix4x4_t))) + { + backend_modelmatrix = *matrix; + Matrix4x4_Concat(&backend_modelviewmatrix, &backend_viewmatrix, matrix); + Matrix4x4_Transpose(&backend_glmodelviewmatrix, &backend_modelviewmatrix); + qglLoadMatrixf(&backend_glmodelviewmatrix.m[0][0]); + } +} + // sets up the requested state void R_Mesh_State(const rmeshstate_t *m) { @@ -727,15 +738,6 @@ void R_Mesh_State(const rmeshstate_t *m) GL_SetupTextureState(); } - //backendmatrix = m->matrix; // this copies the struct - if (memcmp(&m->matrix, &backend_modelmatrix, sizeof(matrix4x4_t))) - { - backend_modelmatrix = m->matrix; - Matrix4x4_Concat(&backend_modelviewmatrix, &backend_viewmatrix, &m->matrix); - Matrix4x4_Transpose(&backend_glmodelviewmatrix, &backend_modelviewmatrix); - qglLoadMatrixf(&backend_glmodelviewmatrix.m[0][0]); - } - overbright = false; scaler = 1; if (m->blendfunc1 == GL_DST_COLOR) diff --git a/gl_backend.h b/gl_backend.h index 075d2bdf..1752635f 100644 --- a/gl_backend.h +++ b/gl_backend.h @@ -16,7 +16,6 @@ typedef struct int wantoverbright; int tex[MAX_TEXTUREUNITS]; int texrgbscale[MAX_TEXTUREUNITS]; // used only if COMBINE is present - matrix4x4_t matrix; // model to world transform matrix } rmeshstate_t; @@ -43,6 +42,9 @@ void R_Mesh_Finish(void); // (only valid between R_Mesh_Start and R_Mesh_Finish) void R_Mesh_ClearDepth(void); +// sets up the requested transform matrix +void R_Mesh_Matrix(const matrix4x4_t *matrix); + // sets up the requested state void R_Mesh_State(const rmeshstate_t *m); diff --git a/gl_models.c b/gl_models.c index 76ad6458..38064f11 100644 --- a/gl_models.c +++ b/gl_models.c @@ -251,6 +251,7 @@ void R_DrawQ1Q2AliasModelCallback (const void *calldata1, int calldata2) int blendfunc1, blendfunc2; // softwaretransformforentity(ent); + R_Mesh_Matrix(&ent->matrix); fog = 0; if (fogenabled) @@ -298,7 +299,6 @@ void R_DrawQ1Q2AliasModelCallback (const void *calldata1, int calldata2) m.blendfunc2 = blendfunc2; m.wantoverbright = true; m.tex[0] = R_GetTexture(r_notexture); - m.matrix = ent->matrix; R_Mesh_State(&m); c_alias_polys += model->numtris; @@ -324,7 +324,6 @@ void R_DrawQ1Q2AliasModelCallback (const void *calldata1, int calldata2) m.blendfunc2 = blendfunc2; m.wantoverbright = true; m.tex[0] = R_GetTexture(skinframe->merged); - m.matrix = ent->matrix; R_Mesh_State(&m); c_alias_polys += model->numtris; @@ -363,7 +362,6 @@ void R_DrawQ1Q2AliasModelCallback (const void *calldata1, int calldata2) m.blendfunc1 = blendfunc1; m.blendfunc2 = blendfunc2; m.wantoverbright = true; - m.matrix = ent->matrix; m.tex[0] = colormapped ? R_GetTexture(skinframe->base) : R_GetTexture(skinframe->merged); if (m.tex[0]) { @@ -387,7 +385,6 @@ void R_DrawQ1Q2AliasModelCallback (const void *calldata1, int calldata2) m.blendfunc1 = blendfunc1; m.blendfunc2 = blendfunc2; m.wantoverbright = true; - m.matrix = ent->matrix; m.tex[0] = R_GetTexture(skinframe->pants); if (m.tex[0]) { @@ -412,7 +409,6 @@ void R_DrawQ1Q2AliasModelCallback (const void *calldata1, int calldata2) m.blendfunc1 = blendfunc1; m.blendfunc2 = blendfunc2; m.wantoverbright = true; - m.matrix = ent->matrix; m.tex[0] = R_GetTexture(skinframe->shirt); if (m.tex[0]) { @@ -438,7 +434,6 @@ void R_DrawQ1Q2AliasModelCallback (const void *calldata1, int calldata2) m.blendfunc1 = blendfunc1; m.blendfunc2 = blendfunc2; m.wantoverbright = true; - m.matrix = ent->matrix; m.tex[0] = R_GetTexture(skinframe->glow); if (m.tex[0]) { @@ -460,7 +455,6 @@ void R_DrawQ1Q2AliasModelCallback (const void *calldata1, int calldata2) m.blendfunc1 = GL_SRC_ALPHA; m.blendfunc2 = GL_ONE; m.wantoverbright = false; - m.matrix = ent->matrix; m.tex[0] = R_GetTexture(skinframe->fog); R_Mesh_State(&m); @@ -760,6 +754,8 @@ void R_DrawZymoticModelMeshCallback (const void *calldata1, int calldata2) int shadernum = calldata2; int numverts, numtriangles; + R_Mesh_Matrix(&ent->matrix); + // find the vertex index list and texture m = ent->model->zymdata_header; renderlist = (int *)(m->lump_render.start + (int) m); @@ -812,7 +808,6 @@ void R_DrawZymoticModelMeshCallback (const void *calldata1, int calldata2) mstate.blendfunc2 = GL_ZERO; } mstate.tex[0] = R_GetTexture(texture); - mstate.matrix = ent->matrix; R_Mesh_State(&mstate); c_alias_polys += numtriangles; @@ -830,7 +825,6 @@ void R_DrawZymoticModelMeshCallback (const void *calldata1, int calldata2) mstate.blendfunc2 = GL_ONE_MINUS_SRC_ALPHA; // FIXME: need alpha mask for fogging... //mstate.tex[0] = R_GetTexture(texture); - mstate.matrix = ent->matrix; R_Mesh_State(&mstate); c_alias_polys += numtriangles; diff --git a/gl_rmain.c b/gl_rmain.c index de052f0f..6a177423 100644 --- a/gl_rmain.c +++ b/gl_rmain.c @@ -26,6 +26,8 @@ int r_framecount; mplane_t frustum[4]; +matrix4x4_t r_identitymatrix; + int c_alias_polys, c_light_polys, c_faces, c_nodes, c_leafs, c_models, c_bmodels, c_sprites, c_particles, c_dlights; // true during envmap command capture @@ -210,6 +212,7 @@ void gl_main_newmap(void) void GL_Main_Init(void) { + Matrix4x4_CreateIdentity(&r_identitymatrix); // FIXME: move this to client? FOG_registercvars(); Cmd_AddCommand ("timerefresh", R_TimeRefresh_f); @@ -511,7 +514,7 @@ static void R_BlendView(void) m.blendfunc2 = GL_ONE_MINUS_SRC_ALPHA; m.wantoverbright = false; m.depthdisable = true; // magic - Matrix4x4_CreateIdentity(&m.matrix); + R_Mesh_Matrix(&r_identitymatrix); R_Mesh_State(&m); varray_element[0] = 0; @@ -617,7 +620,7 @@ void R_DrawBBoxMesh(vec3_t mins, vec3_t maxs, float cr, float cg, float cb, floa m.blendfunc1 = GL_SRC_ALPHA; m.blendfunc2 = GL_ONE_MINUS_SRC_ALPHA; m.wantoverbright = false; - Matrix4x4_CreateIdentity(&m.matrix); + R_Mesh_Matrix(&r_identitymatrix); R_Mesh_State(&m); varray_element @@ -673,7 +676,7 @@ void R_DrawNoModelCallback(const void *calldata1, int calldata2) m.blendfunc2 = GL_ZERO; } m.wantoverbright = false; - m.matrix = ent->matrix; + R_Mesh_Matrix(&ent->matrix); R_Mesh_State(&m); varray_element[ 0] = 5;varray_element[ 1] = 2;varray_element[ 2] = 0; diff --git a/gl_rsurf.c b/gl_rsurf.c index 4ea06b40..d1c0c38d 100644 --- a/gl_rsurf.c +++ b/gl_rsurf.c @@ -801,6 +801,8 @@ static void RSurfShader_Sky(const entity_render_t *ent, const msurface_t *firsts R_Sky(); } + R_Mesh_Matrix(&ent->matrix); + // draw depth-only polys memset(&m, 0, sizeof(m)); if (skyrendermasked) @@ -816,7 +818,6 @@ static void RSurfShader_Sky(const entity_render_t *ent, const msurface_t *firsts } m.wantoverbright = false; m.depthwrite = true; - m.matrix = ent->matrix; R_Mesh_State(&m); for (surf = firstsurf;surf;surf = surf->chain) { @@ -845,6 +846,8 @@ static void RSurfShader_Water_Callback(const void *calldata1, int calldata2) float modelorg[3]; Matrix4x4_Transform(&ent->inversematrix, r_origin, modelorg); + R_Mesh_Matrix(&ent->matrix); + memset(&m, 0, sizeof(m)); if (ent->effects & EF_ADDITIVE) { @@ -863,7 +866,6 @@ static void RSurfShader_Water_Callback(const void *calldata1, int calldata2) } m.wantoverbright = true; m.tex[0] = R_GetTexture(surf->currenttexture->texture); - m.matrix = ent->matrix; R_Mesh_State(&m); for (mesh = surf->mesh;mesh;mesh = mesh->chain) { @@ -891,7 +893,6 @@ static void RSurfShader_Water_Callback(const void *calldata1, int calldata2) m.blendfunc2 = GL_ONE; m.wantoverbright = false; m.tex[0] = R_GetTexture(surf->currenttexture->fogtexture); - m.matrix = ent->matrix; R_Mesh_State(&m); for (mesh = surf->mesh;mesh;mesh = mesh->chain) { @@ -918,7 +919,7 @@ static void RSurfShader_Water(const entity_render_t *ent, const msurface_t *firs R_MeshQueue_AddTransparent(center, RSurfShader_Water_Callback, ent, surf - ent->model->surfaces); } else - R_MeshQueue_Add(RSurfShader_Water_Callback, ent, surf - ent->model->surfaces); + RSurfShader_Water_Callback(ent, surf - ent->model->surfaces); } } @@ -948,7 +949,6 @@ static void RSurfShader_Wall_Pass_BaseVertex(const entity_render_t *ent, const m m.wantoverbright = true; m.tex[0] = R_GetTexture(surf->currenttexture->texture); base = ent->effects & EF_FULLBRIGHT ? 2.0f : r_ambient.value * (1.0f / 64.0f); - m.matrix = ent->matrix; R_Mesh_State(&m); for (mesh = surf->mesh;mesh;mesh = mesh->chain) { @@ -993,7 +993,6 @@ static void RSurfShader_Wall_Pass_BaseFullbright(const entity_render_t *ent, con } m.wantoverbright = false; m.tex[0] = R_GetTexture(surf->currenttexture->texture); - m.matrix = ent->matrix; R_Mesh_State(&m); for (mesh = surf->mesh;mesh;mesh = mesh->chain) { @@ -1017,7 +1016,6 @@ static void RSurfShader_Wall_Pass_Glow(const entity_render_t *ent, const msurfac m.blendfunc2 = GL_ONE; m.wantoverbright = false; m.tex[0] = R_GetTexture(surf->currenttexture->glowtexture); - m.matrix = ent->matrix; R_Mesh_State(&m); for (mesh = surf->mesh;mesh;mesh = mesh->chain) { @@ -1040,7 +1038,6 @@ static void RSurfShader_Wall_Pass_Fog(const entity_render_t *ent, const msurface m.blendfunc1 = GL_SRC_ALPHA; m.blendfunc2 = GL_ONE; m.wantoverbright = false; - m.matrix = ent->matrix; m.tex[0] = R_GetTexture(surf->currenttexture->fogtexture); R_Mesh_State(&m); for (mesh = surf->mesh;mesh;mesh = mesh->chain) @@ -1070,7 +1067,6 @@ static void RSurfShader_OpaqueWall_Pass_TripleTexCombine(const entity_render_t * m.texrgbscale[1] = 4.0f; m.tex[2] = R_GetTexture(surf->currenttexture->detailtexture); m.texrgbscale[2] = 2.0f; - m.matrix = ent->matrix; R_Mesh_State(&m); for (mesh = surf->mesh;mesh;mesh = mesh->chain) { @@ -1097,7 +1093,6 @@ static void RSurfShader_OpaqueWall_Pass_BaseMTex(const entity_render_t *ent, con m.wantoverbright = true; m.tex[0] = R_GetTexture(surf->currenttexture->texture); m.tex[1] = R_GetTexture(surf->lightmaptexture); - m.matrix = ent->matrix; R_Mesh_State(&m); for (mesh = surf->mesh;mesh;mesh = mesh->chain) { @@ -1122,7 +1117,6 @@ static void RSurfShader_OpaqueWall_Pass_BaseTexture(const entity_render_t *ent, m.blendfunc2 = GL_ZERO; m.wantoverbright = false; m.tex[0] = R_GetTexture(surf->currenttexture->texture); - m.matrix = ent->matrix; R_Mesh_State(&m); for (mesh = surf->mesh;mesh;mesh = mesh->chain) { @@ -1146,7 +1140,6 @@ static void RSurfShader_OpaqueWall_Pass_BaseLightmap(const entity_render_t *ent, m.blendfunc2 = GL_SRC_COLOR; m.wantoverbright = true; m.tex[0] = R_GetTexture(surf->lightmaptexture); - m.matrix = ent->matrix; R_Mesh_State(&m); for (mesh = surf->mesh;mesh;mesh = mesh->chain) { @@ -1175,7 +1168,6 @@ static void RSurfShader_OpaqueWall_Pass_Light(const entity_render_t *ent, const m.blendfunc2 = GL_ONE; m.wantoverbright = true; m.tex[0] = R_GetTexture(surf->currenttexture->texture); - m.matrix = ent->matrix; R_Mesh_State(&m); for (mesh = surf->mesh;mesh;mesh = mesh->chain) { @@ -1204,7 +1196,6 @@ static void RSurfShader_OpaqueWall_Pass_Fog(const entity_render_t *ent, const ms m.blendfunc2 = GL_ONE_MINUS_SRC_ALPHA; m.wantoverbright = false; m.tex[0] = R_GetTexture(surf->currenttexture->fogtexture); - m.matrix = ent->matrix; R_Mesh_State(&m); for (mesh = surf->mesh;mesh;mesh = mesh->chain) { @@ -1227,7 +1218,6 @@ static void RSurfShader_OpaqueWall_Pass_BaseDetail(const entity_render_t *ent, c m.blendfunc2 = GL_SRC_COLOR; m.wantoverbright = false; m.tex[0] = R_GetTexture(surf->currenttexture->detailtexture); - m.matrix = ent->matrix; R_Mesh_State(&m); for (mesh = surf->mesh;mesh;mesh = mesh->chain) { @@ -1249,7 +1239,6 @@ static void RSurfShader_OpaqueWall_Pass_Glow(const entity_render_t *ent, const m m.blendfunc2 = GL_ONE; m.wantoverbright = false; m.tex[0] = R_GetTexture(surf->currenttexture->glowtexture); - m.matrix = ent->matrix; R_Mesh_State(&m); for (mesh = surf->mesh;mesh;mesh = mesh->chain) { @@ -1266,6 +1255,7 @@ static void RSurfShader_Wall_Fullbright_Callback(const void *calldata1, int call { const entity_render_t *ent = calldata1; const msurface_t *surf = ent->model->surfaces + calldata2; + R_Mesh_Matrix(&ent->matrix); RSurfShader_Wall_Pass_BaseFullbright(ent, surf); if (surf->currenttexture->glowtexture) RSurfShader_Wall_Pass_Glow(ent, surf); @@ -1312,6 +1302,7 @@ static void RSurfShader_Wall_Vertex_Callback(const void *calldata1, int calldata { const entity_render_t *ent = calldata1; const msurface_t *surf = ent->model->surfaces + calldata2; + R_Mesh_Matrix(&ent->matrix); RSurfShader_Wall_Pass_BaseVertex(ent, surf); if (surf->currenttexture->glowtexture) RSurfShader_Wall_Pass_Glow(ent, surf); @@ -1486,6 +1477,8 @@ void R_DrawSurfaces(entity_render_t *ent, int sky, int normal) if (!ent->model) return; + R_Mesh_Matrix(&ent->matrix); + for (i = 0;i < Cshader_count;i++) Cshaders[i]->chain = NULL; @@ -1595,7 +1588,7 @@ static void R_DrawPortal_Callback(const void *calldata1, int calldata2) m.blendfunc1 = GL_SRC_ALPHA; m.blendfunc2 = GL_ONE_MINUS_SRC_ALPHA; m.wantoverbright = false; - m.matrix = ent->matrix; + R_Mesh_Matrix(&ent->matrix); R_Mesh_State(&m); R_Mesh_ResizeCheck(portal->numpoints, portal->numpoints - 2); for (i = 0;i < mesh->numtriangles;i++) diff --git a/makefile b/makefile index ec3105c2..fff672e4 100644 --- a/makefile +++ b/makefile @@ -50,11 +50,11 @@ NOPROFILEOPTIMIZATIONS= #this is used to ensure that all released versions are free of warnings. #normal compile -#OPTIMIZATIONS= -O6 -fno-strict-aliasing -ffast-math -funroll-loops $(NOPROFILEOPTIMIZATIONS) -fexpensive-optimizations $(CPUOPTIMIZATIONS) -#CFLAGS= -MD -Wall -Werror -I/usr/X11R6/include $(OPTIMIZATIONS) $(PROFILEOPTION) +OPTIMIZATIONS= -O6 -fno-strict-aliasing -ffast-math -funroll-loops $(NOPROFILEOPTIMIZATIONS) -fexpensive-optimizations $(CPUOPTIMIZATIONS) +CFLAGS= -MD -Wall -Werror -I/usr/X11R6/include $(OPTIMIZATIONS) $(PROFILEOPTION) #debug compile -OPTIMIZATIONS= -CFLAGS= -MD -Wall -Werror -I/usr/X11R6/include -ggdb $(OPTIMIZATIONS) $(PROFILEOPTION) +#OPTIMIZATIONS= +#CFLAGS= -MD -Wall -Werror -I/usr/X11R6/include -ggdb $(OPTIMIZATIONS) $(PROFILEOPTION) LDFLAGS= -L/usr/X11R6/lib -lm -lX11 -lXext -lXxf86dga -lXxf86vm -ldl $(SOUNDLIB) $(PROFILEOPTION) diff --git a/r_crosshairs.c b/r_crosshairs.c index d2870701..6e141754 100644 --- a/r_crosshairs.c +++ b/r_crosshairs.c @@ -171,7 +171,7 @@ void R_DrawCrosshairSprite(rtexture_t *texture, vec3_t origin, vec_t scale, floa m.wantoverbright = false; m.depthdisable = true; m.tex[0] = R_GetTexture(texture); - Matrix4x4_CreateIdentity(&m.matrix); + R_Mesh_Matrix(&r_identitymatrix); R_Mesh_State(&m); varray_element[0] = 0; diff --git a/r_explosion.c b/r_explosion.c index d8151188..15212ccd 100644 --- a/r_explosion.c +++ b/r_explosion.c @@ -186,7 +186,7 @@ void R_DrawExplosionCallback(const void *calldata1, int calldata2) m.blendfunc2 = GL_ONE; m.wantoverbright = false; m.tex[0] = R_GetTexture(explosiontexture); - Matrix4x4_CreateIdentity(&m.matrix); + R_Mesh_Matrix(&r_identitymatrix); R_Mesh_State(&m); numtriangles = EXPLOSIONTRIS; diff --git a/r_light.c b/r_light.c index 11b4619b..57b9cc68 100644 --- a/r_light.c +++ b/r_light.c @@ -151,7 +151,7 @@ void R_DrawCoronas(void) m.wantoverbright = false; m.depthdisable = true; // magic m.tex[0] = R_GetTexture(lightcorona); - Matrix4x4_CreateIdentity(&m.matrix); + R_Mesh_Matrix(&r_identitymatrix); R_Mesh_State(&m); viewdist = DotProduct(r_origin, vpn); for (i = 0;i < r_numdlights;i++) diff --git a/r_sky.c b/r_sky.c index d971edef..367428c4 100644 --- a/r_sky.c +++ b/r_sky.c @@ -134,7 +134,6 @@ static void R_SkyBox(void) m.wantoverbright = false; m.depthdisable = true; // don't modify or read zbuffer m.tex[0] = R_GetTexture(skyboxside[3]); // front - Matrix4x4_CreateTranslate(&m.matrix, r_origin[0], r_origin[1], r_origin[2]); R_Mesh_State(&m); memcpy(varray_element, skyboxindex, sizeof(int[6])); @@ -304,7 +303,6 @@ static void R_SkySphere(void) m.wantoverbright = false; m.depthdisable = true; // don't modify or read zbuffer m.tex[0] = R_GetTexture(solidskytexture); - Matrix4x4_CreateTranslate(&m.matrix, r_origin[0], r_origin[1], r_origin[2]); R_Mesh_State(&m); memcpy(varray_element, skysphereindices, numtriangles * sizeof(int[3])); @@ -323,8 +321,11 @@ static void R_SkySphere(void) void R_Sky(void) { + matrix4x4_t skymatrix; if (skyrendermasked) { + Matrix4x4_CreateTranslate(&skymatrix, r_origin[0], r_origin[1], r_origin[2]); + R_Mesh_Matrix(&skymatrix); if (skyrendersphere) { // this does not modify depth buffer diff --git a/r_sprites.c b/r_sprites.c index 168c4cfd..57710263 100644 --- a/r_sprites.c +++ b/r_sprites.c @@ -88,7 +88,6 @@ static void R_DrawSpriteImage (int wantoverbright, int additive, mspriteframe_t m.blendfunc2 = GL_ONE; m.wantoverbright = wantoverbright; m.tex[0] = texture; - Matrix4x4_CreateIdentity(&m.matrix); R_Mesh_State(&m); varray_element[0] = 0; @@ -137,6 +136,8 @@ void R_DrawSpriteModelCallback(const void *calldata1, int calldata2) if (R_SpriteSetup(ent, ent->model->sprnum_type, org, left, up)) return; + R_Mesh_Matrix(&r_identitymatrix); + if ((ent->model->flags & EF_FULLBRIGHT) || (ent->effects & EF_FULLBRIGHT)) { color[0] = color[1] = color[2] = 1; diff --git a/render.h b/render.h index 7aa31b7a..b4e7c3a3 100644 --- a/render.h +++ b/render.h @@ -21,6 +21,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #ifndef RENDER_H #define RENDER_H +extern matrix4x4_t r_identitymatrix; + // 1.0f / N table extern float ixtable[4096]; -- 2.39.2