YEAH!!! I solved my problem by putting a glTranslatef in my code .
rotating sprites
float r = sqrt(pow(0.5f, 2) + pow(0.5f, 2));
glBegin(GL_POLYGON);
glTexCoord3f(0.0f, 0.0f, 0.0f);
glVertex3f(0.0625f+cos(angle)*r*up+horizontal, 0.0625f+sin(angle)*r*up+vertical, 0.0f);
glTexCoord3f(1.0f, 0.0f, 0.0f);
glVertex3f(-0.0625f+cos(angle)*r*up+horizontal, 0.0625f+sin(angle)*r*up+vertical, 0.0f);
glTexCoord3f(1.0f, 1.0f, 0.0f);
glVertex3f(-0.0625f+cos(angle)*r*up+horizontal, -0.0625f+sin(angle)*r*up+vertical, 0.0f);
glTexCoord3f(0.0f, 1.0f, 0.0f);
glVertex3f(0.0625f+cos(angle)*r*up+horizontal, -0.0625f+sin(angle)*r*up+vertical, 0.0f);
glEnd();
so, my OpenGl is limited, but are you pushing already rotated and translated vertices? as opposed to sending a quad and applying a proper translation*rotation matrix?
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement