Branimir Karadžić 8 년 전
부모
커밋
b13dc2373a
1개의 변경된 파일22개의 추가작업 그리고 18개의 파일을 삭제
  1. 22 18
      tools/texturec/texturec.cpp

+ 22 - 18
tools/texturec/texturec.cpp

@@ -13,6 +13,8 @@
 
 
 #if 0
 #if 0
 #	define DBG(_format, ...) fprintf(stderr, "" _format "\n", ##__VA_ARGS__)
 #	define DBG(_format, ...) fprintf(stderr, "" _format "\n", ##__VA_ARGS__)
+#else
+#	define DBG(...) BX_NOOP()
 #endif // DEBUG
 #endif // DEBUG
 
 
 #include <bx/bx.h>
 #include <bx/bx.h>
@@ -33,6 +35,26 @@ struct Options
 	{
 	{
 	}
 	}
 
 
+	void dump()
+	{
+		DBG("Options:\n"
+			"\t  maxSize: %d\n"
+			"\t     edge: %f\n"
+			"\t   format: %s\n"
+			"\t     mips: %s\n"
+			"\tnormalMap: %s\n"
+			"\t      iqa: %s\n"
+			"\t      sdf: %s\n"
+			, maxSize
+			, edge
+			, bimg::getName(format)
+			, mips      ? "true" : "false"
+			, normalMap ? "true" : "false"
+			, iqa       ? "true" : "false"
+			, sdf       ? "true" : "false"
+			);
+	}
+
 	uint32_t maxSize;
 	uint32_t maxSize;
 	float edge;
 	float edge;
 	bimg::TextureFormat::Enum format;
 	bimg::TextureFormat::Enum format;
@@ -44,24 +66,6 @@ struct Options
 
 
 bimg::ImageContainer* convert(bx::AllocatorI* _allocator, const void* _inputData, uint32_t _inputSize, const Options& _options)
 bimg::ImageContainer* convert(bx::AllocatorI* _allocator, const void* _inputData, uint32_t _inputSize, const Options& _options)
 {
 {
-
-	DBG("Options:\n"
-		"\t  maxSize: %d\n"
-		"\t     edge: %f\n"
-		"\t   format: %s\n"
-		"\t     mips: %s\n"
-		"\tnormalMap: %s\n"
-		"\t      iqa: %s\n"
-		"\t      sdf: %s\n"
-		, _options.maxSize
-		, _options.edge
-		, bimg::getName(_options.format)
-		, _options.mips ? "true" : "false"
-		, _options.normalMap ? "true" : "false"
-		, _options.iqa ? "true" : "false"
-		, _options.sdf ? "true" : "false"
-		);
-
 	const uint8_t* inputData = (uint8_t*)_inputData;
 	const uint8_t* inputData = (uint8_t*)_inputData;
 
 
 	bimg::ImageContainer* output = NULL;
 	bimg::ImageContainer* output = NULL;