Browse Source

Added varying.def to dependencies.

bkaradzic 12 years ago
parent
commit
c487afa8ef
3 changed files with 10 additions and 8 deletions
  1. 2 7
      examples/10-font/font.cpp
  2. BIN
      tools/bin/shaderc.exe
  3. 8 1
      tools/shaderc/shaderc.cpp

+ 2 - 7
examples/10-font/font.cpp

@@ -7,6 +7,7 @@
 #include <bx/bx.h>
 #include <bx/timer.h>
 #include <bx/countof.h>
+#include <bx/string.h>
 #include "../common/entry.h"
 #include "../common/dbg.h"
 #include "../common/math.h"
@@ -18,12 +19,6 @@
 #include <stdio.h>
 #include <wchar.h>
 
-#if defined(__MINGW32__)
-#	define swnprintf(_out, _count, _format, ...) swprintf(_out, _format, ##__VA_ARGS__)
-#else
-#	define swnprintf(_out, _count, _format, ...) swprintf(_out, _count, _format, ##__VA_ARGS__)
-#endif // defined(__MINGW__)
-
 int _main_(int /*_argc*/, char** /*_argv*/)
 {
 	uint32_t width = 1280;
@@ -151,7 +146,7 @@ int _main_(int /*_argc*/, char** /*_argv*/)
 
 		// Use transient text to display debug information.
 		wchar_t fpsText[64];
-		swnprintf(fpsText, countof(fpsText), L"Frame: % 7.3f[ms]", double(frameTime) * toMs);
+		bx::swnprintf(fpsText, countof(fpsText), L"Frame: % 7.3f[ms]", double(frameTime) * toMs);
 
 		textBufferManager->clearTextBuffer(transientText);
 		textBufferManager->setPenPosition(transientText, 20.0, 4.0f);

BIN
tools/bin/shaderc.exe


+ 8 - 1
tools/shaderc/shaderc.cpp

@@ -1459,8 +1459,15 @@ int main(int _argc, const char* _argv[])
 	{
 		VaryingMap varyingMap;
 
-		File attribdef(cmdLine.findOption("varyingdef", "varying.def.sc") );
+		const char* varyingdef = cmdLine.findOption("varyingdef", "varying.def.sc");
+		File attribdef(varyingdef);
 		const char* parse = attribdef.getData();
+		if (NULL != parse
+		&&  *parse != '\0')
+		{
+			preprocessor.addDependency(varyingdef);
+		}
+
 		while (NULL != parse
 		   &&  *parse != '\0')
 		{