diff src/video/SDL_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 50f5a29c6a17
children 46916168361d
line wrap: on
line diff
--- a/src/video/SDL_video.c	Sun Jul 18 19:44:06 2004 +0000
+++ b/src/video/SDL_video.c	Sun Jul 18 19:46:38 2004 +0000
@@ -564,6 +564,10 @@
 	return;
 }
 
+#ifdef __QNXNTO__
+    #include <sys/neutrino.h>
+#endif /* __QNXNTO__ */
+
 /*
  * Set the requested video mode, allocating a shadow buffer if necessary.
  */
@@ -738,22 +742,31 @@
 #ifdef HAVE_OPENGL
 	/* Load GL symbols (before MakeCurrent, where we need glGetString). */
 	if ( flags & (SDL_OPENGL | SDL_OPENGLBLIT) ) {
-#ifndef __QNXNTO__
-#define SDL_PROC(ret,func,params) \
-do { \
-	video->func = SDL_GL_GetProcAddress(#func); \
-	if ( ! video->func ) { \
-		SDL_SetError("Couldn't load GL function: %s\n", #func); \
-		return(NULL); \
-	} \
-} while ( 0 );
+
+#ifdef __QNXNTO__
+    #if (_NTO_VERSION < 630)
+       #define __SDL_NOGETPROCADDR__
+    #endif /* 6.3.0 */
+#endif /* __QNXNTO__ */
+
+#ifdef __SDL_NOGETPROCADDR__
+    #define SDL_PROC(ret,func,params) video->func=func;
 #else
-#define SDL_PROC(ret,func,params) video->func=func;
-#endif /* __QNXNTO__ */
+    #define SDL_PROC(ret,func,params) \
+    do { \
+        video->func = SDL_GL_GetProcAddress(#func); \
+        if ( ! video->func ) { \
+            SDL_SetError("Couldn't load GL function: %s\n", #func); \
+        return(NULL); \
+        } \
+    } while ( 0 );
+
+#endif /* __SDL_NOGETPROCADDR__ */
+
 #include "SDL_glfuncs.h"
 #undef SDL_PROC	
 	}
-#endif
+#endif /* HAVE_OPENGL */
 
 	/* If we're running OpenGL, make the context current */
 	if ( (video->screen->flags & SDL_OPENGL) &&