Hello
I am using MFC with openGL to simulate plane wing 3D movement.
I used code below to draw a 3D model of plane wing. But nothing show on the screen. What’s wrong wiht these code? Is there any materail saying how to create 3D geometry ?
void showWing()
{
glClear(…);
glLoadIdentity();
glTranslatef(-0.5f, 0.0f, 0.0f);
glBegin(GL_QUAD_STRIP);
glColor3f(0.0f, 1.0f, 0.0f);
glVertex3f(-2.0f, 0.4f, 1.0f);
glVertex3f(-2.0f, 0.4f, -1.0f);
glVertex3f(2.0f, 0.4f, 0.5f);
glVertex3f(2.0f, 0.4f, -0.5f);
glColor3f(1.0f, 1.0f, 0.0f);
glVertex3f(2.2f, 0.4f, 1.10f);
…
glEnd();
SwapBuffers(hDC->GetSafeHdc());
}
Thanks in advance
jason