comparison src/video/qnxgf/SDL_qnxgf.h @ 3099:82e60908fab1

Date: Mon, 23 Mar 2009 09:17:24 +0200 From: "Mike Gorchak" Subject: New QNX patches Please apply patch qnx4.diff, which is attached. What has been done: 1)Added back OpenGL ES renderer for QNX target. Added few corrections to OpenGL ES renderer to let it work under QNX. OpenGL ES renderer do not support textures under QNX, so I think some additional work must be done. 2) Added GL_OES_query_matrix extension to SDL_opengles.h header file, which required by OpenGL ES 1.1 specification. 3) Added attribute clearing at the entrance of function SDL_GL_GetAttribure(). Added error checking into the function SDL_GL_GetAttribure(), because some attributes can't be obtained in OpenGL ES 1.0. 4) Porting testdyngles to OpenGL ES 1.0 (1.1 has glColor4ub() and glColor4f() functions, but 1.0 has glColor4f() only). 5) Added error checking after obtaining attributes using SDL_GL_GetAttribute() function to the testgl2 and testgles. 6) Small correction to testmultiaudio with printing errors. 7) Added software and accelerated OpenGL ES 1.0 support into the QNX GF driver. Please remove ./src/audio/nto directory - it will not be used anymore. Please create ./src/audio/qsa directory and add content of the archive qsa.tar.gz into this directory. I rewrote some sound code, added support for multiple audio cards, enumeration, etc. Added initial support for capture. As far as I can understand SDL 1.3 is not supporting audio capture right now ? Sam, Am I right ? Or audio capture must be supported through the PlayDevice routine ? And last, please put file SDL_gf_opengles.c to the ./src/video/qnxgf directory. It is OpenGL ES 1.1 emulation layer for some functions, which are not supported by OpenGL ES 1.0.
author Sam Lantinga <slouken@libsdl.org>
date Tue, 24 Mar 2009 10:33:12 +0000
parents cad1aefa2ed9
children 7b3a09fb9c8b
comparison
equal deleted inserted replaced
3098:5f372cef955d 3099:82e60908fab1
28 #define __SDL_QNXGF_H__ 28 #define __SDL_QNXGF_H__
29 29
30 #include "../SDL_sysvideo.h" 30 #include "../SDL_sysvideo.h"
31 31
32 #include <gf/gf.h> 32 #include <gf/gf.h>
33 #include <gf/gf3d.h>
34
35 #if defined(SDL_VIDEO_OPENGL_ES)
36 #include <GLES/egl.h>
37 #endif /* SDL_VIDEO_OPENGL_ES */
33 38
34 typedef struct SDL_VideoData 39 typedef struct SDL_VideoData
35 { 40 {
36 gf_dev_t gfdev; /* GF device handle */ 41 gf_dev_t gfdev; /* GF device handle */
37 gf_dev_info_t gfdev_info; /* GF device information */ 42 gf_dev_info_t gfdev_info; /* GF device information */
38 SDL_bool gfinitialized; /* GF device initialization status */ 43 SDL_bool gfinitialized; /* GF device initialization status */
44 #if defined(SDL_VIDEO_OPENGL_ES)
45 EGLDisplay egldisplay; /* OpenGL ES display connection */
46 uint32_t egl_refcount; /* OpenGL ES reference count */
47 uint32_t swapinterval; /* OpenGL ES default swap interval */
48 #endif /* SDL_VIDEO_OPENGL_ES */
39 } SDL_VideoData; 49 } SDL_VideoData;
40 50
41 #define SDL_VIDEO_GF_DEVICENAME_MAX 257 51 #define SDL_VIDEO_GF_DEVICENAME_MAX 257
42 52
43 typedef struct SDL_DisplayData 53 typedef struct SDL_DisplayData
53 gf_layer_t layer; /* Graphics layer to which attached */ 63 gf_layer_t layer; /* Graphics layer to which attached */
54 } SDL_DisplayData; 64 } SDL_DisplayData;
55 65
56 typedef struct SDL_WindowData 66 typedef struct SDL_WindowData
57 { 67 {
58 SDL_bool uses_gles; /* if true window must support OpenGL ES*/ 68 SDL_bool uses_gles; /* true if window support OpenGL ES */
69 #if defined(SDL_VIDEO_OPENGL_ES)
70 gf_3d_target_t target; /* OpenGL ES window target */
71 SDL_bool target_created; /* GF 3D target is created if true */
72 EGLConfig gles_config; /* OpenGL ES framebuffer configuration*/
73 EGLContext gles_context; /* OpenGL ES context */
74 EGLint gles_attributes[256]; /* OpenGL ES attributes for context */
75 EGLSurface gles_surface; /* OpenGL ES target rendering surface */
76 #endif /* SDL_VIDEO_OPENGL_ES */
59 } SDL_WindowData; 77 } SDL_WindowData;
78
79 typedef struct SDL_GLDriverData
80 {
81 #if defined(SDL_VIDEO_OPENGL_ES)
82 #endif /* SDL_VIDEO_OPENGL_ES */
83 } SDL_GLDriverData;
60 84
61 /****************************************************************************/ 85 /****************************************************************************/
62 /* Low level GF graphics driver capabilities */ 86 /* Low level GF graphics driver capabilities */
63 /****************************************************************************/ 87 /****************************************************************************/
64 typedef struct GF_DeviceCaps 88 typedef struct GF_DeviceCaps
67 uint32_t caps; 91 uint32_t caps;
68 } GF_DeviceCaps; 92 } GF_DeviceCaps;
69 93
70 #define SDL_GF_UNACCELERATED 0x00000000 94 #define SDL_GF_UNACCELERATED 0x00000000
71 #define SDL_GF_ACCELERATED 0x00000001 95 #define SDL_GF_ACCELERATED 0x00000001
96 #define SDL_GF_NOLOWRESOLUTION 0x00000000
97 #define SDL_GF_LOWRESOLUTION 0x00000002
98 #define SDL_GF_UNACCELERATED_3D 0x00000000
99 #define SDL_GF_ACCELERATED_3D 0x00000004
72 100
73 /****************************************************************************/ 101 /****************************************************************************/
74 /* SDL_VideoDevice functions declaration */ 102 /* SDL_VideoDevice functions declaration */
75 /****************************************************************************/ 103 /****************************************************************************/
76 104