Jump to content

View more

Image of the Day

Boxes as reward for our ranking mode. ヾ(☆▽☆)
#indiedev #gamedev #gameart #screenshotsaturday https://t.co/ALF1InmM7K
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

Howto apply rotation, scaling to a 2D image

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
5 replies to this topic

#1 MedRamBO   Members   

99
Like
-1Likes
Like

Posted 10 December 2011 - 08:45 AM

Solved thanks !!

#2 MedRamBO   Members   

99
Like
0Likes
Like

Posted 10 December 2011 - 02:15 PM

Solved thanks !!

#3 magicstix   Members   

191
Like
0Likes
Like

Posted 10 December 2011 - 02:36 PM

Why not just render it to a texture on a quad and scale/rotate the quad?

#4 MedRamBO   Members   

99
Like
0Likes
Like

Posted 10 December 2011 - 04:00 PM

Solved thanks !!

#5 magicstix   Members   

191
Like
1Likes
Like

Posted 10 December 2011 - 05:43 PM

Rastertek's tutorial would probably be able to explain it better than I can.


The main things to keep in mind are that you're no longer rendering to the screen, but to the texture. This isn't much of a change, since when you render to the 'screen' you're really rendering to a texture as well.

Once you've rendered to the texture, bind it to a quad that's whatever size you want and render it like a normal polygon. You can then use a shader or d3d's built in functions to scale and rotate the quad with standard 3D matrices. if you don't rotate it around the Y or X axes, it'll remain a "2D" quad.

Just make sure you render the quad last with depth buffering disabled, that way it will always be on top of your screen.

#6 MedRamBO   Members   

99
Like
0Likes
Like

Posted 10 December 2011 - 06:38 PM

Solved thanks !!




Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.