diff --git a/stella/configure b/stella/configure index aadaadda6..cfa199d44 100755 --- a/stella/configure +++ b/stella/configure @@ -678,7 +678,7 @@ if test "$_build_gl" = "yes" ; then echo_n " OpenGL rendering enabled" echo else - echo_n " OpenGL rendering disabled (missing OpenGL library)" + echo_n " OpenGL rendering disabled (missing OpenGL headers)" echo _build_gl=no fi @@ -778,7 +778,7 @@ case $_host_os in # Add OpenGL stuff if test "$_build_gl" = yes ; then DEFINES="$DEFINES -DDISPLAY_OPENGL" - LIBS="$LIBS -L$X_LIBS -lGL" +# LIBS="$LIBS -L$X_LIBS -lGL" fi ;; win32) diff --git a/stella/src/common/FrameBufferGL.cxx b/stella/src/common/FrameBufferGL.cxx index 9abe0697e..237f13584 100644 --- a/stella/src/common/FrameBufferGL.cxx +++ b/stella/src/common/FrameBufferGL.cxx @@ -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.48 2006-01-12 16:23:36 stephena Exp $ +// $Id: FrameBufferGL.cxx,v 1.49 2006-01-14 21:36:29 stephena Exp $ //============================================================================ #ifdef DISPLAY_OPENGL @@ -31,6 +31,40 @@ #include "Font.hxx" #include "GuiUtils.hxx" +static void APIENTRY (*p_glClear)( GLbitfield ); +static void APIENTRY (*p_glEnable)( GLenum ); +static void APIENTRY (*p_glDisable)( GLenum ); +static void APIENTRY (*p_glPushAttrib)( GLbitfield ); +static const GLubyte* APIENTRY (*p_glGetString)( GLenum ); +static void APIENTRY (*p_glHint)( GLenum, GLenum ); + +// Matrix +static void APIENTRY (*p_glMatrixMode)( GLenum ); +static void APIENTRY (*p_glOrtho)( GLdouble, GLdouble, GLdouble, GLdouble, GLdouble, GLdouble ); +static void APIENTRY (*p_glViewport)( GLint, GLint, GLsizei, GLsizei ); +static void APIENTRY (*p_glPushMatrix)( void ); +static void APIENTRY (*p_glLoadIdentity)( void ); + +// Drawing +static void APIENTRY (*p_glBegin)( GLenum ); +static void APIENTRY (*p_glEnd)( void ); +static void APIENTRY (*p_glVertex2i)( GLint, GLint ); +static void APIENTRY (*p_glTexCoord2f)( GLfloat, GLfloat ); + +// Raster funcs +static void APIENTRY (*p_glReadPixels)( GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, GLvoid* ); +static void APIENTRY (*p_glPixelStorei)( GLenum, GLint ); + +// Texture mapping +static void APIENTRY (*p_glTexEnvf)( GLenum, GLenum, GLfloat ); +static void APIENTRY (*p_glGenTextures)( GLsizei, GLuint* ); // 1.1 +static void APIENTRY (*p_glDeleteTextures)( GLsizei, const GLuint* ); // 1.1 +static void APIENTRY (*p_glBindTexture)( GLenum, GLuint ); // 1.1 +static void APIENTRY (*p_glTexImage2D)( GLenum, GLint, GLint, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid* ); +static void APIENTRY (*p_glTexSubImage2D)( GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, const GLvoid* ); // 1.1 +static void APIENTRY (*p_glTexParameteri)( GLenum, GLenum, GLint ); + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - FrameBufferGL::FrameBufferGL(OSystem* osystem) : FrameBuffer(osystem), @@ -51,7 +85,76 @@ FrameBufferGL::~FrameBufferGL() if(myTexture) SDL_FreeSurface(myTexture); - glDeleteTextures(1, &myTextureID); + p_glDeleteTextures(1, &myTextureID); +} + +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +bool FrameBufferGL::loadFuncs(const string& library) +{ + if(SDL_WasInit(SDL_INIT_VIDEO) == 0) + SDL_Init(SDL_INIT_VIDEO); + + if(SDL_GL_LoadLibrary(library.c_str()) < 0) + return false; + + // Otherwise, fill the function pointers for GL functions + // If anything fails, we'll know it immediately, and return false + // Yes, this syntax is ugly, but I can type it out faster than the time + // it takes to figure our macro magic to do it neatly + p_glClear = (void(*)(GLbitfield)) + SDL_GL_GetProcAddress("glClear"); if(!p_glClear) return false; + p_glEnable = (void(*)(GLenum)) + SDL_GL_GetProcAddress("glEnable"); if(!p_glEnable) return false; + p_glDisable = (void(*)(GLenum)) + SDL_GL_GetProcAddress("glDisable"); if(!p_glDisable) return false; + p_glPushAttrib = (void(*)(GLbitfield)) + SDL_GL_GetProcAddress("glPushAttrib"); if(!p_glPushAttrib) return false; + p_glGetString = (const GLubyte*(*)(GLenum)) + SDL_GL_GetProcAddress("glGetString"); if(!p_glGetString) return false; + p_glHint = (void(*)(GLenum, GLenum)) + SDL_GL_GetProcAddress("glHint"); if(!p_glHint) return false; + + p_glMatrixMode = (void(*)(GLenum)) + SDL_GL_GetProcAddress("glMatrixMode"); if(!p_glMatrixMode) return false; + p_glOrtho = (void(*)(GLdouble, GLdouble, GLdouble, GLdouble, GLdouble, GLdouble)) + SDL_GL_GetProcAddress("glOrtho"); if(!p_glOrtho) return false; + p_glViewport = (void(*)(GLint, GLint, GLsizei, GLsizei)) + SDL_GL_GetProcAddress("glViewport"); if(!p_glViewport) return false; + p_glPushMatrix = (void(*)(void)) + SDL_GL_GetProcAddress("glPushMatrix"); if(!p_glPushMatrix) return false; + p_glLoadIdentity = (void(*)(void)) + SDL_GL_GetProcAddress("glLoadIdentity"); if(!p_glLoadIdentity) return false; + + p_glBegin = (void(*)(GLenum)) + SDL_GL_GetProcAddress("glBegin"); if(!p_glBegin) return false; + p_glEnd = (void(*)(void)) + SDL_GL_GetProcAddress("glEnd"); if(!p_glEnd) return false; + p_glVertex2i = (void(*)(GLint, GLint)) + SDL_GL_GetProcAddress("glVertex2i"); if(!p_glVertex2i) return false; + p_glTexCoord2f = (void(*)(GLfloat, GLfloat)) + SDL_GL_GetProcAddress("glTexCoord2f"); if(!p_glTexCoord2f) return false; + + p_glReadPixels = (void(*)(GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, GLvoid*)) + SDL_GL_GetProcAddress("glReadPixels"); if(!p_glReadPixels) return false; + p_glPixelStorei = (void(*)(GLenum, GLint)) + SDL_GL_GetProcAddress("glPixelStorei"); if(!p_glPixelStorei) return false; + + p_glTexEnvf = (void(*)(GLenum, GLenum, GLfloat)) + SDL_GL_GetProcAddress("glTexEnvf"); if(!p_glTexEnvf) return false; + p_glGenTextures = (void(*)(GLsizei, GLuint*)) + SDL_GL_GetProcAddress("glGenTextures"); if(!p_glGenTextures) return false; + p_glDeleteTextures = (void(*)(GLsizei, const GLuint*)) + SDL_GL_GetProcAddress("glDeleteTextures"); if(!p_glDeleteTextures) return false; + p_glBindTexture = (void(*)(GLenum, GLuint)) + SDL_GL_GetProcAddress("glBindTexture"); if(!p_glBindTexture) return false; + p_glTexImage2D = (void(*)(GLenum, GLint, GLint, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid*)) + SDL_GL_GetProcAddress("glTexImage2D"); if(!p_glTexImage2D) return false; + p_glTexSubImage2D = (void(*)(GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, const GLvoid*)) + SDL_GL_GetProcAddress("glTexSubImage2D"); if(!p_glTexSubImage2D) return false; + p_glTexParameteri = (void(*)(GLenum, GLenum, GLint)) + SDL_GL_GetProcAddress("glTexParameteri"); if(!p_glTexParameteri) return false; + + return true; } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -133,9 +236,9 @@ bool FrameBufferGL::initSubsystem() colormode << " Color : " << myDepth << " bit, " << myRGB[0] << "-" << myRGB[1] << "-" << myRGB[2] << "-" << myRGB[3]; - cout << " Vendor : " << glGetString(GL_VENDOR) << endl - << " Renderer: " << glGetString(GL_RENDERER) << endl - << " Version : " << glGetString(GL_VERSION) << endl + cout << " Vendor : " << p_glGetString(GL_VENDOR) << endl + << " Renderer: " << p_glGetString(GL_RENDERER) << endl + << " Version : " << p_glGetString(GL_VERSION) << endl << colormode.str() << endl << " Filter : " << myFilterParamName << endl << endl; @@ -178,20 +281,20 @@ bool FrameBufferGL::createScreen() return false; } - glPushAttrib(GL_ENABLE_BIT); + p_glPushAttrib(GL_ENABLE_BIT); // Center the image horizontally and vertically - glViewport(myImageDim.x, myImageDim.y, myImageDim.w, myImageDim.h); + p_glViewport(myImageDim.x, myImageDim.y, myImageDim.w, myImageDim.h); - glMatrixMode(GL_PROJECTION); - glPushMatrix(); - glLoadIdentity(); + p_glMatrixMode(GL_PROJECTION); + p_glPushMatrix(); + p_glLoadIdentity(); - glOrtho(0.0, orthoWidth, orthoHeight, 0.0, 0.0, 1.0); + p_glOrtho(0.0, orthoWidth, orthoHeight, 0.0, 0.0, 1.0); - glMatrixMode(GL_MODELVIEW); - glPushMatrix(); - glLoadIdentity(); + p_glMatrixMode(GL_MODELVIEW); + p_glPushMatrix(); + p_glLoadIdentity(); #ifdef TEXTURES_ARE_LOST createTextures(); @@ -199,9 +302,9 @@ bool FrameBufferGL::createScreen() // Make sure any old parts of the screen are erased // Do it for both buffers! - glClear(GL_COLOR_BUFFER_BIT); + p_glClear(GL_COLOR_BUFFER_BIT); SDL_GL_SwapBuffers(); - glClear(GL_COLOR_BUFFER_BIT); + p_glClear(GL_COLOR_BUFFER_BIT); myOSystem->eventHandler().refreshDisplay(); @@ -295,15 +398,15 @@ void FrameBufferGL::postFrameUpdate() // and antialiasing uInt32 w = myBaseDim.w, h = myBaseDim.h; - glBindTexture(GL_TEXTURE_2D, myTextureID); - glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, myTexture->w, myTexture->h, - GL_RGB, GL_UNSIGNED_SHORT_5_6_5, myTexture->pixels); - glBegin(GL_QUADS); - glTexCoord2f(myTexCoord[0], myTexCoord[1]); glVertex2i(0, 0); - glTexCoord2f(myTexCoord[2], myTexCoord[1]); glVertex2i(w, 0); - glTexCoord2f(myTexCoord[2], myTexCoord[3]); glVertex2i(w, h); - glTexCoord2f(myTexCoord[0], myTexCoord[3]); glVertex2i(0, h); - glEnd(); + p_glBindTexture(GL_TEXTURE_2D, myTextureID); + p_glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, myTexture->w, myTexture->h, + GL_RGB, GL_UNSIGNED_SHORT_5_6_5, myTexture->pixels); + p_glBegin(GL_QUADS); + p_glTexCoord2f(myTexCoord[0], myTexCoord[1]); p_glVertex2i(0, 0); + p_glTexCoord2f(myTexCoord[2], myTexCoord[1]); p_glVertex2i(w, 0); + p_glTexCoord2f(myTexCoord[2], myTexCoord[3]); p_glVertex2i(w, h); + p_glTexCoord2f(myTexCoord[0], myTexCoord[3]); p_glVertex2i(0, h); + p_glEnd(); // Now show all changes made to the texture SDL_GL_SwapBuffers(); @@ -319,8 +422,8 @@ void FrameBufferGL::scanline(uInt32 row, uInt8* data) // of the framebuffer row = myImageDim.h + myImageDim.y - row - 1; - glPixelStorei(GL_PACK_ALIGNMENT, 1); - glReadPixels(myImageDim.x, row, myImageDim.w, 1, GL_RGB, GL_UNSIGNED_BYTE, data); + p_glPixelStorei(GL_PACK_ALIGNMENT, 1); + p_glReadPixels(myImageDim.x, row, myImageDim.w, 1, GL_RGB, GL_UNSIGNED_BYTE, data); } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -339,11 +442,11 @@ void FrameBufferGL::toggleFilter() showMessage("Filtering: GL_NEAREST"); } - glBindTexture(GL_TEXTURE_2D, myTextureID); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, myFilterParam); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, myFilterParam); + p_glBindTexture(GL_TEXTURE_2D, myTextureID); + p_glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); + p_glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); + p_glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, myFilterParam); + p_glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, myFilterParam); // The filtering has changed, so redraw the entire screen theRedrawTIAIndicator = true; @@ -482,7 +585,7 @@ bool FrameBufferGL::createTextures() if(myTexture) SDL_FreeSurface(myTexture); - glDeleteTextures(1, &myTextureID); + p_glDeleteTextures(1, &myTextureID); uInt32 w = power_of_two(myBaseDim.w); uInt32 h = power_of_two(myBaseDim.h); @@ -511,21 +614,21 @@ bool FrameBufferGL::createTextures() myFilterParamName = "GL_NEAREST"; } - glGenTextures(1, &myTextureID); - glBindTexture(GL_TEXTURE_2D, myTextureID); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, myFilterParam); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, myFilterParam); - glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, w, h, 0, GL_RGB, GL_UNSIGNED_SHORT_5_6_5, + p_glGenTextures(1, &myTextureID); + p_glBindTexture(GL_TEXTURE_2D, myTextureID); + p_glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); + p_glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); + p_glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, myFilterParam); + p_glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, myFilterParam); + p_glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, w, h, 0, GL_RGB, GL_UNSIGNED_SHORT_5_6_5, myTexture->pixels); - glDisable(GL_DEPTH_TEST); - glDisable(GL_CULL_FACE); - glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_FASTEST); - glEnable(GL_TEXTURE_2D); + p_glDisable(GL_DEPTH_TEST); + p_glDisable(GL_CULL_FACE); + p_glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_FASTEST); + p_glEnable(GL_TEXTURE_2D); - glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_DECAL); + p_glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_DECAL); return true; } diff --git a/stella/src/common/FrameBufferGL.hxx b/stella/src/common/FrameBufferGL.hxx index ccb34d345..43b3986e9 100644 --- a/stella/src/common/FrameBufferGL.hxx +++ b/stella/src/common/FrameBufferGL.hxx @@ -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.26 2006-01-10 20:37:00 stephena Exp $ +// $Id: FrameBufferGL.hxx,v 1.27 2006-01-14 21:36:29 stephena Exp $ //============================================================================ #ifndef FRAMEBUFFER_GL_HXX @@ -37,7 +37,7 @@ class GUI::Font; This class implements an SDL OpenGL framebuffer. @author Stephen Anthony - @version $Id: FrameBufferGL.hxx,v 1.26 2006-01-10 20:37:00 stephena Exp $ + @version $Id: FrameBufferGL.hxx,v 1.27 2006-01-14 21:36:29 stephena Exp $ */ class FrameBufferGL : public FrameBuffer { @@ -52,6 +52,15 @@ class FrameBufferGL : public FrameBuffer */ virtual ~FrameBufferGL(); + /** + Check if OpenGL is available on this system and dynamically load + all required GL functions. If any errors occur, we shouldn't attempt + to instantiate a FrameBufferGL object. + + @param library The filename of the OpenGL library + */ + static bool loadFuncs(const string& library); + ////////////////////////////////////////////////////////////////////// // The following methods are derived from FrameBuffer.hxx ////////////////////////////////////////////////////////////////////// diff --git a/stella/src/emucore/FrameBuffer.cxx b/stella/src/emucore/FrameBuffer.cxx index 9929ba451..9ccdfdd8e 100644 --- a/stella/src/emucore/FrameBuffer.cxx +++ b/stella/src/emucore/FrameBuffer.cxx @@ -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: FrameBuffer.cxx,v 1.73 2006-01-11 20:28:07 stephena Exp $ +// $Id: FrameBuffer.cxx,v 1.74 2006-01-14 21:36:29 stephena Exp $ //============================================================================ #include @@ -90,8 +90,14 @@ void FrameBuffer::initialize(const string& title, uInt32 width, uInt32 height, } // Erase contents of previous screen +/* cls(); if(myScreen) + { +cerr << "clear screen: w = " << myScreen->w << ", height = " << myScreen->h << endl; SDL_FillRect(myScreen, NULL, 0); + SDL_UpdateRect(myScreen, 0, 0, 0, 0); + } +*/ // Query the desktop size // This is really the job of SDL diff --git a/stella/src/emucore/MediaFactory.cxx b/stella/src/emucore/MediaFactory.cxx index cc38d36a1..c6ccd5343 100644 --- a/stella/src/emucore/MediaFactory.cxx +++ b/stella/src/emucore/MediaFactory.cxx @@ -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: MediaFactory.cxx,v 1.1 2005-12-18 18:37:03 stephena Exp $ +// $Id: MediaFactory.cxx,v 1.2 2006-01-14 21:36:29 stephena Exp $ //============================================================================ //////////////////////////////////////////////////////////////////// @@ -22,6 +22,8 @@ #include "MediaFactory.hxx" +#include "OSystem.hxx" + #include "FrameBuffer.hxx" #include "FrameBufferSoft.hxx" #ifdef DISPLAY_OPENGL @@ -59,7 +61,11 @@ FrameBuffer* MediaFactory::createVideo(const string& type, OSystem* parent) #endif #ifdef DISPLAY_OPENGL else if(type == "gl") - fb = new FrameBufferGL(parent); + { + const string& gl_lib = parent->settings().getString("gl_lib"); + if(FrameBufferGL::loadFuncs(gl_lib)) + fb = new FrameBufferGL(parent); + } #endif return fb; diff --git a/stella/src/emucore/OSystem.cxx b/stella/src/emucore/OSystem.cxx index 69781ff80..b2d298946 100644 --- a/stella/src/emucore/OSystem.cxx +++ b/stella/src/emucore/OSystem.cxx @@ -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: OSystem.cxx,v 1.56 2006-01-09 16:50:01 stephena Exp $ +// $Id: OSystem.cxx,v 1.57 2006-01-14 21:36:29 stephena Exp $ //============================================================================ #include @@ -191,8 +191,9 @@ bool OSystem::createFrameBuffer(bool showmessage) string video = mySettings->getString("video"); myFrameBuffer = MediaFactory::createVideo(video, this); if(!myFrameBuffer) +{cerr << "FIXME - properly deal with video mode not existing\n"; return false; - +} // Re-initialize the framebuffer to current settings switch(myEventHandler->state()) { diff --git a/stella/src/emucore/Settings.cxx b/stella/src/emucore/Settings.cxx index e12b00479..a6206b496 100644 --- a/stella/src/emucore/Settings.cxx +++ b/stella/src/emucore/Settings.cxx @@ -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: Settings.cxx,v 1.74 2006-01-10 20:37:00 stephena Exp $ +// $Id: Settings.cxx,v 1.75 2006-01-14 21:36:29 stephena Exp $ //============================================================================ #include @@ -45,6 +45,7 @@ Settings::Settings(OSystem* osystem) set("gl_filter", "nearest"); set("gl_aspect", "2.0"); set("gl_fsmax", "false"); + set("gl_lib", ""); set("zoom", "2"); set("fullscreen", "false"); @@ -284,6 +285,7 @@ void Settings::usage() << " linear Blurred scaling (GL_LINEAR)\n" << " -gl_aspect Scale the width by the given amount\n" << " -gl_fsmax <1|0> Use the largest available screenmode in fullscreen OpenGL\n" + << " -gl_lib Specify the OpenGL library\n" << endl #endif << " -zoom Makes window be 'size' times normal\n" diff --git a/stella/src/emucore/stella.pro b/stella/src/emucore/stella.pro index 587c1caf2..1a68b6072 100644 --- a/stella/src/emucore/stella.pro +++ b/stella/src/emucore/stella.pro @@ -6645,6 +6645,7 @@ "Cartridge.Name" "Traffic (RJPG) (PAL)" "Display.Height" "208" "Display.YStart" "35" +"Console.SwapPorts" "Yes" "" "Cartridge.MD5" "4e02880beeb8dbd4da724a3f33f0971f" diff --git a/stella/src/macosx/SettingsMACOSX.cxx b/stella/src/macosx/SettingsMACOSX.cxx index b658d989e..c31c13edc 100644 --- a/stella/src/macosx/SettingsMACOSX.cxx +++ b/stella/src/macosx/SettingsMACOSX.cxx @@ -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: SettingsMACOSX.cxx,v 1.6 2005-08-25 01:21:08 markgrebe Exp $ +// $Id: SettingsMACOSX.cxx,v 1.7 2006-01-14 21:36:29 stephena Exp $ //============================================================================ #include @@ -39,9 +39,10 @@ void prefsSave(void); // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - SettingsMACOSX::SettingsMACOSX(OSystem* osystem) - : Settings(osystem) + : Settings(osystem) { - set("video", "opengl"); // Use opengl mode by default + set("video", "opengl"); // Use opengl mode by default + set("gl_lib", "libGL.so"); } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/stella/src/unix/SettingsUNIX.cxx b/stella/src/unix/SettingsUNIX.cxx index 20579f9dd..34ddda953 100644 --- a/stella/src/unix/SettingsUNIX.cxx +++ b/stella/src/unix/SettingsUNIX.cxx @@ -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: SettingsUNIX.cxx,v 1.15 2006-01-08 13:55:03 stephena Exp $ +// $Id: SettingsUNIX.cxx,v 1.16 2006-01-14 21:36:29 stephena Exp $ //============================================================================ #include "bspf.hxx" @@ -26,6 +26,7 @@ SettingsUNIX::SettingsUNIX(OSystem* osystem) { // This argument is only valid for Linux/UNIX, and will eventually be removed set("accurate", "false"); + set("gl_lib", "libGL.so"); } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/stella/src/win32/SettingsWin32.cxx b/stella/src/win32/SettingsWin32.cxx index 09fab5d72..944047fff 100644 --- a/stella/src/win32/SettingsWin32.cxx +++ b/stella/src/win32/SettingsWin32.cxx @@ -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: SettingsWin32.cxx,v 1.20 2005-10-18 19:04:56 stephena Exp $ +// $Id: SettingsWin32.cxx,v 1.21 2006-01-14 21:36:29 stephena Exp $ //============================================================================ #include @@ -26,11 +26,12 @@ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - SettingsWin32::SettingsWin32(OSystem* osystem) - : Settings(osystem) + : Settings(osystem) { set("fragsize", "2048"); // Anything less than this usually causes sound skipping set("video", "hard"); // Use software mode with hardware surface set("dirtyrects", "false"); // Most Windows systems work better without this + set("gl_lib", "opengl32.dll"); } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -