Przeglądaj źródła

device: blit frame as a last step before editor GUI

Daniele Bartolini 4 lat temu
rodzic
commit
efe3d51e16
2 zmienionych plików z 4 dodań i 4 usunięć
  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
 		tool_update(dt);
+#else
+		_pipeline->render(*_shader_manager, STRING_ID_32("blit", 0xc04ce9f7), VIEW_BLIT, _width, _height);
 #endif
 
 		bgfx::frame();
@@ -627,12 +629,9 @@ void Device::render(World& world, UnitId camera_unit)
 	bgfx::touch(VIEW_DEBUG);
 	bgfx::touch(VIEW_GUI);
 	bgfx::touch(VIEW_GRAPH);
+	bgfx::touch(VIEW_BLIT);
 
 	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()

+ 1 - 0
src/device/pipeline.h

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