Browse Source

Fix windows build

--HG--
branch : minor
Alex Szpakowski 7 years ago
parent
commit
7ffb04f019
2 changed files with 1 additions and 29 deletions
  1. 0 2
      src/modules/graphics/vertex.cpp
  2. 1 27
      src/modules/graphics/vertex.h

+ 0 - 2
src/modules/graphics/vertex.cpp

@@ -37,8 +37,6 @@ static_assert(sizeof(XYf_STf_RGBAub) == sizeof(float)*2 + sizeof(float)*2 + size
 static_assert(sizeof(XYf_STus_RGBAub) == sizeof(float)*2 + sizeof(uint16)*2 + sizeof(Color), "sizeof(XYf_STus_RGBAub) incorrect!");
 static_assert(sizeof(XYf_STPf_RGBAub) == sizeof(float)*2 + sizeof(float)*3 + sizeof(Color), "sizeof(XYf_STPf_RGBAub) incorrect!");
 
-static_assert(sizeof(AttributeInfo) == sizeof(uint64), "sizeof(AttributeInfo) incorrect!");
-
 size_t getFormatStride(CommonFormat format)
 {
 	switch (format)

+ 1 - 27
src/modules/graphics/vertex.h

@@ -212,11 +212,7 @@ struct Attributes
 	uint32 enablebits = 0;
 	uint32 instancebits = 0;
 
-	union
-	{
-		AttributeInfo attribs[MAX];
-		uint64 data[MAX];
-	};
+	AttributeInfo attribs[MAX];
 
 	Attributes() {}
 	Attributes(CommonFormat format, uint8 bufferindex)
@@ -263,28 +259,6 @@ struct Attributes
 	}
 
 	void setCommonFormat(CommonFormat format, uint8 bufferindex);
-
-	bool operator == (const Attributes &other) const
-	{
-		if (enablebits != other.enablebits)
-			return false;
-
-		uint32 instancediff = instancebits ^ other.instancebits;
-
-		for (unsigned int i = 0; i < MAX; i++)
-		{
-			if (isEnabled(i))
-			{
-				if (instancediff & (1u << i))
-					return false;
-
-				if (data[i] != other.data[i])
-					return false;
-			}
-		}
-
-		return true;
-	}
 };
 
 size_t getFormatStride(CommonFormat format);