• Advertisement

Archived

This topic is now archived and is closed to further replies.

Rotating images x number of degrees

This topic is 5313 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Suppose I want to rotate an image to a custom number of degrees, how could I go about achieveing something like this?

Share this post


Link to post
Share on other sites
Advertisement
The really easy way to do it is use 3D and texture map your image onto a quad and rotate the quad in an Ortho projection. Otherwise, look up texture mapping algorithms and implement it yourself. Basically you figure out the edges of the quad and interpolate across its face. You will find lots of articles to explain it in detail.

Share this post


Link to post
Share on other sites
well in openGL you could do something like

glMatrixMode( GL_TEXTURE );
glRotatef( fRot, 0, 0, 1 );
glMatrixMode( GL_MODELVIEW );


then render...maybe

Share this post


Link to post
Share on other sites
Easy !
just follow this


glMatrixMode(GL_TEXTURE);
glLoadIdentity();
glRotatef(angle,0,0,1);
glMatrixMode(GL_MODELVIEW);


Share this post


Link to post
Share on other sites

  • Advertisement