r_stat_vertexbufferuploadsize,
r_stat_framedatacurrent,
r_stat_framedatasize,
+ r_stat_bufferdatacurrent_vertex, // R_BUFFERDATA_ types are added to this index
+ r_stat_bufferdatacurrent_index16,
+ r_stat_bufferdatacurrent_index32,
+ r_stat_bufferdatacurrent_uniform,
+ r_stat_bufferdatasize_vertex, // R_BUFFERDATA_ types are added to this index
+ r_stat_bufferdatasize_index16,
+ r_stat_bufferdatasize_index32,
+ r_stat_bufferdatasize_uniform,
r_stat_animcache_vertexmesh_count,
r_stat_animcache_vertexmesh_vertices,
r_stat_animcache_vertexmesh_maxvertices,
r_stat_batch_dynamic_surfaces_because_derived,
r_stat_batch_dynamic_vertices_because_derived,
r_stat_batch_dynamic_triangles_because_derived,
+ r_stat_batch_entitycache_count,
+ r_stat_batch_entitycache_surfaces,
+ r_stat_batch_entitycache_vertices,
+ r_stat_batch_entitycache_triangles,
+ r_stat_batch_entityanimate_count,
+ r_stat_batch_entityanimate_surfaces,
+ r_stat_batch_entityanimate_vertices,
+ r_stat_batch_entityanimate_triangles,
+ r_stat_batch_entityskeletal_count,
+ r_stat_batch_entityskeletal_surfaces,
+ r_stat_batch_entityskeletal_vertices,
+ r_stat_batch_entityskeletal_triangles,
+ r_stat_batch_entitystatic_count,
+ r_stat_batch_entitystatic_surfaces,
+ r_stat_batch_entitystatic_vertices,
+ r_stat_batch_entitystatic_triangles,
+ r_stat_batch_entitycustom_count,
+ r_stat_batch_entitycustom_surfaces,
+ r_stat_batch_entitycustom_vertices,
+ r_stat_batch_entitycustom_triangles,
r_stat_count // size of array
}
r_stat_t;
// animation cache (pointers allocated using R_FrameData_Alloc)
// ONLY valid during R_RenderView! may be NULL (not cached)
- float *animcache_vertex3f;
- float *animcache_normal3f;
- float *animcache_svector3f;
- float *animcache_tvector3f;
+ float *animcache_vertex3f;
+ r_meshbuffer_t *animcache_vertex3f_vertexbuffer;
+ int animcache_vertex3f_bufferoffset;
+ float *animcache_normal3f;
+ r_meshbuffer_t *animcache_normal3f_vertexbuffer;
+ int animcache_normal3f_bufferoffset;
+ float *animcache_svector3f;
+ r_meshbuffer_t *animcache_svector3f_vertexbuffer;
+ int animcache_svector3f_bufferoffset;
+ float *animcache_tvector3f;
+ r_meshbuffer_t *animcache_tvector3f_vertexbuffer;
+ int animcache_tvector3f_bufferoffset;
// interleaved arrays for rendering and dynamic vertex buffers for them
- r_meshbuffer_t *animcache_vertex3fbuffer;
r_vertexmesh_t *animcache_vertexmesh;
- r_meshbuffer_t *animcache_vertexmeshbuffer;
- // gpu-skinning shader needs transforms in a certain format
+ r_meshbuffer_t *animcache_vertexmesh_vertexbuffer;
+ int animcache_vertexmesh_bufferoffset;
+ // gpu-skinning shader needs transforms in a certain format, we have to
+ // upload this to a uniform buffer for the shader to use, and also keep a
+ // backup copy in system memory for the dynamic batch fallback code
// if this is not NULL, the other animcache variables are NULL
float *animcache_skeletaltransform3x4;
+ r_meshbuffer_t *animcache_skeletaltransform3x4buffer;
+ int animcache_skeletaltransform3x4offset;
+ int animcache_skeletaltransform3x4size;
// current lighting from map (updated ONLY by client code, not renderer)
vec3_t modellight_ambient;
extern cvar_t cl_name;
extern cvar_t cl_color;
extern cvar_t cl_rate;
+extern cvar_t cl_rate_burstsize;
extern cvar_t cl_pmodel;
extern cvar_t cl_playermodel;
extern cvar_t cl_playerskin;
int CL_ParticleEffectIndexForName(const char *name);
const char *CL_ParticleEffectNameForIndex(int i);
void CL_ParticleEffect(int effectindex, float pcount, const vec3_t originmins, const vec3_t originmaxs, const vec3_t velocitymins, const vec3_t velocitymaxs, entity_t *ent, int palettecolor);
-void CL_ParticleTrail(int effectindex, float pcount, const vec3_t originmins, const vec3_t originmaxs, const vec3_t velocitymins, const vec3_t velocitymaxs, entity_t *ent, int palettecolor, qboolean spawndlight, qboolean spawnparticles, float tintmins[4], float tintmaxs[4]);
+void CL_ParticleTrail(int effectindex, float pcount, const vec3_t originmins, const vec3_t originmaxs, const vec3_t velocitymins, const vec3_t velocitymaxs, entity_t *ent, int palettecolor, qboolean spawndlight, qboolean spawnparticles, float tintmins[4], float tintmaxs[4], float fade);
+void CL_ParticleBox(int effectindex, float pcount, const vec3_t originmins, const vec3_t originmaxs, const vec3_t velocitymins, const vec3_t velocitymaxs, entity_t *ent, int palettecolor, qboolean spawndlight, qboolean spawnparticles, float tintmins[4], float tintmaxs[4], float fade);
void CL_ParseParticleEffect (void);
void CL_ParticleCube (const vec3_t mins, const vec3_t maxs, const vec3_t dir, int count, int colorbase, vec_t gravity, vec_t randomvel);
void CL_ParticleRain (const vec3_t mins, const vec3_t maxs, const vec3_t dir, int count, int colorbase, int type);