diff src/video/photon/SDL_ph_video.c @ 910:4ab6d1fd028f

Date: Sat, 26 Jun 2004 14:58:42 +0300 From: "Mike Gorchak" Subject: QNX 6.3 fixes for SDL Sam, I've added new OpenGL framework for SDL, which appeared in the new QNX version - 6.3. I've leave compatibility with previous QNX versions. And I've moved all GL specific functions to the separate module, like it done for the other platforms. SDL is now ready for the QNX 6.3 :)
author Sam Lantinga <slouken@libsdl.org>
date Sun, 18 Jul 2004 19:46:38 +0000
parents 05c551e5bc64
children c9b51268668f
line wrap: on
line diff
--- a/src/video/photon/SDL_ph_video.c	Sun Jul 18 19:44:06 2004 +0000
+++ b/src/video/photon/SDL_ph_video.c	Sun Jul 18 19:46:38 2004 +0000
@@ -47,6 +47,7 @@
 #include "SDL_ph_events_c.h"
 #include "SDL_ph_mouse_c.h"
 #include "SDL_ph_wm_c.h"
+#include "SDL_ph_gl.h"
 #include "SDL_phyuv_c.h"
 #include "blank_cursor.h"
 
@@ -56,14 +57,6 @@
 static void ph_VideoQuit(_THIS);
 static void ph_DeleteDevice(SDL_VideoDevice *device);
 
-#ifdef HAVE_OPENGL
-static void  ph_GL_SwapBuffers(_THIS);
-static int   ph_GL_GetAttribute(_THIS, SDL_GLattr attrib, int* value);
-static int   ph_GL_LoadLibrary(_THIS, const char* path);
-static void* ph_GL_GetProcAddress(_THIS, const char* proc);
-static int   ph_GL_MakeCurrent(_THIS);
-#endif /* HAVE_OPENGL */
-
 static int phstatus=-1;
 
 static int ph_Available(void)
@@ -376,6 +369,7 @@
 
 #ifdef HAVE_OPENGL
     oglctx=NULL;
+    oglbuffers=NULL;
     oglflags=0;
     oglbpp=0;
 #endif /* HAVE_OPENGL */
@@ -663,57 +657,3 @@
     return 1;
 }
 
-#ifdef HAVE_OPENGL
-
-static void ph_GL_SwapBuffers(_THIS)
-{
-    PgSetRegion(PtWidgetRid(window));
-    PdOpenGLContextSwapBuffers(oglctx);
-}
-
-static int ph_GL_GetAttribute(_THIS, SDL_GLattr attrib, int* value)
-{
-    switch (attrib)
-    {
-        case SDL_GL_DOUBLEBUFFER:
-             *value=this->gl_config.double_buffer;
-             break;
-        case SDL_GL_STENCIL_SIZE:
-             *value=this->gl_config.stencil_size;
-             break;
-        case SDL_GL_DEPTH_SIZE:
-             *value=this->gl_config.depth_size;
-             break;
-        default:
-             *value=0;
-             return(-1);
-    }
-    return 0;
-}
-
-static int ph_GL_LoadLibrary(_THIS, const char* path)
-{
-   /* if code compiled with HAVE_OPENGL, that mean that library already linked */
-   this->gl_config.driver_loaded = 1;
-
-   return 0;
-}
-
-static void* ph_GL_GetProcAddress(_THIS, const char* proc)
-{
-   return NULL;
-}
-
-static int ph_GL_MakeCurrent(_THIS)
-{
-    PgSetRegion(PtWidgetRid(window));
-
-    if (oglctx!=NULL)
-    {
-        PhDCSetCurrent(oglctx);
-    }
-
-    return 0;
-}
-
-#endif /* HAVE_OPENGL */