March 2013
Intermediate to advanced
984 pages
26h 18m
English
Here are some tips to ensure that you allow OpenGL to use your textures most efficiently, ensuring the best possible performance for your application. Some common pitfalls are enumerated here with some advice on how to avoid them.
Use immutable texture storage for textures wherever possible. Immutable storage for textures is created using the glTexStorage2D() function or the appropriate one for your chosen texture target. Mutable storage is created by calling glTexImage2D(). When a texture is marked as immutable, the OpenGL implementation can make certain assumptions about the validity of a texture object. For example, the texture will always be complete.
Create and initialize the mipmap ...