comparison test/testgles.c @ 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 f55c87ae336b
children e6c21c14ce3a
comparison
equal deleted inserted replaced
3098:5f372cef955d 3099:82e60908fab1
86 int value; 86 int value;
87 int i, done; 87 int i, done;
88 SDL_DisplayMode mode; 88 SDL_DisplayMode mode;
89 SDL_Event event; 89 SDL_Event event;
90 Uint32 then, now, frames; 90 Uint32 then, now, frames;
91 int status;
91 92
92 /* Initialize parameters */ 93 /* Initialize parameters */
93 fsaa = 0; 94 fsaa = 0;
94 accel = 0; 95 accel = 0;
95 96
158 printf("Renderer : %s\n", glGetString(GL_RENDERER)); 159 printf("Renderer : %s\n", glGetString(GL_RENDERER));
159 printf("Version : %s\n", glGetString(GL_VERSION)); 160 printf("Version : %s\n", glGetString(GL_VERSION));
160 printf("Extensions : %s\n", glGetString(GL_EXTENSIONS)); 161 printf("Extensions : %s\n", glGetString(GL_EXTENSIONS));
161 printf("\n"); 162 printf("\n");
162 163
163 SDL_GL_GetAttribute(SDL_GL_RED_SIZE, &value); 164 status=SDL_GL_GetAttribute(SDL_GL_RED_SIZE, &value);
164 printf("SDL_GL_RED_SIZE: requested %d, got %d\n", 5, value); 165 if (!status) {
165 SDL_GL_GetAttribute(SDL_GL_GREEN_SIZE, &value); 166 printf("SDL_GL_RED_SIZE: requested %d, got %d\n", 5, value);
166 printf("SDL_GL_GREEN_SIZE: requested %d, got %d\n", 5, value); 167 } else {
167 SDL_GL_GetAttribute(SDL_GL_BLUE_SIZE, &value); 168 printf("Failed to get SDL_GL_RED_SIZE: %s\n", SDL_GetError());
168 printf("SDL_GL_BLUE_SIZE: requested %d, got %d\n", 5, value); 169 }
169 SDL_GL_GetAttribute(SDL_GL_DEPTH_SIZE, &value); 170 status=SDL_GL_GetAttribute(SDL_GL_GREEN_SIZE, &value);
170 printf("SDL_GL_DEPTH_SIZE: requested %d, got %d\n", 16, value); 171 if (!status) {
172 printf("SDL_GL_GREEN_SIZE: requested %d, got %d\n", 5, value);
173 } else {
174 printf("Failed to get SDL_GL_GREEN_SIZE: %s\n", SDL_GetError());
175 }
176 status=SDL_GL_GetAttribute(SDL_GL_BLUE_SIZE, &value);
177 if (!status) {
178 printf("SDL_GL_BLUE_SIZE: requested %d, got %d\n", 5, value);
179 } else {
180 printf("Failed to get SDL_GL_BLUE_SIZE: %s\n", SDL_GetError());
181 }
182 status=SDL_GL_GetAttribute(SDL_GL_DEPTH_SIZE, &value);
183 if (!status) {
184 printf("SDL_GL_DEPTH_SIZE: requested %d, got %d\n", 16, value);
185 } else {
186 printf("Failed to get SDL_GL_DEPTH_SIZE: %s\n", SDL_GetError());
187 }
171 if (fsaa) { 188 if (fsaa) {
172 SDL_GL_GetAttribute(SDL_GL_MULTISAMPLEBUFFERS, &value); 189 status=SDL_GL_GetAttribute(SDL_GL_MULTISAMPLEBUFFERS, &value);
173 printf("SDL_GL_MULTISAMPLEBUFFERS: requested 1, got %d\n", value); 190 if (!status) {
174 SDL_GL_GetAttribute(SDL_GL_MULTISAMPLESAMPLES, &value); 191 printf("SDL_GL_MULTISAMPLEBUFFERS: requested 1, got %d\n", value);
175 printf("SDL_GL_MULTISAMPLESAMPLES: requested %d, got %d\n", fsaa, 192 } else {
176 value); 193 printf("Failed to get SDL_GL_MULTISAMPLEBUFFERS: %s\n", SDL_GetError());
194 }
195 status=SDL_GL_GetAttribute(SDL_GL_MULTISAMPLESAMPLES, &value);
196 if (!status) {
197 printf("SDL_GL_MULTISAMPLESAMPLES: requested %d, got %d\n", fsaa, value);
198 } else {
199 printf("Failed to get SDL_GL_MULTISAMPLESAMPLES: %s\n", SDL_GetError());
200 }
177 } 201 }
178 if (accel) { 202 if (accel) {
179 SDL_GL_GetAttribute(SDL_GL_ACCELERATED_VISUAL, &value); 203 status=SDL_GL_GetAttribute(SDL_GL_ACCELERATED_VISUAL, &value);
180 printf("SDL_GL_ACCELERATED_VISUAL: requested 1, got %d\n", value); 204 if (!status)
205 {
206 printf("SDL_GL_ACCELERATED_VISUAL: requested 1, got %d\n", value);
207 } else {
208 printf("Failed to get SDL_GL_ACCELERATED_VISUAL: %s\n", SDL_GetError());
209 }
181 } 210 }
182 211
183 /* Set rendering settings */ 212 /* Set rendering settings */
184 glMatrixMode(GL_PROJECTION); 213 glMatrixMode(GL_PROJECTION);
185 glLoadIdentity(); 214 glLoadIdentity();