possibly fix stale extension function pointer use after losing context
This commit is contained in:
@@ -675,6 +675,10 @@ CString RageDisplay_OGL::TryVideoMode( VideoModeParams p, bool &bNewDeviceOut )
|
|||||||
if( err != "" )
|
if( err != "" )
|
||||||
return err; // failed to set video mode
|
return err; // failed to set video mode
|
||||||
|
|
||||||
|
/* Now that we've initialized, we can search for extensions. Do this before InvalidateAllGeometry,
|
||||||
|
* since AllocateBuffers needs it. */
|
||||||
|
SetupExtensions();
|
||||||
|
|
||||||
if( bNewDeviceOut )
|
if( bNewDeviceOut )
|
||||||
{
|
{
|
||||||
/* We have a new OpenGL context, so we have to tell our textures that
|
/* We have a new OpenGL context, so we have to tell our textures that
|
||||||
@@ -688,10 +692,6 @@ CString RageDisplay_OGL::TryVideoMode( VideoModeParams p, bool &bNewDeviceOut )
|
|||||||
|
|
||||||
this->SetDefaultRenderStates();
|
this->SetDefaultRenderStates();
|
||||||
|
|
||||||
/* Now that we've initialized, we can search for extensions (some of which
|
|
||||||
* we may need to set up the video mode). */
|
|
||||||
SetupExtensions();
|
|
||||||
|
|
||||||
/* Set vsync the Windows way, if we can. (What other extensions are there
|
/* Set vsync the Windows way, if we can. (What other extensions are there
|
||||||
* to do this, for other archs?) */
|
* to do this, for other archs?) */
|
||||||
if( GLExt.wglSwapIntervalEXT )
|
if( GLExt.wglSwapIntervalEXT )
|
||||||
@@ -985,8 +985,7 @@ public:
|
|||||||
static set<RageCompiledGeometryHWOGL *> g_GeometryList;
|
static set<RageCompiledGeometryHWOGL *> g_GeometryList;
|
||||||
static void InvalidateAllGeometry()
|
static void InvalidateAllGeometry()
|
||||||
{
|
{
|
||||||
set<RageCompiledGeometryHWOGL *>::iterator it;
|
FOREACHS( RageCompiledGeometryHWOGL*, g_GeometryList, it )
|
||||||
for( it = g_GeometryList.begin(); it != g_GeometryList.end(); ++it )
|
|
||||||
(*it)->Invalidate();
|
(*it)->Invalidate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user