Howto apply rotation, scaling to a 2D image

Started by
4 comments, last by MedRamBO 12 years, 4 months ago
Solved thanks !!
Advertisement
Solved thanks !!
Why not just render it to a texture on a quad and scale/rotate the quad?
Solved thanks !!
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.
Solved thanks !!

This topic is closed to new replies.

Advertisement