Jump to content

  • Log In with Google      Sign In   
  • Create Account


Howto apply rotation, scaling to a 2D image


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   -  Reputation: 99

Like
-1Likes
Like

Posted 10 December 2011 - 08:45 AM

Solved thanks !!

Sponsor:

#2 MedRamBO   Members   -  Reputation: 99

Like
0Likes
Like

Posted 10 December 2011 - 02:15 PM

Solved thanks !!

#3 magicstix   Members   -  Reputation: 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   -  Reputation: 99

Like
0Likes
Like

Posted 10 December 2011 - 04:00 PM

Solved thanks !!

#5 magicstix   Members   -  Reputation: 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   -  Reputation: 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.



PARTNERS