Ver código fonte

Rename render_world() to render()

Daniele Bartolini 10 anos atrás
pai
commit
0ede7ed294
3 arquivos alterados com 6 adições e 6 exclusões
  1. 1 1
      src/device.cpp
  2. 2 2
      src/device.h
  3. 3 3
      src/lua/lua_api.cpp

+ 1 - 1
src/device.cpp

@@ -340,7 +340,7 @@ void Device::update()
 	}
 }
 
-void Device::render_world(World& world, CameraInstance camera)
+void Device::render(World& world, CameraInstance camera)
 {
 	bgfx::setViewClear(0
 		, BGFX_CLEAR_COLOR | BGFX_CLEAR_DEPTH

+ 2 - 2
src/device.h

@@ -131,8 +131,8 @@ public:
 	/// Updates all the subsystems.
 	void update();
 
-	/// Renders the given @a world from the point of view of @a camera.
-	void render_world(World& world, CameraInstance camera);
+	/// Renders @a world using @a camera.
+	void render(World& world, CameraInstance camera);
 
 	/// Creates a new world.
 	World* create_world();

+ 3 - 3
src/lua/lua_api.cpp

@@ -2304,10 +2304,10 @@ static int device_destroy_world(lua_State* L)
 	return 0;
 }
 
-static int device_render_world(lua_State* L)
+static int device_render(lua_State* L)
 {
 	LuaStack stack(L);
-	device()->render_world(*stack.get_world(1), stack.get_camera(2));
+	device()->render(*stack.get_world(1), stack.get_camera(2));
 	return 0;
 }
 
@@ -3063,7 +3063,7 @@ void load_api(LuaEnvironment& env)
 	env.load_module_function("Device", "resolution",               device_resolution);
 	env.load_module_function("Device", "create_world",             device_create_world);
 	env.load_module_function("Device", "destroy_world",            device_destroy_world);
-	env.load_module_function("Device", "render_world",             device_render_world);
+	env.load_module_function("Device", "render",                   device_render);
 	env.load_module_function("Device", "create_resource_package",  device_create_resource_package);
 	env.load_module_function("Device", "destroy_resource_package", device_destroy_resource_package);
 	env.load_module_function("Device", "console_send",             device_console_send);