Przeglądaj źródła

world: remove unused parameter

Daniele Bartolini 8 lat temu
rodzic
commit
e75a7b4835

+ 1 - 1
src/device/device.cpp

@@ -669,7 +669,7 @@ void Device::render(World& world, UnitId camera_unit)
 	bgfx::touch(VIEW_DEBUG);
 	bgfx::touch(VIEW_GUI);
 
-	world.render(view, proj);
+	world.render(view);
 
 #if !CROWN_TOOLS
 	_pipeline->render(*_shader_manager, StringId32("blit"), 0, _width, _height);

+ 1 - 1
src/world/render_world.cpp

@@ -374,7 +374,7 @@ void RenderWorld::update_transforms(const UnitId* begin, const UnitId* end, cons
 	}
 }
 
-void RenderWorld::render(const Matrix4x4& view, const Matrix4x4& projection)
+void RenderWorld::render(const Matrix4x4& view)
 {
 	MeshManager::MeshInstanceData& mid = _mesh_manager._data;
 	SpriteManager::SpriteInstanceData& sid = _sprite_manager._data;

+ 1 - 1
src/world/render_world.h

@@ -129,7 +129,7 @@ struct RenderWorld
 
 	void update_transforms(const UnitId* begin, const UnitId* end, const Matrix4x4* world);
 
-	void render(const Matrix4x4& view, const Matrix4x4& projection);
+	void render(const Matrix4x4& view);
 
 	/// Sets whether to @a enable debug drawing
 	void enable_debug_drawing(bool enable);

+ 2 - 2
src/world/world.cpp

@@ -235,9 +235,9 @@ void World::update(f32 dt)
 	update_scene(dt);
 }
 
-void World::render(const Matrix4x4& view, const Matrix4x4& projection)
+void World::render(const Matrix4x4& view)
 {
-	_render_world->render(view, projection);
+	_render_world->render(view);
 
 	_physics_world->debug_draw();
 	_render_world->debug_draw(*_lines);

+ 2 - 2
src/world/world.h

@@ -154,8 +154,8 @@ struct World
 	/// Updates all units and sub-systems with the given @a dt delta time.
 	void update(f32 dt);
 
-	/// Renders the world using @a view and @a projection.
-	void render(const Matrix4x4& view, const Matrix4x4& projection);
+	/// Renders the world using @a view.
+	void render(const Matrix4x4& view);
 
 	SoundInstanceId play_sound(const SoundResource& sr, bool loop = false, f32 volume = 1.0f, const Vector3& position = VECTOR3_ZERO, f32 range = 50.0f);