The pixels in the texture will be addressed using texture coordinates during drawing operations. Since images are 2D arrays of pixels, it will be bound to the GL_TEXTURE_2D target. Just like other objects, textures have to be bound to apply operations to them. This article will pay attention to the use of textures for images, but the principles generally apply to all kinds of textures. An example of another use for textures is storing terrain information. It's possible to have 1D, 2D and even 3D textures, which can be used to store bulk data on the GPU. Textures are typically used for images to decorate 3D models, but in reality they can be used to store many different kinds of data. It shouldn't be a surprise at this point what this function is called. Just like VBOs and VAOs, textures are objects that need to be generated first by calling a function.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |