Bugfix/merge fixes (#11)
This commit is contained in:
parent
a3e89b4e8f
commit
1297af3db1
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -8,4 +8,6 @@ riderModule.iml
|
|||
test-results
|
||||
cmake-build-vs-debug/
|
||||
cmake-build-debug/
|
||||
cmake-build-debug-msvc/
|
||||
cmake-build-debug-msvc-vs/
|
||||
/.idea/
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
#include "SHObject.h"
|
||||
#include "SDL_events.h"
|
||||
#include <memory>
|
||||
#include "vlkx/vulkan/abstraction/Commands.h"
|
||||
|
||||
namespace ShadowEngine {
|
||||
|
|
|
@ -33,7 +33,6 @@ namespace ShadowEngine {
|
|||
|
||||
Module &GetModule(const std::string& name);
|
||||
|
||||
/*
|
||||
template<typename T>
|
||||
T *GetModuleByType() {
|
||||
for (auto &module: modules) {
|
||||
|
@ -42,7 +41,7 @@ namespace ShadowEngine {
|
|||
}
|
||||
//SH_CORE_ERROR("Can't find the module {0}", T::Type());
|
||||
return nullptr;
|
||||
} */
|
||||
}
|
||||
|
||||
void Init();
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
#include <glm/glm.hpp>
|
||||
#include <glm/gtc/matrix_transform.hpp>
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
|
||||
namespace vlkx {
|
||||
class Camera {
|
||||
|
|
|
@ -174,7 +174,7 @@ void VulkanModule::Init() {
|
|||
}
|
||||
|
||||
void VulkanModule::BeginRenderPass(const std::unique_ptr<vlkx::RenderCommand>& commands) {
|
||||
const auto update = !editorEnabled ? [](const int frame) { ShadowEngine::ModuleManager::instance->Update(frame); } : nullptr;
|
||||
const auto update = !editorEnabled ? [](const int frame) { ShadowEngine::ModuleManager::instance->Update(frame); } : [](const int frame) {};
|
||||
|
||||
const auto res = commands->execute(commands->getFrame(), swapchain->swapChain, update,
|
||||
[this](const VkCommandBuffer& buffer, int frame) {
|
||||
|
@ -194,9 +194,13 @@ void VulkanModule::BeginRenderPass(const std::unique_ptr<vlkx::RenderCommand>& c
|
|||
ImGui_ImplSDL2_NewFrame();
|
||||
ImGui::NewFrame();
|
||||
|
||||
if (editorEnabled)
|
||||
ImGui::Image(editorRenderPlanes[0], { 640, 480 });
|
||||
|
||||
if (editorEnabled) {
|
||||
static bool active = true;
|
||||
if (ImGui::Begin("Game View", &active, ImGuiWindowFlags_None)) {
|
||||
ImGui::Image((ImTextureID) editorRenderPlanes[0], {640, 480});
|
||||
}
|
||||
ImGui::End();
|
||||
}
|
||||
ShadowEngine::ModuleManager::instance->OverlayRender();
|
||||
|
||||
ImGui::Render();
|
||||
|
|
|
@ -13,5 +13,5 @@ target_link_libraries(test-game PUBLIC shadow-engine)
|
|||
|
||||
add_custom_command(TARGET test-game
|
||||
POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/resources ${CMAKE_CURRENT_BINARY_DIR}/vlkx-resources
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${PROJECT_SOURCE_DIR}/resources ${CMAKE_CURRENT_BINARY_DIR}/resources
|
||||
)
|
Loading…
Reference in New Issue
Block a user