X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=model_shared.h;h=dc8177ae1bf17aa38701e4b90de28e230b7705d6;hb=366229127dad0794355c9daf8e17c833624b3d80;hp=ff098bbfad02b37420cffc9c66cadf739d8d6cc3;hpb=4e917c714cb66459bc448d983a45d57b616bb154;p=xonotic%2Fdarkplaces.git diff --git a/model_shared.h b/model_shared.h index ff098bbf..dc8177ae 100644 --- a/model_shared.h +++ b/model_shared.h @@ -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; @@ -724,6 +743,8 @@ typedef struct model_brush_s { // true if this model is a HalfLife .bsp file qboolean ishlbsp; + // true if this model is a BSP2 .bsp file (expanded 32bit bsp format for DarkPlaces, RMQ, others?) + qboolean isbsp2; // string of entity definitions (.map format) char *entities; @@ -799,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); @@ -821,7 +842,7 @@ model_brush_t; typedef struct model_brushq1_s { - dmodel_t *submodels; + mmodel_t *submodels; int numvertexes; mvertex_t *vertexes;