Mercurial > sdl-ios-xcode
diff src/video/SDL_renderer_gles.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 | 0faae272a372 |
children | 6c98826d88b0 |
line wrap: on
line diff
--- a/src/video/SDL_renderer_gles.c Mon Mar 23 05:37:45 2009 +0000 +++ b/src/video/SDL_renderer_gles.c Tue Mar 24 10:33:12 2009 +0000 @@ -30,6 +30,17 @@ #include "SDL_rect_c.h" #include "SDL_yuv_sw_c.h" +#ifdef __QNXNTO__ + +/* Empty function stub to get OpenGL ES 1.0 support without */ +/* OpenGL ES extension GL_OES_draw_texture_supported */ +GL_API void GL_APIENTRY glDrawTexiOES(GLint x, GLint y, GLint z, GLint width, GLint height) +{ + return; +} + +#endif /* __QNXNTO__ */ + /* OpenGL ES 1.1 renderer implementation, based on the OpenGL renderer */ static const float inv255f = 1.0f / 255.0f; @@ -349,6 +360,7 @@ GLenum format, type; int texture_w, texture_h; GLenum result; + switch (texture->format) { case SDL_PIXELFORMAT_INDEX1LSB: case SDL_PIXELFORMAT_INDEX1MSB: @@ -479,8 +491,6 @@ SetupTextureUpdate(GLES_RenderData * renderdata, SDL_Texture * texture, int pitch) { - - GLES_TextureData *data = (GLES_TextureData *) texture->driverdata; renderdata->glBindTexture(data->type, data->texture); renderdata->glPixelStorei(GL_UNPACK_ALIGNMENT, 1); @@ -888,6 +898,6 @@ SDL_free(renderer); } -#endif /* SDL_VIDEO_RENDER_OGL */ +#endif /* SDL_VIDEO_RENDER_OGL_ES */ /* vi: set ts=4 sw=4 expandtab: */