]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - client.h
implemented zpass shadowing, not used yet
[xonotic/darkplaces.git] / client.h
index 96c1c65119ab722388ad9f2e7ed7245b58afbd30..9c2030ff95e33dda575dad16fa255b0cfd69294c 100644 (file)
--- a/client.h
+++ b/client.h
@@ -38,7 +38,7 @@ typedef struct effect_s
 {
        int active;
        vec3_t origin;
-       float starttime;
+       double starttime;
        float framerate;
        int modelindex;
        int startframe;
@@ -109,6 +109,10 @@ typedef struct rtlight_s
        // rendering properties, updated each time a light is rendered
        // this is rtlight->color * d_lightstylevalue
        vec3_t currentcolor;
+       // used by corona updates, due to occlusion query
+       float corona_visibility;
+       unsigned int corona_queryindex_visiblepixels;
+       unsigned int corona_queryindex_allpixels;
        // this is R_Shadow_Cubemap(rtlight->cubemapname)
        rtexture_t *currentcubemap;
 
@@ -118,7 +122,8 @@ typedef struct rtlight_s
        // true if this is a compiled world light, cleared if the light changes
        int compiled;
        // premade shadow volumes to render for world entity
-       shadowmesh_t *static_meshchain_shadow;
+       shadowmesh_t *static_meshchain_shadow_zpass;
+       shadowmesh_t *static_meshchain_shadow_zfail;
        // used for visibility testing (more exact than bbox)
        int static_numleafs;
        int static_numleafpvsbytes;
@@ -277,6 +282,8 @@ typedef struct entity_render_s
        double frame1time;
        // time frame2 began playing (for framegroup animations)
        double frame2time;
+       // time of last model change (for shader animations)
+       double shadertime;
 
        // calculated by the renderer (but not persistent)
 
@@ -461,10 +468,12 @@ typedef struct capturevideostate_s
        fs_offset_t videofile_ix_master_video_inuse_offset;
        fs_offset_t videofile_ix_master_video_start_offset;
        fs_offset_t videofile_ix_movistart;
+       fs_offset_t position;
        qfile_t *videofile;
        qboolean active;
        qboolean realtime;
        qboolean error;
+       qboolean canseek;
        capturevideoformat_t format;
        int soundrate;
        int frame;
@@ -477,6 +486,8 @@ typedef struct capturevideostate_s
        sizebuf_t riffindexbuffer;
        int riffstacklevel;
        fs_offset_t riffstackstartoffset[4];
+       fs_offset_t riffstacksizehint[4];
+       const char *riffstackfourcc[4];
        short rgbtoyuvscaletable[3][3][256];
        unsigned char yuvnormalizetable[3][256];
        char basename[64];
@@ -1196,7 +1207,7 @@ void CL_Beam_CalculatePositions (const beam_t *b, vec3_t start, vec3_t end);
 void CL_ClientMovement_Replay(void);
 
 void CL_ClearTempEntities (void);
-entity_render_t *CL_NewTempEntity (void);
+entity_render_t *CL_NewTempEntity (double shadertime);
 
 void CL_Effect(vec3_t org, int modelindex, int startframe, int framecount, float framerate);
 
@@ -1484,7 +1495,8 @@ typedef struct r_refdef_scene_s {
        int maxtempentities;
 
        // renderable dynamic lights
-       rtlight_t lights[MAX_DLIGHTS];
+       rtlight_t *lights[MAX_DLIGHTS];
+       rtlight_t templights[MAX_DLIGHTS];
        int numlights;
 
        // intensities for light styles right now, controls rtlights