From 5cc236cc218ceb0c46ac6c761037e8db42676383 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branimir=20Karad=C5=BEi=C4=87?= Date: Fri, 15 Dec 2017 20:25:43 -0800 Subject: [PATCH] Fixed setUniform. --- src/bgfx.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bgfx.cpp b/src/bgfx.cpp index fc6f190c4..94f5c72b2 100644 --- a/src/bgfx.cpp +++ b/src/bgfx.cpp @@ -2968,7 +2968,7 @@ error: const Context::UniformRef& uniform = s_ctx->m_uniformRef[_handle.idx]; BX_CHECK(isValid(_handle) && 0 < uniform.m_refCount, "Setting invalid uniform (handle %3d)!", _handle.idx); BX_CHECK(_num == UINT16_MAX || uniform.m_num >= _num, "Truncated uniform update. %d (max: %d)", _num, uniform.m_num); - BGFX_ENCODER(setUniform(uniform.m_type, _handle, _value, _num) ); + BGFX_ENCODER(setUniform(uniform.m_type, _handle, _value, UINT16_MAX != _num ? _num : uniform.m_num) ); } void Encoder::setIndexBuffer(IndexBufferHandle _handle)