RPGDXThe center of Indie-RPG gaming
Not logged in. [log in] [register]
 
 
Post new topic Reply to topic  
View previous topic - View next topic  
Author Message
ShurikeN
Lowly Slime


Joined: 27 Feb 2008
Posts: 4

PostPosted: Wed Feb 27, 2008 5:00 am    Post subject: SDL mirror image [quote]

hi guys, how do i mirror image in SDL??
Back to top  
Bjorn
Demon Hunter


Joined: 29 May 2002
Posts: 1425
Location: Germany

PostPosted: Thu Mar 06, 2008 8:06 am    Post subject: [quote]

Basic SDL doesn't support this. You can either implement it yourself (the SDL manual shows you how to read/write pixels iirc), or use SDL_gfx, which has a rotozoomSurfaceXY function that can flip surfaces for you by zooming with a negative factor.

Another option would be to use SDL to initialize an OpenGL context, convert your SDL surfaces to OpenGL textures and draw your textures mirrored where necessary. This would save you memory and would be faster on basically any system with an accelerated graphics card.
Back to top  
Post new topic Reply to topic Page 1 of 1 All times are GMT
 



Display posts from previous:   
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum