comparison src/video/qnxgf/SDL_qnxgf.h @ 3087:0b6f51c29267

Date: Wed, 4 Mar 2009 15:38:22 +0200 From: "Mike Gorchak" Subject: Re: About QNX support in SDL 1.3 Here is another batch of patches. 1) Makefile.in - added SDL_opengles.h header as header to install. 2) configure.in - Added special define to detect Common Lite OpenGL ES library in case if Common library is not installed. Added check for clock_gettime in libc (in QNX it is in libc). 3) SDL_config.h.in - Added SDL_VIDEO_RENDER_OPENGL_ES and SDL_VIDEO_OPENGL_ES declarations for configure script autodetection. 4) SDL_opengles.h - Added GL_API definition if it is not defined. Added extension GL_OES_draw_texture because OpenGL ES Renderer uses it without declaration. Added GL_OES_vertex_buffer_object extension, which is supported under QNX OpenGL ES. Added GL_OES_single_precision extension. 5) To the test directory I've added building OpenGL ES test applications through the autotools suite. Was support for iPhone IDE building only.
author Sam Lantinga <slouken@libsdl.org>
date Wed, 04 Mar 2009 15:10:47 +0000
parents
children cad1aefa2ed9
comparison
equal deleted inserted replaced
3086:0102ed19c21a 3087:0b6f51c29267
1 /*
2 SDL - Simple DirectMedia Layer
3 Copyright (C) 1997-2009 Sam Lantinga
4
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with this library; if not, write to the Free Software
17 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18
19 Sam Lantinga
20 slouken@libsdl.org
21 */
22
23 #ifndef __SDL_QNXGF_H__
24 #define __SDL_QNXGF_H__
25
26 #include "../SDL_sysvideo.h"
27
28 #include <gf/gf.h>
29
30 typedef struct SDL_VideoData
31 {
32 gf_dev_t gfdev; /* GF device handle */
33 gf_dev_info_t gfdev_info; /* GF device information */
34 SDL_bool gfinitialized; /* GF device initialization status */
35 } SDL_VideoData;
36
37 typedef struct SDL_DisplayData
38 {
39 gf_display_info_t display_info; /* GF display information */
40 gf_display_t display; /* GF display handle */
41 } SDL_DisplayData;
42
43 /****************************************************************************/
44 /* SDL_VideoDevice functions declaration */
45 /****************************************************************************/
46
47 /* Display and window functions */
48 int qnxgf_videoinit(_THIS);
49 void qnxgf_videoquit(_THIS);
50 void qnxgf_getdisplaymodes(_THIS);
51 int qnxgf_setdisplaymode(_THIS, SDL_DisplayMode* mode);
52 int qnxgf_setdisplaypalette(_THIS, SDL_Palette* palette);
53 int qnxgf_getdisplaypalette(_THIS, SDL_Palette* palette);
54 int qnxgf_setdisplaygammaramp(_THIS, Uint16* ramp);
55 int qnxgf_getdisplaygammaramp(_THIS, Uint16* ramp);
56 int qnxgf_createwindow(_THIS, SDL_Window* window);
57 int qnxgf_createwindowfrom(_THIS, SDL_Window* window, const void* data);
58 void qnxgf_setwindowtitle(_THIS, SDL_Window* window);
59 void qnxgf_setwindowicon(_THIS, SDL_Window* window, SDL_Surface* icon);
60 void qnxgf_setwindowposition(_THIS, SDL_Window* window);
61 void qnxgf_setwindowsize(_THIS, SDL_Window* window);
62 void qnxgf_showwindow(_THIS, SDL_Window* window);
63 void qnxgf_hidewindow(_THIS, SDL_Window* window);
64 void qnxgf_raisewindow(_THIS, SDL_Window* window);
65 void qnxgf_maximizewindow(_THIS, SDL_Window* window);
66 void qnxgf_minimizewindow(_THIS, SDL_Window* window);
67 void qnxgf_restorewindow(_THIS, SDL_Window* window);
68 void qnxgf_setwindowgrab(_THIS, SDL_Window* window);
69 void qnxgf_destroywindow(_THIS, SDL_Window* window);
70
71 /* Window manager function */
72 SDL_bool qnxgf_getwindowwminfo(_THIS, SDL_Window* window, struct SDL_SysWMinfo* info);
73
74 /* OpenGL/OpenGL ES functions */
75 int qnxgf_gl_loadlibrary(_THIS, const char* path);
76 void* qnxgf_gl_getprocaddres(_THIS, const char* proc);
77 void qnxgf_gl_unloadlibrary(_THIS);
78 SDL_GLContext qnxgf_gl_createcontext(_THIS, SDL_Window* window);
79 int qnxgf_gl_makecurrent(_THIS, SDL_Window* window, SDL_GLContext context);
80 int qnxgf_gl_setswapinterval(_THIS, int interval);
81 int qnxgf_gl_getswapinterval(_THIS);
82 void qnxgf_gl_swapwindow(_THIS, SDL_Window* window);
83 void qnxgf_gl_deletecontext(_THIS, SDL_GLContext context);
84
85 /* Event handling function */
86 void qnxgf_pumpevents(_THIS);
87
88 /* Screen saver related function */
89 void qnxgf_suspendscreensaver(_THIS);
90
91 #endif /* __SDL_QNXGF_H__ */