Преглед изворни кода

device: blit frame as a last step before editor GUI

Daniele Bartolini пре 4 година
родитељ
комит
efe3d51e16
2 измењених фајлова са 4 додато и 4 уклоњено
  1. 3 4
      src/device/device.cpp
  2. 1 0
      src/device/pipeline.h

+ 3 - 4
src/device/device.cpp

@@ -482,6 +482,8 @@ void Device::run()
 
 
 #if CROWN_TOOLS
 #if CROWN_TOOLS
 		tool_update(dt);
 		tool_update(dt);
+#else
+		_pipeline->render(*_shader_manager, STRING_ID_32("blit", 0xc04ce9f7), VIEW_BLIT, _width, _height);
 #endif
 #endif
 
 
 		bgfx::frame();
 		bgfx::frame();
@@ -627,12 +629,9 @@ void Device::render(World& world, UnitId camera_unit)
 	bgfx::touch(VIEW_DEBUG);
 	bgfx::touch(VIEW_DEBUG);
 	bgfx::touch(VIEW_GUI);
 	bgfx::touch(VIEW_GUI);
 	bgfx::touch(VIEW_GRAPH);
 	bgfx::touch(VIEW_GRAPH);
+	bgfx::touch(VIEW_BLIT);
 
 
 	world.render(view);
 	world.render(view);
-
-#if !CROWN_TOOLS
-	_pipeline->render(*_shader_manager, STRING_ID_32("blit", 0xc04ce9f7), 0, _width, _height);
-#endif // CROWN_TOOLS
 }
 }
 
 
 World* Device::create_world()
 World* Device::create_world()

+ 1 - 0
src/device/pipeline.h

@@ -20,6 +20,7 @@
 #define VIEW_DEBUG     17
 #define VIEW_DEBUG     17
 #define VIEW_GUI      128
 #define VIEW_GUI      128
 #define VIEW_GRAPH    129
 #define VIEW_GRAPH    129
+#define VIEW_BLIT     254
 #define VIEW_IMGUI    255
 #define VIEW_IMGUI    255
 
 
 namespace crown
 namespace crown