]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - model_shared.h
GL_Color no longer interacts with GL_ColorPointer (so be sure to set GL_ColorPointer...
[xonotic/darkplaces.git] / model_shared.h
index 86339635a98bb74e9fa1a843f867ff7c82518257..25721efbc3d742b04518be4ac5ea8e18cb724b6e 100644 (file)
@@ -47,15 +47,16 @@ animscene_t;
 
 typedef struct skinframe_s
 {
+       rtexture_t *stain; // inverse modulate with background (used for decals and such)
+       rtexture_t *merged; // original texture without glow
        rtexture_t *base; // original texture without pants/shirt/glow
        rtexture_t *pants; // pants only (in greyscale)
        rtexture_t *shirt; // shirt only (in greyscale)
-       rtexture_t *glow; // glow only (fullbrights)
-       rtexture_t *merged; // original texture without glow
-       rtexture_t *fog; // alpha of the base texture (if not opaque)
        rtexture_t *nmap; // normalmap (bumpmap for dot3)
        rtexture_t *gloss; // glossmap (for dot3)
        rtexture_t *detail; // detail texture (silly bumps for non-dot3)
+       rtexture_t *glow; // glow only (fullbrights)
+       rtexture_t *fog; // alpha of the base texture (if not opaque)
 }
 skinframe_t;
 
@@ -174,6 +175,9 @@ typedef struct model_brush_s
        //pvschain = model->brush.data_pvsclusters + mycluster * model->brush.num_pvsclusterbytes;
        //if (pvschain[thatcluster >> 3] & (1 << (thatcluster & 7)))
 
+       // a mesh containing all shadow casting geometry for the whole model (including submodels), portions of this are referenced by each surface's num_firstshadowmeshtriangle 
+       shadowmesh_t *shadowmesh;
+
        // common functions
        int (*SuperContentsFromNativeContents)(struct model_s *model, int nativecontents);
        int (*NativeContentsFromSuperContents)(struct model_s *model, int supercontents);
@@ -185,6 +189,8 @@ typedef struct model_brush_s
        // these are actually only found on brushq1, but NULL is handled gracefully
        void (*AmbientSoundLevelsForPoint)(struct model_s *model, const vec3_t p, qbyte *out, int outsize);
        void (*RoundUpToHullSize)(struct model_s *cmodel, const vec3_t inmins, const vec3_t inmaxs, vec3_t outmins, vec3_t outmaxs);
+
+       char skybox[64];
 }
 model_brush_t;
 
@@ -444,6 +450,17 @@ typedef struct q3mface_s
        int *data_element3i;
        int *data_neighbor3i;
 
+       int num_collisionvertices;
+       int num_collisiontriangles;
+       float *data_collisionvertex3f;
+       int *data_collisionelement3i;
+
+       // index into model->brush.shadowmesh
+       int num_firstshadowmeshtriangle;
+       
+       // used for shadow volume generation
+       int shadowmark;
+
        // temporary use by light processing
        int lighttemp_castshadow;
 }