I can't find a whole lot of information on 2D images. I am hoping to make a simple Tetris game using the engine so for each piece I would like the ability to rotate it. Does anyone know a solution to this?
Thanks in advance.
Can 2D Images be rotated
Well, rotating a 2d image is not supported by Irrlicht, yet...
You could write your own rotating functions as you have direct access to the bitmap data with lock() and unlock()...
For Tetris you may have a look at my site, I wrote IrrTris (source included) !!!
You could write your own rotating functions as you have direct access to the bitmap data with lock() and unlock()...
For Tetris you may have a look at my site, I wrote IrrTris (source included) !!!
while(!asleep) sheep++;
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
see this example for drawing 2d rotating sprites (irrforge.org is currently down, hence the need for google cached version)
http://64.233.161.104/search?q=cache:9U ... =clnk&cd=2
http://64.233.161.104/search?q=cache:9U ... =clnk&cd=2
Thanks for the reply, that might just be a good challenge for me to try and figure out a way to rotate 2d images. I couldn't get your site to work, I'm not sure it may be my ISP because I've had problems in the past. If you wouldn't mind (you don't have to) emailing me the source code I would really appreciate it. adam_autum@iwon.comAcki wrote:Well, rotating a 2d image is not supported by Irrlicht, yet...
You could write your own rotating functions as you have direct access to the bitmap data with lock() and unlock()...
For Tetris you may have a look at my site, I wrote IrrTris (source included) !!!
Thanks again
Thank you for the link, it really helps explain a lot of features of the engine. I was going to use that method, but I was hoping their was a smoother way to rotate a bitmap. I am now thinking about rendering the texture to a cube and rotating that. Do you think that would work? I believe I saw somewhere about rotating 3d cubes.bitplane wrote:see this example for drawing 2d rotating sprites (irrforge.org is currently down, hence the need for google cached version)
http://64.233.161.104/search?q=cache:9U ... =clnk&cd=2