2008-10-04 06:46:59 +00:00
|
|
|
#include <stdlib.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <math.h>
|
|
|
|
|
|
|
|
#include "common.h"
|
|
|
|
|
2011-01-04 20:37:07 -08:00
|
|
|
#if defined(__IPHONEOS__) || defined(__ANDROID__)
|
2008-10-04 06:46:59 +00:00
|
|
|
#define HAVE_OPENGLES
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef HAVE_OPENGLES
|
|
|
|
|
|
|
|
#include "SDL_opengles.h"
|
|
|
|
|
|
|
|
static CommonState *state;
|
2009-05-23 22:41:08 +00:00
|
|
|
static SDL_GLContext *context = NULL;
|
2009-10-21 14:51:42 +00:00
|
|
|
static int depth = 16;
|
2008-10-04 06:46:59 +00:00
|
|
|
|
|
|
|
/* Call this instead of exit(), so we can clean up SDL: atexit() is evil. */
|
|
|
|
static void
|
|
|
|
quit(int rc)
|
|
|
|
{
|
2009-04-28 04:38:51 +00:00
|
|
|
int i;
|
|
|
|
|
2009-05-23 22:41:08 +00:00
|
|
|
if (context != NULL) {
|
|
|
|
for (i = 0; i < state->num_windows; i++) {
|
2009-04-28 04:38:51 +00:00
|
|
|
if (context[i]) {
|
|
|
|
SDL_GL_DeleteContext(context[i]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
SDL_free(context);
|
2008-10-04 06:46:59 +00:00
|
|
|
}
|
2009-04-28 04:38:51 +00:00
|
|
|
|
2008-10-04 06:46:59 +00:00
|
|
|
CommonQuit(state);
|
|
|
|
exit(rc);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
Render()
|
|
|
|
{
|
|
|
|
static GLubyte color[8][4] = { {255, 0, 0, 0},
|
|
|
|
{255, 0, 0, 255},
|
|
|
|
{0, 255, 0, 255},
|
|
|
|
{0, 255, 0, 255},
|
|
|
|
{0, 255, 0, 255},
|
|
|
|
{255, 255, 255, 255},
|
|
|
|
{255, 0, 255, 255},
|
|
|
|
{0, 0, 255, 255}
|
|
|
|
};
|
|
|
|
static GLfloat cube[8][3] = { {0.5, 0.5, -0.5},
|
|
|
|
{0.5f, -0.5f, -0.5f},
|
|
|
|
{-0.5f, -0.5f, -0.5f},
|
|
|
|
{-0.5f, 0.5f, -0.5f},
|
|
|
|
{-0.5f, 0.5f, 0.5f},
|
|
|
|
{0.5f, 0.5f, 0.5f},
|
|
|
|
{0.5f, -0.5f, 0.5f},
|
|
|
|
{-0.5f, -0.5f, 0.5f}
|
|
|
|
};
|
|
|
|
static GLubyte indices[36] = { 0, 3, 4,
|
|
|
|
4, 5, 0,
|
|
|
|
0, 5, 6,
|
|
|
|
6, 1, 0,
|
|
|
|
6, 7, 2,
|
|
|
|
2, 1, 6,
|
|
|
|
7, 4, 3,
|
|
|
|
3, 2, 7,
|
|
|
|
5, 4, 7,
|
|
|
|
7, 6, 5,
|
|
|
|
2, 3, 1,
|
|
|
|
3, 0, 1
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/* Do our drawing, too. */
|
|
|
|
glClearColor(0.0, 0.0, 0.0, 1.0);
|
|
|
|
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
|
|
|
|
|
|
|
/* Draw the cube */
|
|
|
|
glColorPointer(4, GL_UNSIGNED_BYTE, 0, color);
|
|
|
|
glEnableClientState(GL_COLOR_ARRAY);
|
|
|
|
glVertexPointer(3, GL_FLOAT, 0, cube);
|
|
|
|
glEnableClientState(GL_VERTEX_ARRAY);
|
|
|
|
glDrawElements(GL_TRIANGLES, 36, GL_UNSIGNED_BYTE, indices);
|
|
|
|
|
|
|
|
glMatrixMode(GL_MODELVIEW);
|
|
|
|
glRotatef(5.0, 1.0, 1.0, 1.0);
|
|
|
|
}
|
|
|
|
|
|
|
|
int
|
|
|
|
main(int argc, char *argv[])
|
|
|
|
{
|
|
|
|
int fsaa, accel;
|
|
|
|
int value;
|
|
|
|
int i, done;
|
|
|
|
SDL_DisplayMode mode;
|
|
|
|
SDL_Event event;
|
|
|
|
Uint32 then, now, frames;
|
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.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403566
2009-03-24 10:33:12 +00:00
|
|
|
int status;
|
2008-10-04 06:46:59 +00:00
|
|
|
|
|
|
|
/* Initialize parameters */
|
|
|
|
fsaa = 0;
|
|
|
|
accel = 0;
|
|
|
|
|
|
|
|
/* Initialize test framework */
|
|
|
|
state = CommonCreateState(argv, SDL_INIT_VIDEO);
|
|
|
|
if (!state) {
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
for (i = 1; i < argc;) {
|
|
|
|
int consumed;
|
|
|
|
|
|
|
|
consumed = CommonArg(state, i);
|
|
|
|
if (consumed == 0) {
|
|
|
|
if (SDL_strcasecmp(argv[i], "--fsaa") == 0) {
|
|
|
|
++fsaa;
|
|
|
|
consumed = 1;
|
|
|
|
} else if (SDL_strcasecmp(argv[i], "--accel") == 0) {
|
|
|
|
++accel;
|
|
|
|
consumed = 1;
|
2009-10-21 14:51:42 +00:00
|
|
|
} else if (SDL_strcasecmp(argv[i], "--zdepth") == 0) {
|
|
|
|
i++;
|
|
|
|
if (!argv[i]) {
|
|
|
|
consumed = -1;
|
|
|
|
} else {
|
|
|
|
depth = SDL_atoi(argv[i]);
|
|
|
|
consumed = 1;
|
|
|
|
}
|
2008-10-04 06:46:59 +00:00
|
|
|
} else {
|
|
|
|
consumed = -1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (consumed < 0) {
|
2009-10-21 14:51:42 +00:00
|
|
|
fprintf(stderr, "Usage: %s %s [--fsaa] [--accel] [--zdepth %%d]\n", argv[0],
|
2008-10-04 06:46:59 +00:00
|
|
|
CommonUsage(state));
|
|
|
|
quit(1);
|
|
|
|
}
|
|
|
|
i += consumed;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Set OpenGL parameters */
|
|
|
|
state->window_flags |= SDL_WINDOW_OPENGL;
|
2009-10-21 14:51:42 +00:00
|
|
|
state->gl_red_size = 5;
|
|
|
|
state->gl_green_size = 5;
|
|
|
|
state->gl_blue_size = 5;
|
|
|
|
state->gl_depth_size = depth;
|
2008-10-04 06:46:59 +00:00
|
|
|
if (fsaa) {
|
2009-10-21 14:51:42 +00:00
|
|
|
state->gl_multisamplebuffers=1;
|
|
|
|
state->gl_multisamplesamples=fsaa;
|
2008-10-04 06:46:59 +00:00
|
|
|
}
|
|
|
|
if (accel) {
|
2009-10-21 14:51:42 +00:00
|
|
|
state->gl_accelerated=1;
|
2008-10-04 06:46:59 +00:00
|
|
|
}
|
|
|
|
if (!CommonInit(state)) {
|
|
|
|
quit(2);
|
|
|
|
}
|
|
|
|
|
2009-10-13 20:16:23 +00:00
|
|
|
context = SDL_calloc(state->num_windows, sizeof(context));
|
2009-05-23 22:41:08 +00:00
|
|
|
if (context == NULL) {
|
|
|
|
fprintf(stderr, "Out of memory!\n");
|
|
|
|
quit(2);
|
2009-04-28 04:38:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Create OpenGL ES contexts */
|
2009-05-23 22:41:08 +00:00
|
|
|
for (i = 0; i < state->num_windows; i++) {
|
2009-04-28 04:38:51 +00:00
|
|
|
context[i] = SDL_GL_CreateContext(state->windows[i]);
|
|
|
|
if (!context[i]) {
|
|
|
|
fprintf(stderr, "SDL_GL_CreateContext(): %s\n", SDL_GetError());
|
|
|
|
quit(2);
|
|
|
|
}
|
2008-10-04 06:46:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if (state->render_flags & SDL_RENDERER_PRESENTVSYNC) {
|
|
|
|
SDL_GL_SetSwapInterval(1);
|
|
|
|
} else {
|
|
|
|
SDL_GL_SetSwapInterval(0);
|
|
|
|
}
|
|
|
|
|
|
|
|
SDL_GetCurrentDisplayMode(&mode);
|
2009-10-21 14:51:42 +00:00
|
|
|
printf("Screen bpp: %d\n", SDL_BITSPERPIXEL(mode.format));
|
2008-10-04 06:46:59 +00:00
|
|
|
printf("\n");
|
|
|
|
printf("Vendor : %s\n", glGetString(GL_VENDOR));
|
|
|
|
printf("Renderer : %s\n", glGetString(GL_RENDERER));
|
|
|
|
printf("Version : %s\n", glGetString(GL_VERSION));
|
|
|
|
printf("Extensions : %s\n", glGetString(GL_EXTENSIONS));
|
|
|
|
printf("\n");
|
|
|
|
|
2009-05-23 22:41:08 +00:00
|
|
|
status = SDL_GL_GetAttribute(SDL_GL_RED_SIZE, &value);
|
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.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403566
2009-03-24 10:33:12 +00:00
|
|
|
if (!status) {
|
|
|
|
printf("SDL_GL_RED_SIZE: requested %d, got %d\n", 5, value);
|
|
|
|
} else {
|
2009-05-23 22:41:08 +00:00
|
|
|
fprintf(stderr, "Failed to get SDL_GL_RED_SIZE: %s\n",
|
|
|
|
SDL_GetError());
|
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.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403566
2009-03-24 10:33:12 +00:00
|
|
|
}
|
2009-05-23 22:41:08 +00:00
|
|
|
status = SDL_GL_GetAttribute(SDL_GL_GREEN_SIZE, &value);
|
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.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403566
2009-03-24 10:33:12 +00:00
|
|
|
if (!status) {
|
|
|
|
printf("SDL_GL_GREEN_SIZE: requested %d, got %d\n", 5, value);
|
|
|
|
} else {
|
2009-05-23 22:41:08 +00:00
|
|
|
fprintf(stderr, "Failed to get SDL_GL_GREEN_SIZE: %s\n",
|
|
|
|
SDL_GetError());
|
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.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403566
2009-03-24 10:33:12 +00:00
|
|
|
}
|
2009-05-23 22:41:08 +00:00
|
|
|
status = SDL_GL_GetAttribute(SDL_GL_BLUE_SIZE, &value);
|
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.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403566
2009-03-24 10:33:12 +00:00
|
|
|
if (!status) {
|
|
|
|
printf("SDL_GL_BLUE_SIZE: requested %d, got %d\n", 5, value);
|
|
|
|
} else {
|
2009-05-23 22:41:08 +00:00
|
|
|
fprintf(stderr, "Failed to get SDL_GL_BLUE_SIZE: %s\n",
|
|
|
|
SDL_GetError());
|
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.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403566
2009-03-24 10:33:12 +00:00
|
|
|
}
|
2009-05-23 22:41:08 +00:00
|
|
|
status = SDL_GL_GetAttribute(SDL_GL_DEPTH_SIZE, &value);
|
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.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403566
2009-03-24 10:33:12 +00:00
|
|
|
if (!status) {
|
2009-10-21 14:51:42 +00:00
|
|
|
printf("SDL_GL_DEPTH_SIZE: requested %d, got %d\n", depth, value);
|
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.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403566
2009-03-24 10:33:12 +00:00
|
|
|
} else {
|
2009-05-23 22:41:08 +00:00
|
|
|
fprintf(stderr, "Failed to get SDL_GL_DEPTH_SIZE: %s\n",
|
|
|
|
SDL_GetError());
|
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.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403566
2009-03-24 10:33:12 +00:00
|
|
|
}
|
2008-10-04 06:46:59 +00:00
|
|
|
if (fsaa) {
|
2009-05-23 22:41:08 +00:00
|
|
|
status = SDL_GL_GetAttribute(SDL_GL_MULTISAMPLEBUFFERS, &value);
|
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.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403566
2009-03-24 10:33:12 +00:00
|
|
|
if (!status) {
|
|
|
|
printf("SDL_GL_MULTISAMPLEBUFFERS: requested 1, got %d\n", value);
|
|
|
|
} else {
|
2009-05-23 22:41:08 +00:00
|
|
|
fprintf(stderr, "Failed to get SDL_GL_MULTISAMPLEBUFFERS: %s\n",
|
|
|
|
SDL_GetError());
|
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.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403566
2009-03-24 10:33:12 +00:00
|
|
|
}
|
2009-05-23 22:41:08 +00:00
|
|
|
status = SDL_GL_GetAttribute(SDL_GL_MULTISAMPLESAMPLES, &value);
|
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.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403566
2009-03-24 10:33:12 +00:00
|
|
|
if (!status) {
|
2009-05-23 22:41:08 +00:00
|
|
|
printf("SDL_GL_MULTISAMPLESAMPLES: requested %d, got %d\n", fsaa,
|
|
|
|
value);
|
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.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403566
2009-03-24 10:33:12 +00:00
|
|
|
} else {
|
2009-05-23 22:41:08 +00:00
|
|
|
fprintf(stderr, "Failed to get SDL_GL_MULTISAMPLESAMPLES: %s\n",
|
|
|
|
SDL_GetError());
|
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.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403566
2009-03-24 10:33:12 +00:00
|
|
|
}
|
2008-10-04 06:46:59 +00:00
|
|
|
}
|
|
|
|
if (accel) {
|
2009-05-23 22:41:08 +00:00
|
|
|
status = SDL_GL_GetAttribute(SDL_GL_ACCELERATED_VISUAL, &value);
|
|
|
|
if (!status) {
|
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.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403566
2009-03-24 10:33:12 +00:00
|
|
|
printf("SDL_GL_ACCELERATED_VISUAL: requested 1, got %d\n", value);
|
|
|
|
} else {
|
2009-05-23 22:41:08 +00:00
|
|
|
fprintf(stderr, "Failed to get SDL_GL_ACCELERATED_VISUAL: %s\n",
|
|
|
|
SDL_GetError());
|
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.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403566
2009-03-24 10:33:12 +00:00
|
|
|
}
|
2008-10-04 06:46:59 +00:00
|
|
|
}
|
|
|
|
|
2009-04-28 04:38:51 +00:00
|
|
|
/* Set rendering settings for each context */
|
|
|
|
for (i = 0; i < state->num_windows; ++i) {
|
2009-05-23 22:41:08 +00:00
|
|
|
status = SDL_GL_MakeCurrent(state->windows[i], context[i]);
|
|
|
|
if (status) {
|
2009-04-28 04:38:51 +00:00
|
|
|
printf("SDL_GL_MakeCurrent(): %s\n", SDL_GetError());
|
|
|
|
|
|
|
|
/* Continue for next window */
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
|
2009-10-13 18:14:22 +00:00
|
|
|
glViewport(0, 0, state->window_w, state->window_h);
|
2009-04-28 04:38:51 +00:00
|
|
|
glMatrixMode(GL_PROJECTION);
|
|
|
|
glLoadIdentity();
|
|
|
|
glOrthof(-2.0, 2.0, -2.0, 2.0, -20.0, 20.0);
|
|
|
|
glMatrixMode(GL_MODELVIEW);
|
|
|
|
glLoadIdentity();
|
|
|
|
glEnable(GL_DEPTH_TEST);
|
|
|
|
glDepthFunc(GL_LESS);
|
|
|
|
glShadeModel(GL_SMOOTH);
|
|
|
|
}
|
2008-10-04 06:46:59 +00:00
|
|
|
|
|
|
|
/* Main render loop */
|
|
|
|
frames = 0;
|
|
|
|
then = SDL_GetTicks();
|
|
|
|
done = 0;
|
|
|
|
while (!done) {
|
|
|
|
/* Check for events */
|
|
|
|
++frames;
|
|
|
|
while (SDL_PollEvent(&event)) {
|
2009-06-11 06:03:05 +00:00
|
|
|
switch (event.type) {
|
|
|
|
case SDL_WINDOWEVENT:
|
|
|
|
switch (event.window.event) {
|
|
|
|
case SDL_WINDOWEVENT_RESIZED:
|
|
|
|
for (i = 0; i < state->num_windows; ++i) {
|
|
|
|
if (event.window.windowID == state->windows[i]) {
|
|
|
|
status = SDL_GL_MakeCurrent(state->windows[i], context[i]);
|
|
|
|
if (status) {
|
|
|
|
printf("SDL_GL_MakeCurrent(): %s\n", SDL_GetError());
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
/* Change view port to the new window dimensions */
|
|
|
|
glViewport(0, 0, event.window.data1, event.window.data2);
|
|
|
|
/* Update window content */
|
|
|
|
Render();
|
|
|
|
SDL_GL_SwapWindow(state->windows[i]);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
2008-10-04 06:46:59 +00:00
|
|
|
CommonEvent(state, &event, &done);
|
|
|
|
}
|
|
|
|
for (i = 0; i < state->num_windows; ++i) {
|
2009-05-23 22:41:08 +00:00
|
|
|
status = SDL_GL_MakeCurrent(state->windows[i], context[i]);
|
|
|
|
if (status) {
|
|
|
|
printf("SDL_GL_MakeCurrent(): %s\n", SDL_GetError());
|
2009-04-28 04:38:51 +00:00
|
|
|
|
2009-05-23 22:41:08 +00:00
|
|
|
/* Continue for next window */
|
|
|
|
continue;
|
2009-04-28 04:38:51 +00:00
|
|
|
}
|
2008-10-04 06:46:59 +00:00
|
|
|
Render();
|
|
|
|
SDL_GL_SwapWindow(state->windows[i]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Print out some timing information */
|
|
|
|
now = SDL_GetTicks();
|
|
|
|
if (now > then) {
|
|
|
|
printf("%2.2f frames per second\n",
|
|
|
|
((double) frames * 1000) / (now - then));
|
|
|
|
}
|
|
|
|
quit(0);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
#else /* HAVE_OPENGLES */
|
|
|
|
|
|
|
|
int
|
|
|
|
main(int argc, char *argv[])
|
|
|
|
{
|
|
|
|
printf("No OpenGL ES support on this system\n");
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif /* HAVE_OPENGLES */
|