]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - model_shared.h
removed cvar sv_gameplayfix_stepwhilejumping which wasn't needed
[xonotic/darkplaces.git] / model_shared.h
index 07e840d3873996c562002f779f3dd1973be71769..dc8177ae1bf17aa38701e4b90de28e230b7705d6 100644 (file)
@@ -112,7 +112,7 @@ r_vertexgeneric_t;
 
 typedef struct r_vertexmesh_s
 {
-       // 80 bytes
+       // 88 bytes
        float vertex3f[3];
        float color4f[4];
        float texcoordtexture2f[2];
@@ -120,6 +120,8 @@ typedef struct r_vertexmesh_s
        float svector3f[3];
        float tvector3f[3];
        float normal3f[3];
+       unsigned char skeletalindex4ub[4];
+       unsigned char skeletalweight4ub[4];
 }
 r_vertexmesh_t;
 
@@ -157,6 +159,8 @@ typedef struct surfmesh_s
        float *data_texcoordtexture2f; // float[verts*2] texcoords for surface texture
        float *data_texcoordlightmap2f; // float[verts*2] texcoords for lightmap texture
        float *data_lightmapcolor4f;
+       unsigned char *data_skeletalindex4ub;
+       unsigned char *data_skeletalweight4ub;
        int *data_lightmapoffsets; // index into surface's lightmap samples for vertex lighting
        // vertex buffer object (stores geometry in video memory)
        r_meshbuffer_t *vbo_vertexbuffer;
@@ -167,6 +171,8 @@ typedef struct surfmesh_s
        size_t vbooffset_texcoordtexture2f;
        size_t vbooffset_texcoordlightmap2f;
        size_t vbooffset_lightmapcolor4f;
+       size_t vbooffset_skeletalindex4ub;
+       size_t vbooffset_skeletalweight4ub;
        // morph blending, these are zero if model is skeletal or static
        int num_morphframes;
        struct md3vertex_s *data_morphmd3vertex;
@@ -251,6 +257,7 @@ shadowmesh_t;
 #define Q3TEXTUREFLAG_REFLECTION 512
 #define Q3TEXTUREFLAG_WATERSHADER 1024
 #define Q3TEXTUREFLAG_CAMERA 2048
+#define Q3TEXTUREFLAG_TRANSPARENTSORT 4096
 
 #define Q3PATHLENGTH 64
 #define TEXTURE_MAXFRAMES 64
@@ -426,6 +433,12 @@ typedef enum dpoffsetmapping_technique_s
        OFFSETMAPPING_RELIEF            // relief
 }dpoffsetmapping_technique_t;
 
+typedef enum dptransparentsort_category_e
+{
+       TRANSPARENTSORT_SKY,
+       TRANSPARENTSORT_DISTANCE,
+       TRANSPARENTSORT_HUD,
+}dptransparentsortcategory_t;
 
 typedef struct q3shaderinfo_s
 {
@@ -477,11 +490,14 @@ typedef struct q3shaderinfo_s
        // polygonoffset (only used if Q3TEXTUREFLAG_POLYGONOFFSET)
        float biaspolygonoffset, biaspolygonfactor;
 
+       // transparent sort category
+       dptransparentsortcategory_t transparentsort;
+
        // gloss
        float specularscalemod;
        float specularpowermod;
 
-       // rtlightning ambient addition
+       // rtlighting ambient addition
        float rtlightambient;
 #define Q3SHADERINFO_COMPARE_END rtlightambient
 }
@@ -618,6 +634,9 @@ typedef struct texture_s
        float offsetscale;
        float offsetbias;
 
+       // transparent sort category
+       dptransparentsortcategory_t transparentsort;
+
        // gloss
        float specularscalemod;
        float specularpowermod;
@@ -801,7 +820,7 @@ typedef struct model_brush_s
        int (*FindBoxClusters)(struct model_s *model, const vec3_t mins, const vec3_t maxs, int maxclusters, int *clusterlist);
        void (*LightPoint)(struct model_s *model, const vec3_t p, vec3_t ambientcolor, vec3_t diffusecolor, vec3_t diffusenormal);
        void (*FindNonSolidLocation)(struct model_s *model, const vec3_t in, vec3_t out, vec_t radius);
-       mleaf_t *(*PointInLeaf)(struct model_s *model, const float *p);
+       mleaf_t *(*PointInLeaf)(struct model_s *model, const vec3_t p);
        // these are actually only found on brushq1, but NULL is handled gracefully
        void (*AmbientSoundLevelsForPoint)(struct model_s *model, const vec3_t p, unsigned char *out, int outsize);
        void (*RoundUpToHullSize)(struct model_s *cmodel, const vec3_t inmins, const vec3_t inmaxs, vec3_t outmins, vec3_t outmaxs);