MedicalVisualization
Texture Coordinate Example
← Texture Space | ● | Texture Data →
Quad with 1:1 mapping to a texture.
glBegin(GL_QUADS);
glTexCoord2f(0,0);
glVertex3d(x_0,y_0,z_0);
glTexCoord2f(1,0);
glVertex3d(x_1,y_1,z_1);
glTexCoord2f(0,1);
glVertex3d(x_2,y_2,z_2);
glTexCoord2f(1,1);
glVertex3d(x_3,y_3,z_3);
glEnd();
glTexCoord2f(0,0);
glVertex3d(x_0,y_0,z_0);
glTexCoord2f(1,0);
glVertex3d(x_1,y_1,z_1);
glTexCoord2f(0,1);
glVertex3d(x_2,y_2,z_2);
glTexCoord2f(1,1);
glVertex3d(x_3,y_3,z_3);
glEnd();
← Texture Space | ● | Texture Data →