Game Development Reference
In-Depth Information
glTexCoord2f(1.0f,0.0f);
glVertex3f(-10.0f, 10.0f, -10.0f);
glTexCoord2f(0.0f,0.0f);
glVertex3f(10.0f, 10.0f, -10.0f);
glEnd();
glDisable(GL_TEXTURE_2D);
//Now just draw coloured faces
glBegin(GL_QUADS);
// left
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);
// right
glColor3f(1.0f, 1.0f, 0.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);
// top
glColor3f(1.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);
// bottom
glColor3f(0.0f, 1.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);
glEnd();
}
Using multiple levels of detail
When sizing down a bitmap using the GL_NEAREST option, the results
can be a great distortion of the original bitmap. Since we have chosen to
skip pixels when a 64
×
64 texture is drawn at 8
×
8, it is using only an
Search Nedrilad ::




Custom Search