]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - model_shared.h
implemented q3 shader keyword polygonoffset
[xonotic/darkplaces.git] / model_shared.h
index 0773c3d1de431bac76d08a35d467781291c7da0b..36580fd17b64d82f15783b1595ecda44e2e0caa6 100644 (file)
@@ -186,6 +186,7 @@ shadowmesh_t;
 // TODO: support these features more directly
 #define Q3TEXTUREFLAG_TWOSIDED 1
 #define Q3TEXTUREFLAG_NOPICMIP 16
+#define Q3TEXTUREFLAG_POLYGONOFFSET 32
 
 #define Q3PATHLENGTH 64
 #define TEXTURE_MAXFRAMES 64
@@ -411,6 +412,12 @@ 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;
+
        // textures to use when rendering this material
        skinframe_t *currentskinframe;
        int numskinframes;
@@ -452,6 +459,8 @@ typedef struct texture_s
        rtexture_t *backgroundglosstexture;
        float specularscale;
        float specularpower;
+       // color tint (colormod * currentalpha) used for rtlighting this material
+       float dlightcolor[3];
 
        // from q3 shaders
        int customblendfunc[2];
@@ -807,6 +816,8 @@ typedef struct model_s
        msurface_lightmapinfo_t *data_surfaces_lightmapinfo;
        // all surfaces belong to this mesh
        surfmesh_t              surfmesh;
+       // data type of model
+       const char              *modeldatatypestring;
        // draw the model's sky polygons (only used by brush models)
        void(*DrawSky)(struct entity_render_s *ent);
        // draw the model using lightmap/dlight shading