diff --git a/src/bgfx_p.h b/src/bgfx_p.h index 17959a200..24572c5e7 100755 --- a/src/bgfx_p.h +++ b/src/bgfx_p.h @@ -175,6 +175,14 @@ namespace bgfx struct Rect { + void clear() + { + m_x = + m_y = + m_width = + m_height = 0; + } + bool isZero() const { uint64_t ui64 = *( (uint64_t*)this); diff --git a/src/renderer_d3d11.cpp b/src/renderer_d3d11.cpp index fd1c4e6c1..aef66a920 100644 --- a/src/renderer_d3d11.cpp +++ b/src/renderer_d3d11.cpp @@ -2275,6 +2275,7 @@ namespace bgfx mbstowcs(name, _marker, size-2); PIX_SETMARKER(D3DCOLOR_RGBA(0xff, 0xff, 0xff, 0xff), name); #endif // BGFX_CONFIG_DEBUG_PIX + BX_UNUSED(_marker, _size); } void Context::rendererSubmit() @@ -2327,6 +2328,7 @@ namespace bgfx uint32_t primNumVerts = 3; bool viewHasScissor = false; Rect viewScissorRect; + viewScissorRect.clear(); uint32_t statsNumPrimsSubmitted = 0; uint32_t statsNumIndices = 0; diff --git a/src/renderer_d3d9.cpp b/src/renderer_d3d9.cpp index 68907344a..e688ff219 100644 --- a/src/renderer_d3d9.cpp +++ b/src/renderer_d3d9.cpp @@ -2212,6 +2212,7 @@ namespace bgfx mbstowcs(name, _marker, size-2); PIX_SETMARKER(D3DCOLOR_RGBA(0xff, 0xff, 0xff, 0xff), name); #endif // BGFX_CONFIG_DEBUG_PIX + BX_UNUSED(_marker, _size); } void Context::rendererSubmit() @@ -2263,6 +2264,7 @@ namespace bgfx uint32_t primNumVerts = 3; bool viewHasScissor = false; Rect viewScissorRect; + viewScissorRect.clear(); uint32_t statsNumPrimsSubmitted = 0; uint32_t statsNumIndices = 0; diff --git a/src/renderer_gl.cpp b/src/renderer_gl.cpp index 15981e69c..7e0448950 100644 --- a/src/renderer_gl.cpp +++ b/src/renderer_gl.cpp @@ -2821,6 +2821,7 @@ namespace bgfx GLuint currentVao = 0; bool viewHasScissor = false; Rect viewScissorRect; + viewScissorRect.clear(); uint32_t statsNumPrimsSubmitted = 0; uint32_t statsNumIndices = 0; diff --git a/tools/makedisttex.cpp b/tools/makedisttex.cpp index 12330e739..88db9dc01 100644 --- a/tools/makedisttex.cpp +++ b/tools/makedisttex.cpp @@ -114,7 +114,7 @@ inline double saturate(double _val) int main(int _argc, const char* _argv[]) { - CommandLine cmdLine(_argc, _argv); + bx::CommandLine cmdLine(_argc, _argv); const char* inFilePath = cmdLine.findOption('i'); if (NULL == inFilePath) diff --git a/tools/texturec/texturec.cpp b/tools/texturec/texturec.cpp index 0d99316a5..1f3189a04 100644 --- a/tools/texturec/texturec.cpp +++ b/tools/texturec/texturec.cpp @@ -119,8 +119,8 @@ int main(int _argc, const char* _argv[]) for (uint32_t lod = 0, num = dds.m_numMips; lod < num; ++lod) { - width = uint32_max(1, width); - height = uint32_max(1, height); + width = bx::uint32_max(1, width); + height = bx::uint32_max(1, height); Mip mip; if (getRawImageData(dds, side, lod, mem, mip) )