Fixed mesh model drawing

This commit is contained in:
cholleme 2003-06-25 09:47:21 +00:00
parent 4aae63a512
commit 4562e2a0f9
2 changed files with 6 additions and 1 deletions

View file

@ -402,6 +402,7 @@ void GL_MakeAliasModelDisplayLists (model_t *m, aliashdr_t *hdr)
//PENTA: Calculate tangents for vertices (bump mapping) //PENTA: Calculate tangents for vertices (bump mapping)
tangents = Hunk_Alloc (paliashdr->poseverts * paliashdr->numposes * sizeof(vec3_t)); tangents = Hunk_Alloc (paliashdr->poseverts * paliashdr->numposes * sizeof(vec3_t));
paliashdr->tangents = (byte *)tangents - (byte *)paliashdr; paliashdr->tangents = (byte *)tangents - (byte *)paliashdr;
paliashdr->binormals = 0;
//for all frames //for all frames
for (i=0; i<paliashdr->numposes; i++) { for (i=0; i<paliashdr->numposes; i++) {

View file

@ -141,7 +141,7 @@ typedef struct stage_s {
gltexture_t *texture[8]; //animations gltexture_t *texture[8]; //animations
int src_blend, dst_blend; //have special values for bumpmap passes int src_blend, dst_blend; //have special values for bumpmap passes
int alphatresh; int alphatresh;
char filename[MAX_QPATH*2+1]; char filename[MAX_QPATH*3+2];
} stage_t; } stage_t;
#define SURF_NOSHADOW 0x40000 //don't cast stencil shadows #define SURF_NOSHADOW 0x40000 //don't cast stencil shadows
@ -277,6 +277,9 @@ typedef struct {
typedef struct mesh_s typedef struct mesh_s
{ {
vec3_t mins; //axis aligned bounding box
vec3_t maxs;
int firstvertex; //in world vertex list int firstvertex; //in world vertex list
vec3_t *tangents; vec3_t *tangents;
vec3_t *binormals; vec3_t *binormals;
@ -499,6 +502,7 @@ typedef struct {
int triangles; //PENTA: We need tris for shadow volumes int triangles; //PENTA: We need tris for shadow volumes
int planes; //PENTA: Plane eq's for every triangle for every frame int planes; //PENTA: Plane eq's for every triangle for every frame
int tangents; //PENTA: Tangent for every vertex 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 texcoords; //PENTA: For every triangle the 3 texture coords
int indecies; //PENTA: indecies for gl vertex arrays int indecies; //PENTA: indecies for gl vertex arrays
shader_t *shader; shader_t *shader;