const char *modeldatatypestring;
// generates vertex data for a given frameblend
void(*AnimateVertices)(const struct model_s * RESTRICT model, const struct frameblend_s * RESTRICT frameblend, const struct skeleton_s *skeleton, float * RESTRICT vertex3f, float * RESTRICT normal3f, float * RESTRICT svector3f, float * RESTRICT tvector3f);
- // draw the model's sky polygons (only used by brush models)
+ // draw the model's sky polygons
void(*DrawSky)(struct entity_render_s *ent);
- // draw refraction/reflection textures for the model's water polygons (only used by brush models)
+ // draw refraction/reflection textures for the model's water polygons
void(*DrawAddWaterPlanes)(struct entity_render_s *ent);
// draw the model using lightmap/dlight shading
void(*Draw)(struct entity_render_s *ent);
// automatically called after model loader returns
void Mod_BuildVBOs(void);
+/// Sets the mod->DrawSky and mod->DrawAddWaterPlanes pointers conditionally based on whether surfaces in this submodel use these features
+/// called specifically by brush model loaders when generating submodels
+/// automatically called after model loader returns
+void Mod_SetDrawSkyAndWater(model_t* mod);
+
shadowmesh_t *Mod_ShadowMesh_Alloc(struct mempool_s *mempool, int maxverts, int maxtriangles);
int Mod_ShadowMesh_AddVertex(shadowmesh_t *mesh, const float *vertex3f);
void Mod_ShadowMesh_AddMesh(shadowmesh_t *mesh, const float *vertex3f, int numtris, const int *element3i);