mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-11-28 18:45:54 -05:00
Better error handling for createUniform.
This commit is contained in:
parent
5023791028
commit
78cb2bb14a
1 changed files with 6 additions and 1 deletions
|
@ -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 a new issue