comment out imgui stuff for now

This commit is contained in:
CocoSimone
2022-08-11 19:54:03 +02:00
parent 402062920e
commit 2e05e81c53
10 changed files with 40 additions and 25 deletions

BIN
external/frag.spv vendored

Binary file not shown.

View File

@@ -114,6 +114,7 @@ WSI* LoadWSIPlatform(Vulkan::WSIPlatform* wsi_platform, std::unique_ptr<Parallel
wsi = new WSI();
wsi->set_backbuffer_srgb(false);
wsi->set_platform(wsi_platform);
wsi->set_present_mode(PresentMode::SyncToVBlank);
Context::SystemHandles handles;
if (!wsi->init_simple(1, handles)) {
util::panic("Failed to initialize WSI!");
@@ -140,8 +141,8 @@ void LoadParallelRDP(const u8* rdram) {
fragLayout.sets[0].array_size[0] = 1;
u32* fullscreenQuadVert, *fullscreenQuadFrag;
auto sizeVert = util::ReadFileBinary("external/vert.spv", fullscreenQuadVert);
auto sizeFrag = util::ReadFileBinary("external/frag.spv", fullscreenQuadFrag);
auto sizeVert = util::ReadFileBinary("resources/vert.spv", &fullscreenQuadVert);
auto sizeFrag = util::ReadFileBinary("resources/frag.spv", &fullscreenQuadFrag);
fullscreen_quad_program = wsi->get_device().request_program(fullscreenQuadVert, sizeVert, fullscreenQuadFrag, sizeFrag, &vertLayout, &fragLayout);
@@ -239,7 +240,7 @@ void UpdateScreen(Window& imguiWindow, Util::IntrusivePtr<Image> image) {
cmd->begin_render_pass(wsi->get_device().get_swapchain_render_pass(SwapchainRenderPass::ColorOnly));
DrawFullscreenTexturedQuad(image, cmd);
ImGui_ImplVulkan_RenderDrawData(imguiWindow.Present(), cmd->get_command_buffer());
//ImGui_ImplVulkan_RenderDrawData(imguiWindow.Present(), cmd->get_command_buffer());
cmd->end_render_pass();
wsi->get_device().submit(cmd);

20
external/shader.frag vendored
View File

@@ -1,20 +0,0 @@
#version 450
layout(location = 0) in vec2 vUV;
layout(location = 0) out vec4 FragColor;
layout(set = 0, binding = 0) uniform sampler2D uImage;
layout(push_constant) uniform Screen {
vec2 size;
vec2 offset;
} uScreen;
layout(constant_id = 0) const float Scale = 1.0;
void main() {
vec2 uv = (vUV - uScreen.offset) / uScreen.size;
if (uv.x < 0.0 || uv.x > 1.0 || uv.y < 0.0 || uv.y > 1.0) {
FragColor = vec4(0, 0, 0, 1);
} else {
FragColor = Scale * textureLod(uImage, uv, 0.0);
}
}

View File

@@ -1,8 +0,0 @@
#version 450
layout(location = 0) in vec2 Position;
layout(location = 0) out highp vec2 vUV;
void main() {
gl_Position = vec4(Position, 0.0, 1.0);
vUV = 0.5 * Position + 0.5;
}

BIN
external/vert.spv vendored

Binary file not shown.