Jump to content
  • Advertisement

Archived

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

how to rotate GL_QUADS textured within one of its left side

This topic is 5154 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

how to rotate GL_QUADS textured within one of its left side.make its right side to its left side i''m sorry . my english is very poor and i am a beginner of opengl now stick some code following: initial code£º glBegin(GL_QUADS); glTexCoord2f(0.0f, 0.0f); glVertex3f(-1.0f,-1.0f, 0.0f); glTexCoord2f(1.0f, 0.0f); glVertex3f(1.0f,-1.0f, 0.0f); glTexCoord2f(1.0f, 1.0f); glVertex3f( 1.0f,1.0f, 0.0f); glTexCoord2f(0.0f, 1.0f); glVertex3f(-1.0f, 1.0f, 0.0f); glEnd(); rotate code£º glBegin(GL_QUADS); glTexCoord2f(0.0f, 0.0f); glVertex3f(-1.0f,-1.0f, 0.0f); glTexCoord2f(1.0f, 0.0f); glVertex3f((float)cos((double)M_angle) * 2.0f,-(float)sin((double)M_angle) * 2.0f, 0.0f); glTexCoord2f(1.0f, 1.0f); glVertex3f( (float)cos((double)M_angle) * 2.0f,(float)sin((double)M_angle) * 2.0f, 0.0f); glTexCoord2f(0.0f, 1.0f); glVertex3f(-1.0f, 1.0f, 0.0f); glEnd(); M_angle+=0.01f; if (M_angle>1.0f||M_angle<0.0f) { M_angle=0.0f; M_Flag=false; } please help me and my msn: cqu6729@163.com

Share this post


Link to post
Share on other sites
Advertisement

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!