- 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); glGetIntegerv(GL_MAX_SAMPLES, &mMaxSamples);
} }

View file

@ -101,8 +101,9 @@ private:
class FGLRenderBuffers class FGLRenderBuffers
{ {
int gl_multisample = 0; // intentionally overload the global CVAR
public: public:
FGLRenderBuffers(); FGLRenderBuffers(int ms);
~FGLRenderBuffers(); ~FGLRenderBuffers();
void Setup(int width, int height, int sceneWidth, int sceneHeight); 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) void FGLRenderer::Initialize(int width, int height)
{ {
mScreenBuffers = new FGLRenderBuffers(); mScreenBuffers = new FGLRenderBuffers(gl_multisample);
mSaveBuffers = new FGLRenderBuffers(); mSaveBuffers = new FGLRenderBuffers(0);
mBuffers = mScreenBuffers; mBuffers = mScreenBuffers;
mPresentShader = new FPresentShader(); mPresentShader = new FPresentShader();
mPresent3dCheckerShader = new FPresent3DCheckerShader(); mPresent3dCheckerShader = new FPresent3DCheckerShader();