Duplication in vertices: Think about a cube Each vertex is used how many times? It's made of triangles... element array buffers Let's make a cube! Can we get it right the first time? We'll need an element array buffer A GL_ELEMENT_ARRAY_BUFFER Can use unsigned short if we want Unless our model has more than 65,535 vertices! Also glDrawElementsInstanced If we used the round_cube to start: Don't need patches Triangles will be fine It was a tesselation shader demo A disadvantage here: This makes it hard to make each side a different color! It's ok, we'll move on to textures anyway Textures! A texture is an image applied to an object It allows more detailed specification of colors If you didn't need fancy colors, you don't need these Simple and straitforward textures: Just a picture applied to something Some of you did this in Blender Same idea basically Texture coordinate system Model coordinates are x, y, z Texture coordinates use u and v Range is 0.0 to 1.0 Make these coordinates is called uv mapping Easy for a cube Not as easy for other shapes! To put a texture on an object, we need: Model vertices (like before) Texture coordinates An actual texture We don't need colors if we're using textures No reason to waste memory, it's expensive! Remember to use glActiveTexture and glBindTexture when drawing