mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-23 12:32:34 +00:00
- add post processing support to the software renderer and softpoly
This commit is contained in:
parent
1e11ce3bee
commit
48c83d36b5
4 changed files with 17 additions and 2 deletions
|
@ -479,3 +479,8 @@ void OpenGLFrameBuffer::Draw2D()
|
|||
{
|
||||
if (GLRenderer != nullptr) GLRenderer->Draw2D(&m2DDrawer);
|
||||
}
|
||||
|
||||
void OpenGLFrameBuffer::PostProcessScene(int fixedcm, const std::function<void()> &afterBloomDrawEndScene2D)
|
||||
{
|
||||
GLRenderer->PostProcessScene(fixedcm, afterBloomDrawEndScene2D);
|
||||
}
|
||||
|
|
|
@ -44,7 +44,6 @@ public:
|
|||
IUniformBuffer *CreateUniformBuffer(size_t size, bool staticuse = false) override;
|
||||
IShaderProgram *CreateShaderProgram() override;
|
||||
|
||||
|
||||
// Retrieves a buffer containing image data for a screenshot.
|
||||
// Hint: Pitch can be negative for upside-down images, in which case buffer
|
||||
// points to the last row in the buffer, which will be the first row output.
|
||||
|
@ -60,6 +59,7 @@ public:
|
|||
void SetVSync(bool vsync);
|
||||
|
||||
void Draw2D() override;
|
||||
void PostProcessScene(int fixedcm, const std::function<void()> &afterBloomDrawEndScene2D) override;
|
||||
|
||||
bool HWGammaActive = false; // Are we using hardware or software gamma?
|
||||
std::shared_ptr<FGLDebug> mDebug; // Debug API
|
||||
|
|
|
@ -122,6 +122,13 @@ sector_t *SWSceneDrawer::RenderView(player_t *player)
|
|||
|
||||
auto map = swrenderer::CameraLight::Instance()->ShaderColormap();
|
||||
screen->DrawTexture(fbtex.get(), 0, 0, DTA_SpecialColormap, map, TAG_DONE);
|
||||
SWRenderer->DrawRemainingPlayerSprites();
|
||||
screen->Draw2D();
|
||||
screen->Clear2D();
|
||||
screen->PostProcessScene(CM_DEFAULT, [&]() {
|
||||
SWRenderer->DrawRemainingPlayerSprites();
|
||||
screen->Draw2D();
|
||||
screen->Clear2D();
|
||||
});
|
||||
|
||||
return r_viewpoint.sector;
|
||||
}
|
||||
|
|
|
@ -43,6 +43,7 @@
|
|||
#include "c_cvars.h"
|
||||
#include "v_colortables.h"
|
||||
#include "v_2ddrawer.h"
|
||||
#include <functional>
|
||||
|
||||
struct sector_t;
|
||||
class IShaderProgram;
|
||||
|
@ -464,6 +465,8 @@ public:
|
|||
virtual bool WipeDo(int ticks);
|
||||
virtual void WipeCleanup();
|
||||
|
||||
virtual void PostProcessScene(int fixedcm, const std::function<void()> &afterBloomDrawEndScene2D) { if (afterBloomDrawEndScene2D) afterBloomDrawEndScene2D(); }
|
||||
|
||||
void ScaleCoordsFromWindow(int16_t &x, int16_t &y);
|
||||
|
||||
uint64_t GetLastFPS() const { return LastCount; }
|
||||
|
|
Loading…
Reference in a new issue