]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - model_shared.h
fixed GL_Scissor call in rtlight code (apparently I need to feed it a top to bottom...
[xonotic/darkplaces.git] / model_shared.h
index 00a11b2815340d17c7e74bc5061af8562e40d1e6..268873cf640347f840d2bc4b26c955c3bd762349 100644 (file)
@@ -192,10 +192,10 @@ typedef struct model_brushq1_s
        mplane_t                *planes;
 
        // number of actual leafs (including 0 which is solid)
-       int                             numleafs;
+       int                             num_leafs;
        // visible leafs, not counting 0 (solid)
-       int                             visleafs;
-       mleaf_t                 *leafs;
+       int                             num_visleafs;
+       mleaf_t                 *data_leafs;
 
        int                             numvertexes;
        mvertex_t               *vertexes;
@@ -232,7 +232,9 @@ typedef struct model_brushq1_s
 
        int                             num_compressedpvs;
        qbyte                   *data_compressedpvs;
-       qbyte                   *data_decompressedpvs;
+       int num_pvsclusters;
+       int num_pvsclusterbytes;
+       unsigned char *data_pvsclusters;
 
        int                             num_lightdata;
        qbyte                   *lightdata;
@@ -517,10 +519,10 @@ typedef struct model_brushq3_s
 
        // pvs
        int num_pvsclusters;
-       int num_pvschainlength;
-       unsigned char *data_pvschains;
+       int num_pvsclusterbytes;
+       unsigned char *data_pvsclusters;
        // example
-       //pvschain = model->brushq3.data_pvschains + mycluster * model->brushq3.num_pvschainlength;
+       //pvschain = model->brushq3.data_pvsclusters + mycluster * model->brushq3.num_pvsclusterbytes;
        //if (pvschain[thatcluster >> 3] & (1 << (thatcluster & 7)))
 }
 model_brushq3_t;
@@ -576,7 +578,7 @@ typedef struct model_s
        // draw a shadow volume for the model based on light source
        void(*DrawShadowVolume)(struct entity_render_s *ent, vec3_t relativelightorigin, float lightradius);
        // draw the lighting on a model (through stencil)
-       void(*DrawLight)(struct entity_render_s *ent, vec3_t relativelightorigin, vec3_t relativeeyeorigin, float lightradius, float *lightcolor, const matrix4x4_t *matrix_modeltofilter, const matrix4x4_t *matrix_modeltoattenuationxyz, const matrix4x4_t *matrix_modeltoattenuationz);
+       void(*DrawLight)(struct entity_render_s *ent, vec3_t relativelightorigin, vec3_t relativeeyeorigin, float lightradius, float *lightcolor, const matrix4x4_t *matrix_modeltolight, const matrix4x4_t *matrix_modeltoattenuationxyz, const matrix4x4_t *matrix_modeltoattenuationz, rtexture_t *lightcubemap);
        // trace a box against this model
        void (*TraceBox)(struct model_s *model, int frame, struct trace_s *trace, const vec3_t boxstartmins, const vec3_t boxstartmaxs, const vec3_t boxendmins, const vec3_t boxendmaxs, int hitsupercontentsmask);
        // fields belonging to each type of model