Advertisement

oblique angle

Started by March 04, 2023 10:12 PM
2 comments, last by fleabay 1ย year, 8ย 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);
}

sorry but I figured out my problem

Advertisement

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