From 9dceedd3b0f1cacb3de1975678747fd70b12f889 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 25 Apr 2020 14:15:15 +0200 Subject: [PATCH] - cleanup --- src/rendering/gl/system/gl_framebuffer.cpp | 3 --- src/rendering/polyrenderer/backend/poly_framebuffer.cpp | 2 -- src/rendering/vulkan/system/vk_framebuffer.cpp | 3 --- 3 files changed, 8 deletions(-) diff --git a/src/rendering/gl/system/gl_framebuffer.cpp b/src/rendering/gl/system/gl_framebuffer.cpp index b2b3263f0..77bb54bfe 100644 --- a/src/rendering/gl/system/gl_framebuffer.cpp +++ b/src/rendering/gl/system/gl_framebuffer.cpp @@ -216,9 +216,6 @@ void OpenGLFrameBuffer::RenderTextureView(FCanvasTexture* tex, std::functionStartOffscreen(); GLRenderer->BindToFrameBuffer(tex); - // This doesn't need to clear the fake flat cache. It can be shared between camera textures and the main view of a scene. - float ratio = tex->aspectRatio; - IntRect bounds; bounds.left = bounds.top = 0; bounds.width = FHardwareTexture::GetTexDimension(tex->GetWidth()); diff --git a/src/rendering/polyrenderer/backend/poly_framebuffer.cpp b/src/rendering/polyrenderer/backend/poly_framebuffer.cpp index dbbde9492..b4491f6f9 100644 --- a/src/rendering/polyrenderer/backend/poly_framebuffer.cpp +++ b/src/rendering/polyrenderer/backend/poly_framebuffer.cpp @@ -292,10 +292,8 @@ sector_t *PolyFrameBuffer::RenderView(player_t *player) void PolyFrameBuffer::RenderTextureView(FCanvasTexture* tex, std::function renderFunc) { - // This doesn't need to clear the fake flat cache. It can be shared between camera textures and the main view of a scene. auto BaseLayer = static_cast(tex->GetHardwareTexture(0, 0)); - float ratio = tex->aspectRatio; DCanvas *image = BaseLayer->GetImage(tex, 0, 0); PolyDepthStencil *depthStencil = BaseLayer->GetDepthStencil(tex); mRenderState->SetRenderTarget(image, depthStencil, false); diff --git a/src/rendering/vulkan/system/vk_framebuffer.cpp b/src/rendering/vulkan/system/vk_framebuffer.cpp index a276ee3a2..ee236d945 100644 --- a/src/rendering/vulkan/system/vk_framebuffer.cpp +++ b/src/rendering/vulkan/system/vk_framebuffer.cpp @@ -394,9 +394,7 @@ sector_t *VulkanFrameBuffer::RenderView(player_t *player) } void VulkanFrameBuffer::RenderTextureView(FCanvasTexture* tex, std::function renderFunc) - { - // This doesn't need to clear the fake flat cache. It can be shared between camera textures and the main view of a scene. auto BaseLayer = static_cast(tex->GetHardwareTexture(0, 0)); VkTextureImage *image = BaseLayer->GetImage(tex, 0, 0); @@ -410,7 +408,6 @@ void VulkanFrameBuffer::RenderTextureView(FCanvasTexture* tex, std::functionSetRenderTarget(image, depthStencil->View.get(), image->Image->width, image->Image->height, VK_FORMAT_R8G8B8A8_UNORM, VK_SAMPLE_COUNT_1_BIT); - float ratio = tex->aspectRatio; IntRect bounds; bounds.left = bounds.top = 0; bounds.width = std::min(tex->GetWidth(), image->Image->width);