Bladeren bron

Fixed compiler errors.

bkaradzic 12 jaren geleden
bovenliggende
commit
3aea7306c6
6 gewijzigde bestanden met toevoegingen van 16 en 3 verwijderingen
  1. 8 0
      src/bgfx_p.h
  2. 2 0
      src/renderer_d3d11.cpp
  3. 2 0
      src/renderer_d3d9.cpp
  4. 1 0
      src/renderer_gl.cpp
  5. 1 1
      tools/makedisttex.cpp
  6. 2 2
      tools/texturec/texturec.cpp

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

+ 2 - 0
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;

+ 2 - 0
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;

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

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

+ 2 - 2
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) )