Game Development Reference
In-Depth Information
glEnd();
glBegin(GL_LINE_LOOP);
glVertex3f(10.0f, -10.0f, -10.0f);
glVertex3f(-10.0f, -10.0f, -10.0f);
glVertex3f(-10.0f, 10.0f, -10.0f);
glVertex3f(10.0f, 10.0f, -10.0f);
glEnd();
glBegin(GL_LINES);
glColor3f(0.0f, 0.0f, 1.0f);
glVertex3f(-10.0f, -10.0f, -10.0f);
glVertex3f(-10.0f, -10.0f, 10.0f);
glVertex3f(-10.0f, 10.0f, 10.0f);
glVertex3f(-10.0f, 10.0f, -10.0f);
glVertex3f( 10.0f, -10.0f, -10.0f);
glVertex3f( 10.0f, -10.0f, 10.0f);
glVertex3f( 10.0f, 10.0f, 10.0f);
glVertex3f( 10.0f, 10.0f, -10.0f);
glEnd();
}
Summary
At the time of writing there are two competing APIs for getting access to
3D graphics hardware: OpenGL and DirectX. OpenGL is much easier to
Figure 3.5 Cube with edges highlighted and no depth buffer.
 
Search Nedrilad ::




Custom Search