Rectangle Texture
For two-dimensional textures, a rectangular texture can be used with gl_texture_rectangle in addition to gl_texture_2d.
Several features of rectangular textures:
Can not MIP, only load glteximage2d level 0
Non-normalized texture coordinates
Compression textures are not supported
This approach is typically used for processing and submitting image data, and is simpler and more efficient than the usual 2D texture hardware support.
GLSL Sampler Sampler2d-Samplerrect
Multiple textures
Multi-Texture Support query:
Glint N;glgetitegerv (gl_max_texture_units,&n);
Using multiple textures
Texture array
Use Gl_texture_2d_array as the first parameter of a related function. Loads a set of images using Glteximage3d.
You can set the last parameter to Null,gl to leave it in an uninitialized state, and then use the Gltexsubimage3d loop to load all the images later.
Sampling with uniform Sampler2darray in GLSL
Texture Proxy
Texture proxies enable you to query for supported texture information.
Creating a texture proxy is like creating a texture, but the first parameter should be one of the following:
| gl_proxy_texture_1d |
| gl_proxy_texture_2d |
| Gl_proxy_texture_3d |
| Gl_proxy_texture_cube_map |
The last parameter should be null.
It is important to note that this does not really create a texture.
After the creation we can query the corresponding information to the following (this means that we first assign the specified value to him, and then to query the value of exactly how much ):
Glteximage2d (gl_proxy_texture_2d,0, Gl_rgba,2048,4096,0, Gl_bgra,gl_ Unsigned,null);
See if 4096 height void Glgettexlevelparameter is supported (gl_texture_2d,0, Gl_texture_height,&height );
OpenGL Texture Advanced