Daniele Bartolini 10 年之前
父节点
当前提交
7d3ae33815
共有 1 个文件被更改,包括 57 次插入57 次删除
  1. 57 57
      src/renderers/shader.cpp

+ 57 - 57
src/renderers/shader.cpp

@@ -55,25 +55,6 @@ namespace shader_resource
 		};
 	};
 
-	struct DepthTestInfo
-	{
-		const char* name;
-		DepthFunction::Enum value;
-	};
-
-	static DepthTestInfo _depth_test_map[] =
-	{
-		{ "less",     DepthFunction::LESS     },
-		{ "lequal",   DepthFunction::LEQUAL   },
-		{ "equal",    DepthFunction::EQUAL    },
-		{ "gequal",   DepthFunction::GEQUAL   },
-		{ "greater",  DepthFunction::GREATER  },
-		{ "notequal", DepthFunction::NOTEQUAL },
-		{ "never",    DepthFunction::NEVER    },
-		{ "always",   DepthFunction::ALWAYS   }
-	};
-	CE_STATIC_ASSERT(CE_COUNTOF(_depth_test_map) == DepthFunction::COUNT);
-
 	struct BlendFunction
 	{
 		enum Enum
@@ -96,6 +77,63 @@ namespace shader_resource
 		};
 	};
 
+	struct BlendEquation
+	{
+		enum Enum
+		{
+			ADD,
+			SUB,
+			REVSUB,
+			MIN,
+			MAX,
+
+			COUNT
+		};
+	};
+
+	struct CullMode
+	{
+		enum Enum
+		{
+			CW,
+			CCW,
+
+			COUNT
+		};
+	};
+
+	struct PrimitiveType
+	{
+		enum Enum
+		{
+			PT_TRISTRIP,
+			PT_LINES,
+			PT_LINESTRIP,
+			PT_POINTS,
+
+			COUNT
+		};
+	};
+
+	struct DepthTestInfo
+	{
+		const char* name;
+		DepthFunction::Enum value;
+	};
+
+	static DepthTestInfo _depth_test_map[] =
+	{
+		{ "less",     DepthFunction::LESS     },
+		{ "lequal",   DepthFunction::LEQUAL   },
+		{ "equal",    DepthFunction::EQUAL    },
+		{ "gequal",   DepthFunction::GEQUAL   },
+		{ "greater",  DepthFunction::GREATER  },
+		{ "notequal", DepthFunction::NOTEQUAL },
+		{ "never",    DepthFunction::NEVER    },
+		{ "always",   DepthFunction::ALWAYS   }
+	};
+	CE_STATIC_ASSERT(CE_COUNTOF(_depth_test_map) == DepthFunction::COUNT);
+
 	struct BlendFunctionInfo
 	{
 		const char* name;
@@ -120,20 +158,6 @@ namespace shader_resource
 	};
 	CE_STATIC_ASSERT(CE_COUNTOF(_blend_function_map) == BlendFunction::COUNT);
 
-	struct BlendEquation
-	{
-		enum Enum
-		{
-			ADD,
-			SUB,
-			REVSUB,
-			MIN,
-			MAX,
-
-			COUNT
-		};
-	};
-
 	struct BlendEquationInfo
 	{
 		const char* name;
@@ -150,17 +174,6 @@ namespace shader_resource
 	};
 	CE_STATIC_ASSERT(CE_COUNTOF(_blend_equation_map) == BlendEquation::COUNT);
 
-	struct CullMode
-	{
-		enum Enum
-		{
-			CW,
-			CCW,
-
-			COUNT
-		};
-	};
-
 	struct CullModeInfo
 	{
 		const char* name;
@@ -174,19 +187,6 @@ namespace shader_resource
 	};
 	CE_STATIC_ASSERT(CE_COUNTOF(_cull_mode_map) == CullMode::COUNT);
 
-	struct PrimitiveType
-	{
-		enum Enum
-		{
-			PT_TRISTRIP,
-			PT_LINES,
-			PT_LINESTRIP,
-			PT_POINTS,
-
-			COUNT
-		};
-	};
-
 	struct PrimitiveTypeInfo
 	{
 		const char* name;