Skip to content

Commit

Permalink
Date: Sat, 26 Jun 2004 14:58:42 +0300
Browse files Browse the repository at this point in the history
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 :)
  • Loading branch information
slouken committed Jul 18, 2004
1 parent d3371fd commit 4662e8c
Show file tree
Hide file tree
Showing 12 changed files with 573 additions and 182 deletions.
37 changes: 25 additions & 12 deletions src/video/SDL_video.c
Expand Up @@ -564,6 +564,10 @@ static void SDL_CreateShadowSurface(int depth)
return;
}

#ifdef __QNXNTO__
#include <sys/neutrino.h>
#endif /* __QNXNTO__ */

/*
* Set the requested video mode, allocating a shadow buffer if necessary.
*/
Expand Down Expand Up @@ -738,22 +742,31 @@ SDL_Surface * SDL_SetVideoMode (int width, int height, int bpp, Uint32 flags)
#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 );
#else
#define SDL_PROC(ret,func,params) video->func=func;

#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) \
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) &&
Expand Down
2 changes: 2 additions & 0 deletions src/video/photon/Makefile.am
Expand Up @@ -16,6 +16,8 @@ PH_SRCS = \
SDL_ph_mouse_c.h \
SDL_ph_video.c \
SDL_ph_video.h \
SDL_ph_gl.c \
SDL_ph_gl.h \
SDL_ph_wm.c \
SDL_ph_wm_c.h \
SDL_phyuv.c \
Expand Down
1 change: 0 additions & 1 deletion src/video/photon/SDL_ph_events.c
Expand Up @@ -32,7 +32,6 @@ static char rcsid =
#include <stdio.h>
#include <setjmp.h>
#include <sys/time.h>
#include <sys/neutrino.h>

#include <Ph.h>
#include <photon/PkKeyDef.h>
Expand Down

0 comments on commit 4662e8c

Please sign in to comment.