comparison 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
comparison
equal deleted inserted replaced
909:e247a0139900 910:4ab6d1fd028f
24 #define __SDL_PH_VIDEO_H__ 24 #define __SDL_PH_VIDEO_H__
25 25
26 #include "SDL_mouse.h" 26 #include "SDL_mouse.h"
27 #include "SDL_sysvideo.h" 27 #include "SDL_sysvideo.h"
28 28
29 #include <sys/neutrino.h>
30
29 #include <Ph.h> 31 #include <Ph.h>
30 #include <Pt.h> 32 #include <Pt.h>
31 #include <photon/Pg.h> 33 #include <photon/Pg.h>
32 #include <photon/PdDirect.h> 34 #include <photon/PdDirect.h>
33 35
34 #ifdef HAVE_OPENGL 36 #ifdef HAVE_OPENGL
35 #include <photon/PdGL.h> 37 #if (_NTO_VERSION < 630)
38 #include <photon/PdGL.h>
39 #else
40 #include <GL/qnxgl.h>
41 #include <GL/GLPh.h>
42 #endif /* 6.3.0 */
36 #endif /* HAVE_OPENGL */ 43 #endif /* HAVE_OPENGL */
37 44
38 /* Hidden "this" pointer for the video functions */ 45 /* Hidden "this" pointer for the video functions */
39 #define _THIS SDL_VideoDevice* this 46 #define _THIS SDL_VideoDevice* this
40 47
66 { 73 {
67 PgDisplaySettings_t mode_settings; 74 PgDisplaySettings_t mode_settings;
68 PtWidget_t *Window; /* used to handle input events */ 75 PtWidget_t *Window; /* used to handle input events */
69 PhImage_t *image; /* used to display image */ 76 PhImage_t *image; /* used to display image */
70 #ifdef HAVE_OPENGL 77 #ifdef HAVE_OPENGL
71 PdOpenGLContext_t* OGLContext; /* OpenGL context */ 78 #if (_NTO_VERSION < 630)
79 PdOpenGLContext_t* OGLContext; /* OpenGL context */
80 void* OGLBuffers; /* OpenGL buffers (unused) */
81 #else
82 qnxglc_t* OGLContext; /* OpenGL context for the 6.3 */
83 qnxgl_bufs_t* OGLBuffers; /* OpenGL buffers for the 6.3 */
84 #endif /* 630 */
85
72 Uint32 OGLFlags; /* OpenGL flags */ 86 Uint32 OGLFlags; /* OpenGL flags */
73 Uint32 OGLBPP; /* OpenGL bpp */ 87 Uint32 OGLBPP; /* OpenGL bpp */
74 #endif /* HAVE_OPENGL */ 88 #endif /* HAVE_OPENGL */
75 PgColor_t savedpal[_Pg_MAX_PALETTE]; 89 PgColor_t savedpal[_Pg_MAX_PALETTE];
76 PgColor_t syspalph[_Pg_MAX_PALETTE]; 90 PgColor_t syspalph[_Pg_MAX_PALETTE];
132 #define SDL_BlankCursor (this->hidden->BlankCursor) 146 #define SDL_BlankCursor (this->hidden->BlankCursor)
133 #define videomode_emulatemode (this->hidden->videomode_emulatemode) 147 #define videomode_emulatemode (this->hidden->videomode_emulatemode)
134 148
135 #ifdef HAVE_OPENGL 149 #ifdef HAVE_OPENGL
136 #define oglctx (this->hidden->OGLContext) 150 #define oglctx (this->hidden->OGLContext)
151 #define oglbuffers (this->hidden->OGLBuffers)
137 #define oglflags (this->hidden->OGLFlags) 152 #define oglflags (this->hidden->OGLFlags)
138 #define oglbpp (this->hidden->OGLBPP) 153 #define oglbpp (this->hidden->OGLBPP)
139 #endif /* HAVE_OPENGL */ 154 #endif /* HAVE_OPENGL */
140 155
141 #endif /* __SDL_PH_VIDEO_H__ */ 156 #endif /* __SDL_PH_VIDEO_H__ */