๐ŸŽ‰ Celebrating 25 Years of GameDev.net! ๐ŸŽ‰

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

oblique angle

Started by
2 comments, last by fleabay 1ย year, 3ย months ago

I am trying to draw a tank sprite at a 45 degree angle here is my code I don't want to use glRotatef I want to use straight vertex's

void Player_Tank()
{
	glEnable(GL_TEXTURE_2D);
	glBindTexture(GL_TEXTURE_2D, texture[0]);

	glBegin(GL_POLYGON);
	glTexCoord3f(0.0f, 0.0f, 0.0f);
	glVertex3f(110.0f, -80.0f, 0.0f);

	glTexCoord3f(1.0f, 0.0f, 0.0f);
	glVertex3f(120.0f, -70.0f, 0.0f);

	glTexCoord3f(1.0f, 1.0f, 0.0f);
	glVertex3f(100.0f, -50.0f, 0.0f);

	glTexCoord3f(0.0f, 1.0f, 0.0f);
	glVertex3f(90.0f, -60.0f, 0.0f);
	glEnd();

	glDisable(GL_TEXTURE_2D);
}
Advertisement

sorry but I figured out my problem

pbivens67 said:
sorry but I figured out my problem

March 4th, 2023. A very historic day.

๐Ÿ™‚๐Ÿ™‚๐Ÿ™‚๐Ÿ™‚๐Ÿ™‚<โ†The tone posse, ready for action.

This topic is closed to new replies.

Advertisement