]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - model_shared.h
implemented PointSuperContents model function as a lower-overhead
[xonotic/darkplaces.git] / model_shared.h
index f27a242a6594f22e4f5c1529a2316c031c4310c3..5bea523ecb238e1421146863e94d48c4193cf684 100644 (file)
@@ -341,7 +341,7 @@ typedef struct q3shaderinfo_layer_s
        int clampmap;
        float framerate;
        int numframes;
-       char texturename[TEXTURE_MAXFRAMES][Q3PATHLENGTH];
+       char** texturename;
        int blendfunc[2];
        q3shaderinfo_layer_rgbgen_t rgbgen;
        q3shaderinfo_layer_alphagen_t alphagen;
@@ -429,11 +429,10 @@ typedef struct texture_s
        // current material flags (updated each bmodel render)
        int currentmaterialflags;
 
-       // current PolygonOffset values for rendering this material
-       float currentpolygonfactor;
-       float currentpolygonoffset;
-       float basepolygonfactor;
-       float basepolygonoffset;
+       // PolygonOffset values for rendering this material
+       // (these are added to the r_refdef values and submodel values)
+       float biaspolygonfactor;
+       float biaspolygonoffset;
 
        // textures to use when rendering this material
        skinframe_t *currentskinframe;
@@ -478,6 +477,10 @@ typedef struct texture_s
        float specularpower;
        // color tint (colormod * currentalpha) used for rtlighting this material
        float dlightcolor[3];
+       // color tint (colormod * 2) used for lightmapped lighting on this material
+       // includes alpha as 4th component
+       // replaces role of gl_Color in GLSL shader
+       float lightmapcolor[4];
 
        // from q3 shaders
        int customblendfunc[2];
@@ -867,6 +870,8 @@ typedef struct model_s
        void(*DrawLight)(struct entity_render_s *ent, int numsurfaces, const int *surfacelist, const unsigned char *trispvs);
        // trace a box against this model
        void (*TraceBox)(struct model_s *model, int frame, struct trace_s *trace, const vec3_t start, const vec3_t boxmins, const vec3_t boxmaxs, const vec3_t end, int hitsupercontentsmask);
+       // find the supercontents value at a point in this model
+       int (*PointSuperContents)(struct model_s *model, int frame, const vec3_t point);
        // fields belonging to some types of model
        model_sprite_t  sprite;
        model_brush_t   brush;