Просмотр исходного кода

Do not call bgfx::frame() from RenderWorld

Daniele Bartolini 11 лет назад
Родитель
Сommit
eb305f7adf
2 измененных файлов с 1 добавлено и 7 удалено
  1. 1 0
      engine/crown.cpp
  2. 0 7
      engine/renderers/render_world.cpp

+ 1 - 0
engine/crown.cpp

@@ -210,6 +210,7 @@ void update()
 		console_server_globals::console().update();
 #endif
 		device()->update();
+		bgfx::frame();
 		input_globals::keyboard().update();
 		input_globals::mouse().update();
 		input_globals::touch().update();

+ 0 - 7
engine/renderers/render_world.cpp

@@ -110,9 +110,6 @@ void RenderWorld::update(const Matrix4x4& view, const Matrix4x4& projection, uin
 {
 	bgfx::reset(width, height, BGFX_RESET_VSYNC);
 
-	// Enable debug text.
-	// bgfx::setDebug(BGFX_DEBUG_TEXT);
-
 	// Set view 0 clear state.
 	bgfx::setViewClear(0
 		, BGFX_CLEAR_COLOR_BIT|BGFX_CLEAR_DEPTH_BIT
@@ -138,10 +135,6 @@ void RenderWorld::update(const Matrix4x4& view, const Matrix4x4& projection, uin
 	{
 		m_sprite[s]->render();
 	}
-
-	// Advance to next frame. Rendering thread will be kicked to 
-	// process submitted rendering primitives.
-	bgfx::frame();
 }
 
 } // namespace crown