Clear global state tracking variables when the OpenGL context is (re)created
This commit is contained in:
parent
f79c442df5
commit
960038bb81
5 changed files with 39 additions and 2 deletions
|
|
@ -99,6 +99,11 @@ OpenGLFrameBuffer::OpenGLFrameBuffer(void *hMonitor, int width, int height, int
|
|||
// If wglSwapIntervalEXT is called after glBindFramebuffer in a frame the setting is not changed!
|
||||
SetVSync(vid_vsync);
|
||||
|
||||
// Make sure all global variables tracking OpenGL context state are reset..
|
||||
FHardwareTexture::InitGlobalState();
|
||||
FMaterial::InitGlobalState();
|
||||
gl_RenderState.Reset();
|
||||
|
||||
GLRenderer = new FGLRenderer(this);
|
||||
memcpy (SourcePalette, GPalette.BaseColors, sizeof(PalEntry)*256);
|
||||
UpdatePalette ();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue