]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - client.h
optimizations to rendering
[xonotic/darkplaces.git] / client.h
index 3faba2f8e66e3725f5949269a0d5e2313ca076e3..02a6c558f7666b52bbbee9fdcd5190389759073b 100644 (file)
--- a/client.h
+++ b/client.h
@@ -22,6 +22,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 #ifndef CLIENT_H
 #define CLIENT_H
 
+#include "matrixlib.h"
+
 // LordHavoc: 256 dynamic lights
 #define MAX_DLIGHTS 256
 // LordHavoc: this affects the lighting scale of the whole game
@@ -92,6 +94,10 @@ typedef struct entity_render_s
        vec3_t origin;
        // orientation
        vec3_t angles;
+       // transform matrix for model to world
+       matrix4x4_t matrix;
+       // transform matrix for world to model
+       matrix4x4_t inversematrix;
        // opacity (alpha) of the model
        float alpha;
        // size the model is shown
@@ -135,6 +141,7 @@ typedef struct entity_render_s
        // caching results of static light traces (this is semi-persistent)
        double entlightstime;
        vec3_t entlightsorigin;
+       int entlightsframe;
        int numentlights;
        unsigned short entlights[MAXENTLIGHTS];
 }
@@ -153,6 +160,18 @@ typedef struct entity_persistent_s
        // muzzleflash fading
        float muzzleflash;
 
+       // interpolated movement
+
+       // start time of move
+       float lerpstarttime;
+       // time difference from start to end of move
+       float lerpdeltatime;
+       // the move itself, start and end
+       float oldorigin[3];
+       float oldangles[3];
+       float neworigin[3];
+       float newangles[3];
+
        // interpolated animation
 
        // lerp resets when model changes