






Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
An in-depth explanation of texturing and texture mapping in opengl, covering the basics of pictures as 2d arrays of color values, texture co-ordinates, texture mapping, and loading bmps using the glaux library. It also demonstrates how to display texture-mapped squares and texture-map parametric surfaces.
Typology: Slides
1 / 12
This page cannot be seen from the preview
Don't miss anything!







^ (This is Opus the Penguin wrapped around a sphere.)
(1,1) (0,0)
arrTextures[whichTexture]); glColor3f(1,1,1);glNormal3f(0,0,1);glBegin(GL_QUADS);glTexCoord2f(0,1);
glVertex3f(-5,5,0);glTexCoord2f(0,0); glVertex3f(-5,-5,0);glTexCoord2f(1,0); glVertex3f(5,-5,0);glTexCoord2f(1,1); glVertex3f(5,5,0); glEnd();glBindTexture(GL_TEXTURE_2D,
0);
very^ easy. If u and v range from0 to 1, then they alsocover the range of thetexture co-ordinates. You can set the currenttexture co-ordinate as(u,v) to map your imageto any parametricsurface.