Sprite Batcher has fields for optional texture/sampler uniform names

This commit is contained in:
Noel Berry
2021-08-06 16:03:44 -07:00
parent ba3c60b6cd
commit 8f9c6aa9ff
4 changed files with 37 additions and 5 deletions

View File

@ -48,7 +48,9 @@ namespace Blah
{
public:
// The name of the Matrix Uniform in the Shader
// The name of the default uniforms to set
const char* texture_uniform;
const char* sampler_uniform;
const char* matrix_uniform;
// Default Sampler, set on clear

View File

@ -65,6 +65,9 @@ namespace Blah
// Gets a pointer to the values of the given Uniform, or nullptr if it doesn't exist.
const float* get_value(const char* name, i64* length = nullptr) const;
// Checks if the shader attached to the material has a uniform value with the given name
bool has_value(const char* name) const;
// Returns the internal Texture buffer
const Vector<TextureRef>& textures() const;