mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-11 15:21:51 +00:00
No gamma and player sprites on screenshots
This commit is contained in:
parent
7709db4bb0
commit
e8c98a5901
3 changed files with 6 additions and 6 deletions
|
@ -260,7 +260,7 @@ void FGLRenderer::TonemapScene()
|
|||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
void FGLRenderer::CopyToBackbuffer(const GL_IRECT *bounds)
|
||||
void FGLRenderer::CopyToBackbuffer(const GL_IRECT *bounds, bool applyGamma)
|
||||
{
|
||||
if (FGLRenderBuffers::IsEnabled())
|
||||
{
|
||||
|
@ -338,7 +338,7 @@ void FGLRenderer::CopyToBackbuffer(const GL_IRECT *bounds)
|
|||
|
||||
mPresentShader->Bind();
|
||||
mPresentShader->InputTexture.Set(0);
|
||||
if (framebuffer->IsHWGammaActive())
|
||||
if (!applyGamma || framebuffer->IsHWGammaActive())
|
||||
{
|
||||
mPresentShader->Gamma.Set(1.0f);
|
||||
mPresentShader->Contrast.Set(1.0f);
|
||||
|
|
|
@ -160,8 +160,8 @@ public:
|
|||
void EndDrawScene(sector_t * viewsector);
|
||||
void BloomScene();
|
||||
void TonemapScene();
|
||||
void CopyToBackbuffer(const GL_IRECT *bounds);
|
||||
void Flush() { CopyToBackbuffer(nullptr); }
|
||||
void CopyToBackbuffer(const GL_IRECT *bounds, bool applyGamma);
|
||||
void Flush() { CopyToBackbuffer(nullptr, true); }
|
||||
|
||||
void SetProjection(float fov, float ratio, float fovratio);
|
||||
void SetProjection(VSMatrix matrix); // raw matrix input from stereo 3d modes
|
||||
|
|
|
@ -858,7 +858,7 @@ sector_t * FGLRenderer::RenderViewpoint (AActor * camera, GL_IRECT * bounds, flo
|
|||
clipper.SafeAddClipRangeRealAngles(ViewAngle.BAMs() + a1, ViewAngle.BAMs() - a1);
|
||||
|
||||
ProcessScene(toscreen);
|
||||
if (mainview) EndDrawScene(retval); // do not call this for camera textures.
|
||||
if (mainview && toscreen) EndDrawScene(retval); // do not call this for camera textures.
|
||||
if (mainview)
|
||||
{
|
||||
if (FGLRenderBuffers::IsEnabled()) mBuffers->BlitSceneToTexture();
|
||||
|
@ -976,7 +976,7 @@ void FGLRenderer::WriteSavePic (player_t *player, FILE *file, int width, int hei
|
|||
gl_RenderState.SetSoftLightLevel(-1);
|
||||
screen->Begin2D(false);
|
||||
DrawBlend(viewsector);
|
||||
CopyToBackbuffer(&bounds);
|
||||
CopyToBackbuffer(&bounds, false);
|
||||
glFlush();
|
||||
|
||||
byte * scr = (byte *)M_Malloc(width * height * 3);
|
||||
|
|
Loading…
Reference in a new issue