From 4562e2a0f9010c6c106314d860795a9f5f6ab49d Mon Sep 17 00:00:00 2001 From: cholleme <> Date: Wed, 25 Jun 2003 09:47:21 +0000 Subject: [PATCH] Fixed mesh model drawing --- gl_mesh.c | 1 + gl_model.h | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gl_mesh.c b/gl_mesh.c index 83d32c2..00f69b3 100644 --- a/gl_mesh.c +++ b/gl_mesh.c @@ -402,6 +402,7 @@ void GL_MakeAliasModelDisplayLists (model_t *m, aliashdr_t *hdr) //PENTA: Calculate tangents for vertices (bump mapping) tangents = Hunk_Alloc (paliashdr->poseverts * paliashdr->numposes * sizeof(vec3_t)); paliashdr->tangents = (byte *)tangents - (byte *)paliashdr; + paliashdr->binormals = 0; //for all frames for (i=0; inumposes; i++) { diff --git a/gl_model.h b/gl_model.h index bbe3f9f..7bd61f2 100644 --- a/gl_model.h +++ b/gl_model.h @@ -141,7 +141,7 @@ typedef struct stage_s { gltexture_t *texture[8]; //animations int src_blend, dst_blend; //have special values for bumpmap passes int alphatresh; - char filename[MAX_QPATH*2+1]; + char filename[MAX_QPATH*3+2]; } stage_t; #define SURF_NOSHADOW 0x40000 //don't cast stencil shadows @@ -277,6 +277,9 @@ typedef struct { typedef struct mesh_s { + vec3_t mins; //axis aligned bounding box + vec3_t maxs; + int firstvertex; //in world vertex list vec3_t *tangents; vec3_t *binormals; @@ -499,6 +502,7 @@ typedef struct { int triangles; //PENTA: We need tris for shadow volumes int planes; //PENTA: Plane eq's for every triangle for every frame int tangents; //PENTA: Tangent for every vertex for every frame + int binormals; //PENTA: Tangent for every vertex for every frame int texcoords; //PENTA: For every triangle the 3 texture coords int indecies; //PENTA: indecies for gl vertex arrays shader_t *shader;