}
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
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)
// from q3 shaders
int customblendfunc[2];
- int currentnumlayers;
- texturelayer_t currentlayers[16];
-
// q3bsp
char name[64];
int surfaceflags;
// diffuse and ambient
float rtlightambient;
+
+ // used by Mod_Mesh_GetTexture for drawflag and materialflag overrides, to disambiguate the same texture with different hints
+ int mesh_drawflag;
+ int mesh_defaulttexflags;
+ int mesh_defaultmaterialflags;
}
texture_t;
void Mod_Mesh_Create(dp_model_t *mod, const char *name);
void Mod_Mesh_Destroy(dp_model_t *mod);
void Mod_Mesh_Reset(dp_model_t *mod);
-texture_t *Mod_Mesh_GetTexture(dp_model_t *mod, const char *name, int defaultdrawflags, int defaulttexflags, int addmaterialflags);
+texture_t *Mod_Mesh_GetTexture(dp_model_t *mod, const char *name, int defaultdrawflags, int defaulttexflags, int defaultmaterialflags);
msurface_t *Mod_Mesh_AddSurface(dp_model_t *mod, texture_t *tex, qboolean batchwithprevioussurface);
int Mod_Mesh_IndexForVertex(dp_model_t *mod, msurface_t *surf, float x, float y, float z, float nx, float ny, float nz, float s, float t, float u, float v, float r, float g, float b, float a);
void Mod_Mesh_AddTriangle(dp_model_t *mod, msurface_t *surf, int e0, int e1, int e2);