mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-11-28 18:45:54 -05:00
Fixed uniform leak at shutdown.
This commit is contained in:
parent
ac653682b6
commit
612eb2f7ed
2 changed files with 7 additions and 0 deletions
|
@ -963,6 +963,11 @@ namespace
|
|||
bgfx::destroyUniform(gl->u_params);
|
||||
bgfx::destroyUniform(gl->s_tex);
|
||||
|
||||
if (bgfx::isValid(gl->u_halfTexel) )
|
||||
{
|
||||
bgfx::destroyUniform(gl->u_halfTexel);
|
||||
}
|
||||
|
||||
for (uint32_t ii = 0, num = gl->ntextures; ii < num; ++ii)
|
||||
{
|
||||
if (bgfx::isValid(gl->textures[ii].id) )
|
||||
|
|
|
@ -2520,6 +2520,8 @@ namespace bgfx
|
|||
BX_WARN(isValid(handle), "Failed to allocate uniform handle.");
|
||||
if (isValid(handle) )
|
||||
{
|
||||
BX_TRACE("Creating uniform (handle %3d) %s", handle.idx, _name);
|
||||
|
||||
UniformRef& uniform = m_uniformRef[handle.idx];
|
||||
uniform.m_refCount = 1;
|
||||
uniform.m_type = _type;
|
||||
|
|
Loading…
Reference in a new issue