diff --git a/src/gl/system/gl_framebuffer.cpp b/src/gl/system/gl_framebuffer.cpp index 7bb47f8c88..d835812494 100644 --- a/src/gl/system/gl_framebuffer.cpp +++ b/src/gl/system/gl_framebuffer.cpp @@ -382,6 +382,11 @@ void OpenGLFrameBuffer::ResetFixedColormap() } } +void OpenGLFrameBuffer::BlurScene(float amount) +{ + GLRenderer->BlurScene(amount); +} + bool OpenGLFrameBuffer::RenderBuffersEnabled() { return FGLRenderBuffers::IsEnabled(); diff --git a/src/gl/system/gl_framebuffer.h b/src/gl/system/gl_framebuffer.h index 7bf378e052..a220b0a342 100644 --- a/src/gl/system/gl_framebuffer.h +++ b/src/gl/system/gl_framebuffer.h @@ -43,6 +43,7 @@ public: void BeginFrame() override; bool RenderBuffersEnabled() override; void SetOutputViewport(IntRect *bounds) override; + void BlurScene(float amount) override; // Retrieves a buffer containing image data for a screenshot. // Hint: Pitch can be negative for upside-down images, in which case buffer diff --git a/src/hwrenderer/scene/hw_skydome.cpp b/src/hwrenderer/scene/hw_skydome.cpp index 84272a7b43..78bde1d63d 100644 --- a/src/hwrenderer/scene/hw_skydome.cpp +++ b/src/hwrenderer/scene/hw_skydome.cpp @@ -96,7 +96,7 @@ void FSkyDomeCreator::SkyVertex(int r, int c, bool zflip) static const float scale = 10000.; FAngle topAngle = (c / (float)mColumns * 360.f); - FAngle sideAngle = maxSideAngle * (mRows - r) / mRows; + FAngle sideAngle = maxSideAngle * float(mRows - r) / float(mRows); float height = sideAngle.Sin(); float realRadius = scale * sideAngle.Cos(); FVector2 pos = topAngle.ToVector(realRadius); diff --git a/src/menu/menu.cpp b/src/menu/menu.cpp index 742da203a1..2a127ba0a2 100644 --- a/src/menu/menu.cpp +++ b/src/menu/menu.cpp @@ -51,7 +51,6 @@ #include "menu/menu.h" #include "vm.h" #include "events.h" -#include "gl/renderer/gl_renderer.h" // for menu blur #include "scripting/types.h" // @@ -823,8 +822,7 @@ void M_Drawer (void) if (CurrentMenu != nullptr && menuactive != MENU_Off) { - if (GLRenderer) - GLRenderer->BlurScene(gameinfo.bluramount); + screen->BlurScene(gameinfo.bluramount); if (!CurrentMenu->DontDim) { M_Dim(); diff --git a/src/v_video.h b/src/v_video.h index 93eda12631..f88a65e65e 100644 --- a/src/v_video.h +++ b/src/v_video.h @@ -411,7 +411,7 @@ public: virtual int GetClientWidth() = 0; virtual int GetClientHeight() = 0; virtual bool RenderBuffersEnabled() { return false; }; - + virtual void BlurScene(float amount) {} // Begin 2D drawing operations. // Returns true if hardware-accelerated 2D has been entered, false if not.