From 9abc80cb623348747e498276a90d1bf833251cbe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branimir=20Karad=C5=BEi=C4=87?= Date: Mon, 26 Nov 2018 17:32:15 -0800 Subject: [PATCH] Removed use of debugPrintf. --- src/bgfx.cpp | 34 ++++++++++++++++++++++++++++++++++ src/bgfx_p.h | 1 + src/vertexdecl.cpp | 34 ---------------------------------- src/vertexdecl.h | 3 --- 4 files changed, 35 insertions(+), 37 deletions(-) diff --git a/src/bgfx.cpp b/src/bgfx.cpp index 75b191064..a271f445f 100644 --- a/src/bgfx.cpp +++ b/src/bgfx.cpp @@ -488,6 +488,40 @@ namespace bgfx return handle; } + void dump(const VertexDecl& _decl) + { + if (BX_ENABLED(BGFX_CONFIG_DEBUG) ) + { + BX_TRACE("vertexdecl %08x (%08x), stride %d\n" + , _decl.m_hash + , bx::hash(_decl.m_attributes) + , _decl.m_stride + ); + + for (uint32_t attr = 0; attr < Attrib::Count; ++attr) + { + if (UINT16_MAX != _decl.m_attributes[attr]) + { + uint8_t num; + AttribType::Enum type; + bool normalized; + bool asInt; + _decl.decode(Attrib::Enum(attr), num, type, normalized, asInt); + + BX_TRACE("\tattr %d - %s, num %d, type %d, norm %d, asint %d, offset %d\n" + , attr + , getAttribName(Attrib::Enum(attr) ) + , num + , type + , normalized + , asInt + , _decl.m_offset[attr] + ); + } + } + } + } + #include "charset.h" void charsetFillTexture(const uint8_t* _charset, uint8_t* _rgba, uint32_t _height, uint32_t _pitch, uint32_t _bpp) diff --git a/src/bgfx_p.h b/src/bgfx_p.h index 5b51c0b71..f6dfc434b 100644 --- a/src/bgfx_p.h +++ b/src/bgfx_p.h @@ -528,6 +528,7 @@ namespace bgfx return 1; } + /// Dump vertex declaration into debug output. void dump(const VertexDecl& _decl); struct TextVideoMem diff --git a/src/vertexdecl.cpp b/src/vertexdecl.cpp index 858896773..578315839 100644 --- a/src/vertexdecl.cpp +++ b/src/vertexdecl.cpp @@ -153,40 +153,6 @@ namespace bgfx return s_attrName[_attr*2+1]; } - void dump(const VertexDecl& _decl) - { - if (BX_ENABLED(BGFX_CONFIG_DEBUG) ) - { - bx::debugPrintf("vertexdecl %08x (%08x), stride %d\n" - , _decl.m_hash - , bx::hash(_decl.m_attributes) - , _decl.m_stride - ); - - for (uint32_t attr = 0; attr < Attrib::Count; ++attr) - { - if (UINT16_MAX != _decl.m_attributes[attr]) - { - uint8_t num; - AttribType::Enum type; - bool normalized; - bool asInt; - _decl.decode(Attrib::Enum(attr), num, type, normalized, asInt); - - bx::debugPrintf("\tattr %d - %s, num %d, type %d, norm %d, asint %d, offset %d\n" - , attr - , getAttribName(Attrib::Enum(attr) ) - , num - , type - , normalized - , asInt - , _decl.m_offset[attr] - ); - } - } - } - } - struct AttribToId { Attrib::Enum attr; diff --git a/src/vertexdecl.h b/src/vertexdecl.h index 885b1ae56..2b80b1f50 100644 --- a/src/vertexdecl.h +++ b/src/vertexdecl.h @@ -20,9 +20,6 @@ namespace bgfx /// const char* getAttribNameShort(Attrib::Enum _attr); - /// Dump vertex declaration into debug output. - void dump(const VertexDecl& _decl); - /// Attrib::Enum idToAttrib(uint16_t id);