From be8b8381ccca510582bdc08a7926c7f95d61e89c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branimir=20Karad=C5=BEi=C4=87?= Date: Mon, 17 Sep 2018 20:51:21 -0700 Subject: [PATCH] Cleanup. --- examples/common/debugdraw/debugdraw.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/examples/common/debugdraw/debugdraw.cpp b/examples/common/debugdraw/debugdraw.cpp index d5b5174b3..c1a538df3 100644 --- a/examples/common/debugdraw/debugdraw.cpp +++ b/examples/common/debugdraw/debugdraw.cpp @@ -1873,13 +1873,19 @@ struct DebugDrawEncoderImpl else { float mtx[16]; - bx::mtxFromNormal(mtx, _normal, _size*0.5f, _center); + bx::mtxFromNormal(mtx, _normal, _size*0.5f, _center, attrib.m_spin); draw(Mesh::Quad, mtx, 1, false); } } void drawQuad(SpriteHandle _handle, const float* _normal, const float* _center, float _size) { + if (!isValid(_handle) ) + { + drawQuad(_normal, _center, _size); + return; + } + if (m_posQuad == BX_COUNTOF(m_cacheQuad) ) { flushQuad();