graphics: handle default textures in high level code.

Previously each backend had to set up default textures with its own code, which needs some care for it to be robust.
This commit is contained in:
Sasha Szpakowski
2023-12-27 21:28:02 +01:00
parent e42019c59e
commit 8872497561
15 changed files with 167 additions and 189 deletions
+2 -1
View File
@@ -1086,7 +1086,8 @@ void ParticleSystem::draw(Graphics *gfx, const Matrix4 &m)
BufferBindings vertexbuffers;
vertexbuffers.set(0, buffer, 0);
gfx->drawQuads(0, pCount, vertexAttributes, vertexbuffers, texture);
Texture *tex = gfx->getTextureOrDefaultForActiveShader(texture);
gfx->drawQuads(0, pCount, vertexAttributes, vertexbuffers, tex);
}
bool ParticleSystem::getConstant(const char *in, AreaSpreadDistribution &out)