mirror of https://github.com/stella-emu/stella.git
Fixed OSX OpenGL crashes. Apparently some of the Apple-specific stuff
was a bit too specific (didn't always work on older systems). Fixed crash in ROM browser when selecting a ROM with the 'Select' button. git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1276 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
parent
49249ee9da
commit
8e6d3e4ce6
|
@ -13,7 +13,7 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: FrameBufferGL.cxx,v 1.84 2007-01-07 17:59:48 stephena Exp $
|
// $Id: FrameBufferGL.cxx,v 1.85 2007-01-12 16:03:10 stephena Exp $
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
#ifdef DISPLAY_OPENGL
|
#ifdef DISPLAY_OPENGL
|
||||||
|
@ -46,12 +46,6 @@
|
||||||
#ifndef GL_TEXTURE_RECTANGLE_ARB
|
#ifndef GL_TEXTURE_RECTANGLE_ARB
|
||||||
#define GL_TEXTURE_RECTANGLE_ARB 0x84F5
|
#define GL_TEXTURE_RECTANGLE_ARB 0x84F5
|
||||||
#endif
|
#endif
|
||||||
#ifndef GL_TEXTURE_STORAGE_HINT_APPLE
|
|
||||||
#define GL_TEXTURE_STORAGE_HINT_APPLE 0x85BC
|
|
||||||
#endif
|
|
||||||
#ifndef GL_STORAGE_SHARED_APPLE
|
|
||||||
#define GL_STORAGE_SHARED_APPLE 0x85BF
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Maybe this code could be cleaner ...
|
// Maybe this code could be cleaner ...
|
||||||
static void (APIENTRY* p_glClear)( GLbitfield );
|
static void (APIENTRY* p_glClear)( GLbitfield );
|
||||||
|
@ -94,8 +88,6 @@ FrameBufferGL::FrameBufferGL(OSystem* osystem)
|
||||||
: FrameBuffer(osystem),
|
: FrameBuffer(osystem),
|
||||||
myTexture(NULL),
|
myTexture(NULL),
|
||||||
myHaveTexRectEXT(false),
|
myHaveTexRectEXT(false),
|
||||||
myHaveAppleCStorageEXT(false),
|
|
||||||
myHaveAppleTexRangeEXT(false),
|
|
||||||
myScreenmode(0),
|
myScreenmode(0),
|
||||||
myScreenmodeCount(0),
|
myScreenmodeCount(0),
|
||||||
myFilterParamName("GL_NEAREST"),
|
myFilterParamName("GL_NEAREST"),
|
||||||
|
@ -240,8 +232,6 @@ string FrameBufferGL::about()
|
||||||
{
|
{
|
||||||
string extensions;
|
string extensions;
|
||||||
if(myHaveTexRectEXT) extensions += "GL_TEXTURE_RECTANGLE_ARB ";
|
if(myHaveTexRectEXT) extensions += "GL_TEXTURE_RECTANGLE_ARB ";
|
||||||
if(myHaveAppleCStorageEXT) extensions += "GL_TEXTURE_STORAGE_HINT_APPLE ";
|
|
||||||
if(myHaveAppleTexRangeEXT) extensions += "GL_TEXTURE_STORAGE_HINT_APPLE ";
|
|
||||||
if(extensions == "") extensions = "None";
|
if(extensions == "") extensions = "None";
|
||||||
|
|
||||||
ostringstream out;
|
ostringstream out;
|
||||||
|
@ -302,8 +292,6 @@ bool FrameBufferGL::createScreen()
|
||||||
// Check for some extensions that can potentially speed up operation
|
// Check for some extensions that can potentially speed up operation
|
||||||
const char* extensions = (const char *) p_glGetString(GL_EXTENSIONS);
|
const char* extensions = (const char *) p_glGetString(GL_EXTENSIONS);
|
||||||
myHaveTexRectEXT = strstr(extensions, "ARB_texture_rectangle") != NULL;
|
myHaveTexRectEXT = strstr(extensions, "ARB_texture_rectangle") != NULL;
|
||||||
myHaveAppleCStorageEXT = strstr(extensions, "APPLE_client_storage") != NULL;
|
|
||||||
myHaveAppleTexRangeEXT = strstr(extensions, "APPLE_texture_range") != NULL;
|
|
||||||
|
|
||||||
// Initialize GL display
|
// Initialize GL display
|
||||||
p_glViewport(myImageDim.x, myImageDim.y, myImageDim.w, myImageDim.h);
|
p_glViewport(myImageDim.x, myImageDim.y, myImageDim.w, myImageDim.h);
|
||||||
|
@ -655,10 +643,6 @@ bool FrameBufferGL::createTextures()
|
||||||
|
|
||||||
p_glGenTextures(1, &myBuffer.texture);
|
p_glGenTextures(1, &myBuffer.texture);
|
||||||
p_glBindTexture(myBuffer.target, myBuffer.texture);
|
p_glBindTexture(myBuffer.target, myBuffer.texture);
|
||||||
if(myHaveAppleCStorageEXT)
|
|
||||||
p_glPixelStorei(GL_UNPACK_CLIENT_STORAGE_APPLE, GL_TRUE);
|
|
||||||
if(myHaveAppleTexRangeEXT)
|
|
||||||
p_glTexParameteri(myBuffer.target, GL_TEXTURE_STORAGE_HINT_APPLE, GL_STORAGE_SHARED_APPLE);
|
|
||||||
p_glTexParameteri(myBuffer.target, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
|
p_glTexParameteri(myBuffer.target, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
|
||||||
p_glTexParameteri(myBuffer.target, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
|
p_glTexParameteri(myBuffer.target, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
|
||||||
p_glTexParameteri(myBuffer.target, GL_TEXTURE_MIN_FILTER, myBuffer.filter);
|
p_glTexParameteri(myBuffer.target, GL_TEXTURE_MIN_FILTER, myBuffer.filter);
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: FrameBufferGL.hxx,v 1.42 2007-01-01 18:04:40 stephena Exp $
|
// $Id: FrameBufferGL.hxx,v 1.43 2007-01-12 16:03:10 stephena Exp $
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
#ifndef FRAMEBUFFER_GL_HXX
|
#ifndef FRAMEBUFFER_GL_HXX
|
||||||
|
@ -36,7 +36,7 @@ class GUI::Font;
|
||||||
This class implements an SDL OpenGL framebuffer.
|
This class implements an SDL OpenGL framebuffer.
|
||||||
|
|
||||||
@author Stephen Anthony
|
@author Stephen Anthony
|
||||||
@version $Id: FrameBufferGL.hxx,v 1.42 2007-01-01 18:04:40 stephena Exp $
|
@version $Id: FrameBufferGL.hxx,v 1.43 2007-01-12 16:03:10 stephena Exp $
|
||||||
*/
|
*/
|
||||||
class FrameBufferGL : public FrameBuffer
|
class FrameBufferGL : public FrameBuffer
|
||||||
{
|
{
|
||||||
|
@ -255,7 +255,7 @@ class FrameBufferGL : public FrameBuffer
|
||||||
glBufferType myBuffer;
|
glBufferType myBuffer;
|
||||||
|
|
||||||
// Optional GL extensions that may increase performance
|
// Optional GL extensions that may increase performance
|
||||||
bool myHaveTexRectEXT, myHaveAppleCStorageEXT, myHaveAppleTexRangeEXT;
|
bool myHaveTexRectEXT;
|
||||||
|
|
||||||
// The possible OpenGL screenmodes to use
|
// The possible OpenGL screenmodes to use
|
||||||
SDL_Rect** myScreenmode;
|
SDL_Rect** myScreenmode;
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: LauncherDialog.cxx,v 1.65 2007-01-01 18:04:53 stephena Exp $
|
// $Id: LauncherDialog.cxx,v 1.66 2007-01-12 16:03:10 stephena Exp $
|
||||||
//
|
//
|
||||||
// Based on code from ScummVM - Scumm Interpreter
|
// Based on code from ScummVM - Scumm Interpreter
|
||||||
// Copyright (C) 2002-2004 The ScummVM project
|
// Copyright (C) 2002-2004 The ScummVM project
|
||||||
|
@ -438,7 +438,6 @@ void LauncherDialog::handleCommand(CommandSender* sender, int cmd,
|
||||||
instance()->settings().setString("lastrom",
|
instance()->settings().setString("lastrom",
|
||||||
myList->getSelectedString());
|
myList->getSelectedString());
|
||||||
#endif
|
#endif
|
||||||
close();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue