]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - model_shared.h
Lower the default value of taskqueue_maxthreads from 32 to 4, as the threads are...
[xonotic/darkplaces.git] / model_shared.h
index cf64465f42b4f0d8b12248bb6d622115e4e28d4b..64c3c7d7995f6a22b0a58c9808181099de169c3a 100644 (file)
@@ -485,27 +485,6 @@ typedef struct texture_shaderpass_s
 }
 texture_shaderpass_t;
 
-typedef enum texturelayertype_e
-{
-       TEXTURELAYERTYPE_INVALID,
-       TEXTURELAYERTYPE_LITTEXTURE,
-       TEXTURELAYERTYPE_TEXTURE,
-       TEXTURELAYERTYPE_FOG
-}
-texturelayertype_t;
-
-typedef struct texturelayer_s
-{
-       texturelayertype_t type;
-       qboolean depthmask;
-       int blendfunc1;
-       int blendfunc2;
-       rtexture_t *texture;
-       matrix4x4_t texmatrix;
-       vec4_t color;
-}
-texturelayer_t;
-
 typedef struct texture_s
 {
        // q1bsp
@@ -547,6 +526,12 @@ typedef struct texture_s
        void *update_lastrenderentity;
        // the current alpha of this texture (may be affected by r_wateralpha, also basealpha, and ent->alpha)
        float currentalpha;
+       // current value of blendfunc - one of:
+       // {GL_SRC_ALPHA, GL_ONE}
+       // {GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA}
+       // {customblendfunc[0], customblendfunc[1]}
+       // {GL_ONE, GL_ZERO}
+       int currentblendfunc[2];
        // the current texture frame in animation
        struct texture_s *currentframe;
        // current texture transform matrix (used for water scrolling)
@@ -604,9 +589,6 @@ typedef struct texture_s
        // from q3 shaders
        int customblendfunc[2];
 
-       int currentnumlayers;
-       texturelayer_t currentlayers[16];
-
        // q3bsp
        char name[64];
        int surfaceflags;
@@ -632,6 +614,7 @@ typedef struct texture_s
        vec4_t reflectcolor4f; // color tint of reflection (including alpha factor)
        float r_water_wateralpha; // additional wateralpha to apply when r_water is active
        float r_water_waterscroll[2]; // scale and speed
+       float refractive_index; // used by r_shadow_bouncegrid for bending photons for refracted light
        int camera_entity; // entity number for use by cameras
 
        // offsetmapping
@@ -648,6 +631,9 @@ typedef struct texture_s
 
        // diffuse and ambient
        float rtlightambient;
+
+       // used by Mod_Mesh_GetTexture for drawflag overrides, to disambiguate the same texture with different drawflags
+       int drawflag;
 }
  texture_t;
 
@@ -1096,6 +1082,16 @@ extern unsigned char *mod_base;
 // texture fullbrights
 extern cvar_t r_fullbrights;
 
+extern cvar_t mod_noshader_default_offsetmapping;
+extern cvar_t mod_q3shader_default_offsetmapping;
+extern cvar_t mod_q3shader_default_offsetmapping_scale;
+extern cvar_t mod_q3shader_default_offsetmapping_bias;
+extern cvar_t mod_q3shader_default_polygonoffset;
+extern cvar_t mod_q3shader_default_polygonfactor;
+extern cvar_t mod_q3shader_default_refractive_index;
+extern cvar_t mod_q3shader_force_addalpha;
+extern cvar_t mod_q3shader_force_terrain_alphaflag;
+
 void Mod_Init (void);
 void Mod_Reload (void);
 dp_model_t *Mod_LoadModel(dp_model_t *mod, qboolean crash, qboolean checkdisk);