]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - client.h
added vid.support struct containing extension detection flags, to
[xonotic/darkplaces.git] / client.h
index 26e69bf2857e0cc4eac53e0eda5793b75036a50a..e44d9b7dae39690be34e084feb5463ce897d96d9 100644 (file)
--- a/client.h
+++ b/client.h
@@ -32,11 +32,17 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 typedef struct tridecal_s
 {
        // color and initial alpha value
-       unsigned char   colors[3][4];
+       float                   texcoord2f[3][2];
+       float                   vertex3f[3][3];
+       unsigned char   color4ub[3][4];
        // how long this decal has lived so far (the actual fade begins at cl_decals_time)
        float                   lived;
        // if >= 0 this indicates the decal should follow an animated triangle
        int                             triangleindex;
+       // for visibility culling
+       int                             surfaceindex;
+       // old decals are killed to obey cl_decals_max
+       int                             decalsequence;
 }
 tridecal_t;
 
@@ -330,6 +336,8 @@ typedef struct entity_render_s
        vec3_t mins, maxs;
        // subframe numbers (-1 if not used) and their blending scalers (0-1), if interpolation is not desired, use subframeblend[0].subframe
        frameblend_t frameblend[MAX_FRAMEBLENDS];
+       // skeletal animation data (if skeleton.relativetransforms is not NULL, it overrides frameblend)
+       skeleton_t *skeleton;
 
        // animation cache index
        int animcacheindex;
@@ -733,6 +741,7 @@ typedef struct decal_s
        // fields used by rendering:  (44 bytes)
        unsigned short  typeindex;
        unsigned short  texnum;
+       int                             decalsequence;
        vec3_t                  org;
        vec3_t                  normal;
        float                   size;
@@ -1022,7 +1031,11 @@ typedef struct client_state_s
        vec3_t playercrouchmins;
        vec3_t playercrouchmaxs;
 
+       // old decals are killed based on this
+       int decalsequence;
+
        int max_entities;
+       int max_csqcrenderentities;
        int max_static_entities;
        int max_effects;
        int max_beams;
@@ -1034,6 +1047,7 @@ typedef struct client_state_s
        int max_showlmps;
 
        entity_t *entities;
+       entity_render_t *csqcrenderentities;
        unsigned char *entities_active;
        entity_t *static_entities;
        cl_effect_t *effects;
@@ -1289,6 +1303,7 @@ void CL_Effect(vec3_t org, int modelindex, int startframe, int framecount, float
 
 void CL_ClearState (void);
 void CL_ExpandEntities(int num);
+void CL_ExpandCSQCRenderEntities(int num);
 void CL_SetInfo(const char *key, const char *value, qboolean send, qboolean allowstarkey, qboolean allowmodel, qboolean quiet);
 
 
@@ -1449,7 +1464,8 @@ typedef struct r_refdef_stats_s
        int lightmapupdates;
        int lightmapupdatepixels;
        int particles;
-       int decals;
+       int drawndecals;
+       int totaldecals;
        int meshes;
        int meshes_elements;
        int lights;
@@ -1553,13 +1569,12 @@ typedef struct r_refdef_view_s
 }
 r_refdef_view_t;
 
-#define VIEWCACHEDYNAMIC 1
 typedef struct r_refdef_viewcache_s
 {
-#ifdef VIEWCACHEDYNAMIC
        // updated by gl_main_newmap()
        int maxentities;
        int world_numclusters;
+       int world_numclusterbytes;
        int world_numleafs;
        int world_numsurfaces;
 
@@ -1576,13 +1591,6 @@ typedef struct r_refdef_viewcache_s
        unsigned char *world_surfacevisible;
        // if true, the view is currently in a leaf without pvs data
        qboolean world_novis;
-#else
-       unsigned char entityvisible[MAX_EDICTS+512+256];
-       unsigned char world_pvsbits[8192];
-       unsigned char world_leafvisible[65536];
-       unsigned char world_surfacevisible[262144];
-       qboolean world_novis;
-#endif
 }
 r_refdef_viewcache_t;