- create the savepic framebuffer without multisampling.

It didn't work and doesn't need it so let's save that piece of video memory.
This commit is contained in:
Christoph Oelckers 2020-01-14 19:50:47 +01:00
parent e923ef5d3a
commit 7b6bd34a58
3 changed files with 6 additions and 4 deletions

View file

@ -44,8 +44,9 @@ namespace OpenGLRenderer
//
//==========================================================================
FGLRenderBuffers::FGLRenderBuffers()
FGLRenderBuffers::FGLRenderBuffers(int ms)
{
gl_multisample = ms;
glGetIntegerv(GL_MAX_SAMPLES, &mMaxSamples);
}

View file

@ -101,8 +101,9 @@ private:
class FGLRenderBuffers
{
int gl_multisample = 0; // intentionally overload the global CVAR
public:
FGLRenderBuffers();
FGLRenderBuffers(int ms);
~FGLRenderBuffers();
void Setup(int width, int height, int sceneWidth, int sceneHeight);

View file

@ -88,8 +88,8 @@ FGLRenderer::FGLRenderer(OpenGLFrameBuffer *fb)
void FGLRenderer::Initialize(int width, int height)
{
mScreenBuffers = new FGLRenderBuffers();
mSaveBuffers = new FGLRenderBuffers();
mScreenBuffers = new FGLRenderBuffers(gl_multisample);
mSaveBuffers = new FGLRenderBuffers(0);
mBuffers = mScreenBuffers;
mPresentShader = new FPresentShader();
mPresent3dCheckerShader = new FPresent3DCheckerShader();