SDL 1.3 - iPhone - Surface Transformations

Hi, I see many changes in SDL 1.3.

On iPhone SDL use OpenGLES Texture to blit Surfaces SDL_RenderCopy.

Is possible to use OpenGLES functions to transform Surfaces, like glRotatef
and Blit with transformations in version 1.3 ?

And other thing.

Is possible to use UIImage to load png files, instead overload the binary
using libpng + SDL_image?

Thanks

Vinicius Jarina

Hi Vinicius

On iPhone SDL use OpenGLES Texture to blit Surfaces SDL_RenderCopy.

Yes, although technically you convert the surface to an SDL_Texture,
then use SDL_RenderCopy to draw the texture to the screen.

Is possible to use OpenGLES functions to transform Surfaces, like
glRotatef and Blit with transformations in version 1.3 ?

You may have success, or you may not. It depends on how the driver is
going about drawing the texture. For this reason I would recommend
instead loading your image to your SDL surface, then converting that
SDL surface to an OpenGL texture manually and drawing it yourself
using OpenGL. There is an example program that does this in the test
folder of the SDL source code … I think my iPhone demo "fireworks.c"
might do this too.

And other thing.

Is possible to use UIImage to load png files, instead overload the
binary using libpng + SDL_image?

You could. There are Apple examples that do UIImage -> CGBitmap ->
OpenGL ES, or you may wish to program something like UIImage ->
CGBitmap -> SDL_Surface yourself.

  • Holmes> Thanks

Vinicius Jarina


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org