From e02d3dbd590810df98b08c17fd81e6ce28711af8 Mon Sep 17 00:00:00 2001 From: LaG1924 Date: Sat, 20 Nov 2021 16:35:20 +0500 Subject: Fixed some broken graphics features --- src/Render.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/Render.cpp') diff --git a/src/Render.cpp b/src/Render.cpp index 6301ff5..02f56ff 100644 --- a/src/Render.cpp +++ b/src/Render.cpp @@ -142,13 +142,13 @@ void Render::PrepareToRendering() { auto dsTexConf = gal->CreateTexture2DConfig(scaledW, scaledH, Gal::Format::D24S8); - dsTexConf->SetMinFilter(Gal::Filtering::Nearest); - dsTexConf->SetMaxFilter(Gal::Filtering::Nearest); + dsTexConf->SetMinFilter(Gal::Filtering::Bilinear); + dsTexConf->SetMaxFilter(Gal::Filtering::Bilinear); fbDepthStencil = gal->BuildTexture(dsTexConf); auto texConf = gal->CreateTexture2DConfig(scaledW, scaledH, Gal::Format::R8G8B8A8); - texConf->SetMinFilter(Gal::Filtering::Nearest); - texConf->SetMaxFilter(Gal::Filtering::Nearest); + texConf->SetMinFilter(Gal::Filtering::Bilinear); + texConf->SetMaxFilter(Gal::Filtering::Bilinear); fbColor = gal->BuildTexture(texConf); auto fbConf = gal->CreateFramebufferConfig(); @@ -223,12 +223,12 @@ void Render::RenderFrame() { Gal::GetImplementation()->GetDefaultFramebuffer()->Clear(); framebuffer->Clear(); - //if (isWireframe) - //glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); + if (isWireframe) + Gal::GetImplementation()->SetWireframe(true); if (renderWorld) world->Render(static_cast(windowWidth) / static_cast(windowHeight)); - //if (isWireframe) - //glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); + if (isWireframe) + Gal::GetImplementation()->SetWireframe(false); fbPipeline->Activate(); fbPipelineInstance->Activate(); -- cgit v1.2.3