I am still working on rotating my bullet around my plane sprite I have made some progress. however when move the plane down the bullet is drawn toward the top middle of the screen. when I move the plane to the left the bullet is drawn toward the middle of the left of the screen. although the bullet does move in the same direction as the plane is facing, at least I have solved that problem. I think the problem is in the glRotatef function. here is my code so far.
void drawbullet_one()
{
glEnable(GL_TEXTURE_2D);
glBindTexture(GL_TEXTURE_2D, texture[2]);
glPushMatrix();
if (rotate == 0.25f)
{
angle = 0.0f;
}
if (rotate == 0.75f)
{
angle = 180.0f;
}
if (rotate == 0.5f)
{
angle = 90.0f;
}
if (rotate == 0.0f)
{
angle = 270.0f;
}
glRotatef(angle, 0.0f, 0.0f, 1.0f);
glTranslatef(0.0f, 0.0f + up, 0.0f);
glBegin(GL_POLYGON);
glTexCoord3f(0.0f, 0.0f, 0.0f);
glVertex3f(0.0625f+horizontal, 0.0625f+vertical, 0.0f);
glTexCoord3f(1.0f, 0.0f, 0.0f);
glVertex3f(-0.0625f+horizontal, 0.0625f+vertical, 0.0f);
glTexCoord3f(1.0f, 1.0f, 0.0f);
glVertex3f(-0.0625f+horizontal, -0.0625f+vertical, 0.0f);
glTexCoord3f(0.0f, 1.0f, 0.0f);
glVertex3f(0.0625f+horizontal, -0.0625f+vertical, 0.0f);
glEnd();
glPopMatrix();
glDisable(GL_TEXTURE_2D);
}