Today at practical we were asked to apply textures on to objects.
After tinkering around with the code i finally came up with this picture
Here's the code used to do this
glBegin(GL_QUADS);
gTexture.SetTexture();
glTexCoord2f(0,0);
glVertex2f(0,0);
glTexCoord2f(1,0);
glVertex2f(5.5,0);
glTexCoord2f(1,1);
glVertex2f(5.5,5.5);
glTexCoord2f(0,1);
glVertex2f(0,5.5);
//draw quad here
Ok I am going back to finsih up the rest of it edit this post later bye.
glEnd();
glEnd();
No comments:
Post a Comment