Reverted FrameBufferGL loadFuncs logic, since it causes problems in OSX,

and doesn't fix Vista issues anyway.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1383 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
stephena 2007-09-28 16:24:44 +00:00
parent d236bb24f2
commit 2d047f2f6f
2 changed files with 13 additions and 4 deletions

View File

@ -13,7 +13,7 @@
// See the file "license" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
//
// $Id: FrameBufferGL.cxx,v 1.93 2007-09-16 23:18:26 stephena Exp $
// $Id: FrameBufferGL.cxx,v 1.94 2007-09-28 16:24:44 stephena Exp $
//============================================================================
#ifdef DISPLAY_OPENGL
@ -93,6 +93,9 @@ FrameBufferGL::~FrameBufferGL()
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
bool FrameBufferGL::loadFuncs(const string& library)
{
if(myFuncsLoaded)
return true;
if(SDL_WasInit(SDL_INIT_VIDEO) == 0)
SDL_Init(SDL_INIT_VIDEO);
@ -163,7 +166,7 @@ bool FrameBufferGL::loadFuncs(const string& library)
p_glTexParameteri = (void(APIENTRY*)(GLenum, GLenum, GLint))
SDL_GL_GetProcAddress("glTexParameteri"); if(!p_glTexParameteri) return false;
return true;
return myFuncsLoaded = true;
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@ -716,4 +719,7 @@ GUI::Surface* FrameBufferGL::createSurface(int width, int height) const
return data ? new GUI::Surface(width, height, data) : NULL;
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
bool FrameBufferGL::myFuncsLoaded = false;
#endif // DISPLAY_OPENGL

View File

@ -13,7 +13,7 @@
// See the file "license" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
//
// $Id: FrameBufferGL.hxx,v 1.48 2007-09-16 23:18:26 stephena Exp $
// $Id: FrameBufferGL.hxx,v 1.49 2007-09-28 16:24:44 stephena Exp $
//============================================================================
#ifndef FRAMEBUFFER_GL_HXX
@ -35,7 +35,7 @@ class GUI::Font;
This class implements an SDL OpenGL framebuffer.
@author Stephen Anthony
@version $Id: FrameBufferGL.hxx,v 1.48 2007-09-16 23:18:26 stephena Exp $
@version $Id: FrameBufferGL.hxx,v 1.49 2007-09-28 16:24:44 stephena Exp $
*/
class FrameBufferGL : public FrameBuffer
{
@ -282,6 +282,9 @@ class FrameBufferGL : public FrameBuffer
// Indicates that the texture has been modified, and should be redrawn
bool myDirtyFlag;
// Indicates if the OpenGL functions have been properly loaded
static bool myFuncsLoaded;
};
#endif // DISPLAY_OPENGL