瀏覽代碼

Rename to graphics_types.h

Daniele Bartolini 10 年之前
父節點
當前提交
a7907a2830
共有 2 個文件被更改,包括 75 次插入20 次删除
  1. 75 0
      src/renderers/graphics_types.h
  2. 0 20
      src/renderers/render_world_types.h

+ 75 - 0
src/renderers/graphics_types.h

@@ -0,0 +1,75 @@
+/*
+ * Copyright (c) 2012-2016 Daniele Bartolini and individual contributors.
+ * License: https://github.com/taylor001/crown/blob/master/LICENSE
+ */
+
+#pragma once
+
+#include "types.h"
+#include "string_id.h"
+
+namespace crown
+{
+
+class ShaderManager;
+class MaterialManager;
+class RenderWorld;
+
+struct MeshInstance
+{
+	uint32_t i;
+};
+
+struct SpriteInstance
+{
+	uint32_t i;
+};
+
+struct LightInstance
+{
+	uint32_t i;
+};
+
+/// Enumerates light types.
+///
+/// @ingroup Graphics
+struct LightType
+{
+	enum Enum
+	{
+		DIRECTIONAL,
+		OMNI,
+		SPOT,
+
+		COUNT
+	};
+};
+
+struct MeshRendererDesc
+{
+	StringId64 mesh_resource;
+	StringId32 mesh_name;
+	StringId64 material_resource; // FIXME
+	bool visible;
+	char _pad[3];
+};
+
+struct SpriteRendererDesc
+{
+	StringId64 sprite_resource;
+	StringId64 material_resource; // FIXME
+	bool visible;
+	char _pad[3];
+	char _pad1[4];
+};
+
+struct LightDesc
+{
+	uint32_t type;    // LightType::Enum
+	float range;      // In meters
+	float intensity;
+	float spot_angle; // In radians
+	Vector3 color;
+};
+
+} // namespace crown

+ 0 - 20
src/renderers/render_world_types.h

@@ -1,20 +0,0 @@
-/*
- * Copyright (c) 2012-2016 Daniele Bartolini and individual contributors.
- * License: https://github.com/taylor001/crown/blob/master/LICENSE
- */
-
-#pragma once
-
-#include "types.h"
-
-namespace crown
-{
-
-typedef Id MeshId;
-typedef Id SpriteId;
-typedef Id GuiId;
-typedef Id MaterialId;
-
-class RenderWorld;
-
-} // namespace crown