add modulate flag check for material rendering

This commit is contained in:
aap
2021-02-06 10:59:38 +01:00
parent 207c2ee244
commit 71d132839e
9 changed files with 39 additions and 18 deletions

View File

@@ -292,6 +292,14 @@ void flushCache(void);
void setTexture(uint32 stage, Texture *tex);
void setMaterial(const RGBA &color, const SurfaceProperties &surfaceprops, float extraSurfProp = 0.0f);
inline void setMaterial(uint32 flags, const RGBA &color, const SurfaceProperties &surfaceprops, float extraSurfProp = 0.0f)
{
static RGBA white = { 255, 255, 255, 255 };
if(flags & Geometry::MODULATE)
setMaterial(color, surfaceprops, extraSurfProp);
else
setMaterial(white, surfaceprops, extraSurfProp);
}
void setVertexShader(void *vs);
void setPixelShader(void *ps);