]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - model_shared.h
implemented r_glsl_water cvar (refraction and reflection rendering)
[xonotic/darkplaces.git] / model_shared.h
index 58f15c821fb127b4c1e493b9e951c3d2602473c1..f179f7241f6044e10710baf9e0db73d37b5bcf19 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
@@ -414,6 +415,8 @@ typedef struct texture_s
        // 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;
@@ -813,8 +816,12 @@ 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 refraction/reflection textures for the model's water polygons (only used by brush models)
+       void(*DrawAddWaterPlanes)(struct entity_render_s *ent);
        // draw the model using lightmap/dlight shading
        void(*Draw)(struct entity_render_s *ent);
        // draw the model to the depth buffer (no color rendering at all)
@@ -923,6 +930,7 @@ int Mod_Q1BSP_SuperContentsFromNativeContents(struct model_s *model, int nativec
 
 // a lot of model formats use the Q1BSP code, so here are the prototypes...
 struct entity_render_s;
+void R_Q1BSP_DrawAddWaterPlanes(struct entity_render_s *ent);
 void R_Q1BSP_DrawSky(struct entity_render_s *ent);
 void R_Q1BSP_Draw(struct entity_render_s *ent);
 void R_Q1BSP_DrawDepth(struct entity_render_s *ent);