2d rotate

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
thelan
Posts: 8
Joined: Thu Mar 16, 2006 6:30 pm

2d rotate

Post by thelan »

i want to make 2d game. i want to rotate texture. how can i do that. i don't want to use Magic2d libary.

If anybody don't understand me, pls tel me. :shock:
adam23
Posts: 14
Joined: Fri Jun 16, 2006 6:37 pm
Contact:

Post by adam23 »

I just asked the same question you can check out the link to the forum here.
http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=13813
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Post by Acki »

A masterpiece !!!
Not just too lazy to use the search function, no even reading the last 5 posts are to much work... :evil:
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
thelan
Posts: 8
Joined: Thu Mar 16, 2006 6:30 pm

Post by thelan »

I'm sorry but i'm post before adam23 you can see it at time posted. i'm not lazy guy. i always serch before post topic. :?
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Post by Acki »

Well, just some links in this forum related to your question, I found within a view seconds:

http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=11455
http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=13813
http://irrlicht.sourceforge.net/phpBB2/ ... php?t=2816
http://irrlicht.sourceforge.net/phpBB2/ ... php?t=2957

So don't tell me you did a search....
Maybe you opened the search site, typed something and clicked on search, but you didn't check the results... :roll:
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
thelan
Posts: 8
Joined: Thu Mar 16, 2006 6:30 pm

Post by thelan »

I'm sorry, maybe i posted not clear(my english is bad).
all links that u posted(except adam23 because i post before him) , i founded them before, but i want another way.
is there another way to rotate texture? i dont want to use scenenode.
can i edit the engine to rotate texture. How?

thx everybody that reply me

sorry again, i posted not cleary. :oops:
Maybe you opened the search site, typed something and clicked on search, but you didn't check the results...
i always serch. i always check the results too. :roll:
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

There should be thousands of site on the net which provide code for image rotation. Just load an image into Irrlicht, lock the data, apply your algorithm, unlock. Done. No changes to Irrlicht necessary, but a good and fast implementation might make it at least onto my patch page :)
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Post by Acki »

thelan wrote:can i edit the engine to rotate texture. How?
Well, you don't look at the posts at all !!!
The first link I found shows exactly this for OpenGL, you just have to convert it to what you want...

There is no easy way to do this...

Or have a look for Magic2D or IrrSpintz, I think they have 2d rotating included...
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
Baal Cadar
Posts: 377
Joined: Fri Oct 28, 2005 10:28 am
Contact:

Post by Baal Cadar »

Either manipulate opengl texture matrix like proposed by Acki, or simply use a vertex shader.

I'd prefer the vertex shader approach, since it is ultimately flexible and simple to implement and doesn't require you to meddle with rendersystem dependent code. (You still have to provide HLSL/GLSL variants, if you want to stay rendersystem independent.)
No offense :)
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Yes, Emil's Library is of course a good idea. He definitely has it inthere, but you have to use the library since it is not open source. Maybe he posted parts of that to the Wiki, so check that one out as soon as the Wiki is up again.
thelan
Posts: 8
Joined: Thu Mar 16, 2006 6:30 pm

Post by thelan »

thx for everyone.... :P
Post Reply