diff src/video/photon/SDL_ph_video.h @ 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 30168104389f
children 19418e4422cb
line wrap: on
line diff
--- a/src/video/photon/SDL_ph_video.h	Sun Jul 18 19:44:06 2004 +0000
+++ b/src/video/photon/SDL_ph_video.h	Sun Jul 18 19:46:38 2004 +0000
@@ -26,13 +26,20 @@
 #include "SDL_mouse.h"
 #include "SDL_sysvideo.h"
 
+#include <sys/neutrino.h>
+
 #include <Ph.h>
 #include <Pt.h>
 #include <photon/Pg.h>
 #include <photon/PdDirect.h>
 
 #ifdef HAVE_OPENGL
-    #include <photon/PdGL.h>
+    #if (_NTO_VERSION < 630)
+        #include <photon/PdGL.h>
+    #else
+        #include <GL/qnxgl.h>
+        #include <GL/GLPh.h>
+    #endif /* 6.3.0 */
 #endif /* HAVE_OPENGL */
 
 /* Hidden "this" pointer for the video functions */
@@ -68,7 +75,14 @@
     PtWidget_t *Window;                  /* used to handle input events */
     PhImage_t *image;	                 /* used to display image       */
 #ifdef HAVE_OPENGL
-    PdOpenGLContext_t* OGLContext;       /* OpenGL context              */
+    #if (_NTO_VERSION < 630)
+        PdOpenGLContext_t* OGLContext;   /* OpenGL context              */
+        void* OGLBuffers;                /* OpenGL buffers (unused)     */
+    #else
+        qnxglc_t* OGLContext;            /* OpenGL context for the 6.3  */
+        qnxgl_bufs_t* OGLBuffers;        /* OpenGL buffers for the 6.3  */
+    #endif /* 630 */
+
     Uint32 OGLFlags;                     /* OpenGL flags                */
     Uint32 OGLBPP;                       /* OpenGL bpp                  */
 #endif /* HAVE_OPENGL */
@@ -134,6 +148,7 @@
 
 #ifdef HAVE_OPENGL
      #define oglctx               (this->hidden->OGLContext)
+     #define oglbuffers           (this->hidden->OGLBuffers)
      #define oglflags             (this->hidden->OGLFlags)
      #define oglbpp               (this->hidden->OGLBPP)
 #endif /* HAVE_OPENGL */