Explorar o código

Removed use of debugPrintf.

Branimir Karadžić %!s(int64=7) %!d(string=hai) anos
pai
achega
9abc80cb62
Modificáronse 4 ficheiros con 35 adicións e 37 borrados
  1. 34 0
      src/bgfx.cpp
  2. 1 0
      src/bgfx_p.h
  3. 0 34
      src/vertexdecl.cpp
  4. 0 3
      src/vertexdecl.h

+ 34 - 0
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<bx::HashMurmur2A>(_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)

+ 1 - 0
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

+ 0 - 34
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<bx::HashMurmur2A>(_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;

+ 0 - 3
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);