*/
-typedef enum modtype_e {mod_invalid, mod_brushq1, mod_sprite, mod_alias, mod_brushq2, mod_brushq3, mod_obj, mod_null} modtype_t;
+typedef enum modtype_e {mod_invalid, mod_brushq1, mod_sprite, mod_alias, mod_brushq2, mod_brushq3, mod_brushhl2, mod_obj, mod_null} modtype_t;
typedef struct animscene_s
{
#include "model_q1bsp.h"
#include "model_q2bsp.h"
#include "model_q3bsp.h"
+#include "model_vbsp.h"
#include "model_sprite.h"
#include "model_alias.h"
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);
void Mod_HLBSP_Load(model_t *mod, void *buffer, void *bufferend);
void Mod_Q1BSP_Load(model_t *mod, void *buffer, void *bufferend);
void Mod_IBSP_Load(model_t *mod, void *buffer, void *bufferend);
+void Mod_VBSP_Load(model_t *mod, void *buffer, void *bufferend);
void Mod_MAP_Load(model_t *mod, void *buffer, void *bufferend);
void Mod_OBJ_Load(model_t *mod, void *buffer, void *bufferend);
void Mod_IDP0_Load(model_t *mod, void *buffer, void *bufferend);