opengl graphics textures. quiz you didn't see that coming!
TRANSCRIPT
![Page 1: OpenGL Graphics Textures. Quiz You didn't see that coming!](https://reader036.vdocuments.net/reader036/viewer/2022062322/5697c0201a28abf838cd1f62/html5/thumbnails/1.jpg)
OpenGL GraphicsTextures
![Page 2: OpenGL Graphics Textures. Quiz You didn't see that coming!](https://reader036.vdocuments.net/reader036/viewer/2022062322/5697c0201a28abf838cd1f62/html5/thumbnails/2.jpg)
QuizYou didn't see that coming!
![Page 3: OpenGL Graphics Textures. Quiz You didn't see that coming!](https://reader036.vdocuments.net/reader036/viewer/2022062322/5697c0201a28abf838cd1f62/html5/thumbnails/3.jpg)
1. What is OpenGL?
![Page 4: OpenGL Graphics Textures. Quiz You didn't see that coming!](https://reader036.vdocuments.net/reader036/viewer/2022062322/5697c0201a28abf838cd1f62/html5/thumbnails/4.jpg)
2. What is a vertex?
![Page 5: OpenGL Graphics Textures. Quiz You didn't see that coming!](https://reader036.vdocuments.net/reader036/viewer/2022062322/5697c0201a28abf838cd1f62/html5/thumbnails/5.jpg)
3. What are the three steps to render with depth testing?
![Page 6: OpenGL Graphics Textures. Quiz You didn't see that coming!](https://reader036.vdocuments.net/reader036/viewer/2022062322/5697c0201a28abf838cd1f62/html5/thumbnails/6.jpg)
4. What is the difference between an orthographic and a perspective projection matrix?
![Page 7: OpenGL Graphics Textures. Quiz You didn't see that coming!](https://reader036.vdocuments.net/reader036/viewer/2022062322/5697c0201a28abf838cd1f62/html5/thumbnails/7.jpg)
5. What are the three components of the fixed functionality lighting model?
![Page 8: OpenGL Graphics Textures. Quiz You didn't see that coming!](https://reader036.vdocuments.net/reader036/viewer/2022062322/5697c0201a28abf838cd1f62/html5/thumbnails/8.jpg)
Textures
![Page 9: OpenGL Graphics Textures. Quiz You didn't see that coming!](https://reader036.vdocuments.net/reader036/viewer/2022062322/5697c0201a28abf838cd1f62/html5/thumbnails/9.jpg)
What is a Texture?
Image applied to geometry
.tga, .jpg, .png files
1, 2 or 3 dimensional!
![Page 10: OpenGL Graphics Textures. Quiz You didn't see that coming!](https://reader036.vdocuments.net/reader036/viewer/2022062322/5697c0201a28abf838cd1f62/html5/thumbnails/10.jpg)
Texture Coordinates
Vertex attribute
Values between 0 and 1
1, 2 or 3-dimensional
OpenGL will interpolate between the vertices
![Page 11: OpenGL Graphics Textures. Quiz You didn't see that coming!](https://reader036.vdocuments.net/reader036/viewer/2022062322/5697c0201a28abf838cd1f62/html5/thumbnails/11.jpg)
Texture Triangle
![Page 12: OpenGL Graphics Textures. Quiz You didn't see that coming!](https://reader036.vdocuments.net/reader036/viewer/2022062322/5697c0201a28abf838cd1f62/html5/thumbnails/12.jpg)
Sampling Textures
Exceedingly rare that the texture will fit the geometry exactly
We need a way of mapping to the best representative texel
Nearest-neighbour filtering
Bilinear filtering
![Page 13: OpenGL Graphics Textures. Quiz You didn't see that coming!](https://reader036.vdocuments.net/reader036/viewer/2022062322/5697c0201a28abf838cd1f62/html5/thumbnails/13.jpg)
Mipmaps
Used to improve the sampling quality
![Page 14: OpenGL Graphics Textures. Quiz You didn't see that coming!](https://reader036.vdocuments.net/reader036/viewer/2022062322/5697c0201a28abf838cd1f62/html5/thumbnails/14.jpg)
![Page 15: OpenGL Graphics Textures. Quiz You didn't see that coming!](https://reader036.vdocuments.net/reader036/viewer/2022062322/5697c0201a28abf838cd1f62/html5/thumbnails/15.jpg)
Used to improve the sampling quality
Mipmaps
Can specify mipmap level when loading a texture into OpenGL
glGenerateMipmap()
Trilinear filtering
![Page 16: OpenGL Graphics Textures. Quiz You didn't see that coming!](https://reader036.vdocuments.net/reader036/viewer/2022062322/5697c0201a28abf838cd1f62/html5/thumbnails/16.jpg)
OpenGL Texture Objects
Stores a texture in GPU memory and holds texture properties
glGenTextures()
glBindTexture()
glTexImage2D()
glTexParamf()
glDeleteTextures()
![Page 17: OpenGL Graphics Textures. Quiz You didn't see that coming!](https://reader036.vdocuments.net/reader036/viewer/2022062322/5697c0201a28abf838cd1f62/html5/thumbnails/17.jpg)
Demo
![Page 18: OpenGL Graphics Textures. Quiz You didn't see that coming!](https://reader036.vdocuments.net/reader036/viewer/2022062322/5697c0201a28abf838cd1f62/html5/thumbnails/18.jpg)
Questions?
![Page 19: OpenGL Graphics Textures. Quiz You didn't see that coming!](https://reader036.vdocuments.net/reader036/viewer/2022062322/5697c0201a28abf838cd1f62/html5/thumbnails/19.jpg)