Texture objects are used to store texture data and make it easier to get. We can control many textures and return to the texture that has been previously loaded into the texture resource. Using a texture object is usually the fastest way to support texture, there will be high performance results because it is binding (reuse) an existing texture of an existing texture, always re-use the function GLTexImage * d () Mount a texture image is faster.
In addition, some applications support a limited high-performance work set (Working Set), which has better performance than texture objects other than itself. These high-performance texture objects are called residentes and may have some available hardware or / and software accelerators. We can use texture objects to load the most commonly used textures into this limited area.
The steps to use texture objects to process texture data are as follows:
1. Generate a texture name - Glgentextures ();
2. Bind the texture object to the texture data (first create a texture object for texture data, including image array and texture properties ();
3. If the application supports the work set of high performance texture, it is necessary to understand if there is enough space to store all texture objects. If there is not enough space, you can create priorities for each texture object, so that the most commonly used texture is residing in the work set - the intend of intestine ();
4. Bind and rebound the texture object, when rendering the textured model, make the current data of the texture object can be obtained - GlbindTexture ();
5. Clear the texture object. Texture resources are generally limited, delete textures can release texture resources - GLDeleteTextures ().