Better error handling for createUniform.
This commit is contained in:
parent
5023791028
commit
78cb2bb14a
@ -2018,7 +2018,12 @@ namespace bgfx
|
||||
|
||||
UniformHandle createUniform(const char* _name, UniformType::Enum _type, uint16_t _num)
|
||||
{
|
||||
BX_CHECK(PredefinedUniform::Count == nameToPredefinedUniformEnum(_name), "%s is predefined uniform name.", _name);
|
||||
BX_WARN(PredefinedUniform::Count == nameToPredefinedUniformEnum(_name), "%s is predefined uniform name.", _name);
|
||||
if (PredefinedUniform::Count != nameToPredefinedUniformEnum(_name) )
|
||||
{
|
||||
UniformHandle handle = BGFX_INVALID_HANDLE;
|
||||
return handle;
|
||||
}
|
||||
|
||||
UniformHandle handle = { m_uniformHandle.alloc() };
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user