- some cleanup on the OpenGL interface and its flags.

Most importantly, the separate command line options for switching on the legacy buffer handling have been removed.
There's really no need for them anymore, because unlike in earlier versions many of the implementation differences no longer exist - with the exception of where the light and vertex buffer contents are generated.
For testing this, -glversion 3 is sufficient.
This commit is contained in:
Christoph Oelckers 2018-10-20 12:55:25 +02:00
commit 5f838d52b9
19 changed files with 39 additions and 62 deletions

View file

@ -75,14 +75,9 @@ OpenGLFrameBuffer::OpenGLFrameBuffer(void *hMonitor, bool fullscreen) :
FHardwareTexture::InitGlobalState();
gl_RenderState.Reset();
GLRenderer = new FGLRenderer(this);
GLRenderer = nullptr;
InitPalette();
InitializeState();
mDebug = std::make_shared<FGLDebug>();
mDebug->Update();
SetGamma();
// Move some state to the framebuffer object for easier access.
hwcaps = gl.flags;
glslversion = gl.glslversion;
@ -90,8 +85,11 @@ OpenGLFrameBuffer::OpenGLFrameBuffer(void *hMonitor, bool fullscreen) :
OpenGLFrameBuffer::~OpenGLFrameBuffer()
{
delete GLRenderer;
GLRenderer = NULL;
if (GLRenderer)
{
delete GLRenderer;
GLRenderer = nullptr;
}
}
//==========================================================================
@ -136,8 +134,12 @@ void OpenGLFrameBuffer::InitializeState()
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
GLRenderer = new FGLRenderer(this);
GLRenderer->Initialize(GetWidth(), GetHeight());
SetViewportRects(nullptr);
mDebug = std::make_shared<FGLDebug>();
mDebug->Update();
}
//==========================================================================