|
Axmol 3.0.0-89d6d9a
|
The texture implementation supports 2D, cubemap, and 2D array textures. More...
#include <TextureGL.h>
Inherits Texture.
Public Member Functions | |
| TextureImpl (const TextureDesc &desc) | |
| TextureImpl (GLuint texture, uint32_t width, uint32_t height) | |
| Wraps an existing OpenGL texture object. | |
| void | updateData (const void *data, int width, int height, int level, int layerIndex) override |
| Update a two-dimensional texture image. | |
| void | updateCompressedData (const void *data, int width, int height, size_t dataSize, int level, int layerIndex) override |
| Update a two-dimensional texture image in a compressed format. | |
| void | updateSubData (int xoffset, int yoffset, int width, int height, int level, const void *data, int layerIndex) override |
| Update a two-dimensional texture subimage. | |
| void | updateCompressedSubData (int xoffset, int yoffset, int width, int height, size_t dataSize, int level, const void *data, int layerIndex) override |
| Update a two-dimensional texture subimage in a compressed format. | |
| void | updateFaceData (TextureCubeFace side, const void *data) override |
| Update texutre cube data in give slice side. | |
| void | updateSamplerDesc (const SamplerDesc &sampler) override |
| Update sampler. | |
| void | generateMipmaps () |
| Generate mipmaps. | |
| void | updateTextureDesc (const TextureDesc &descriptor) override |
| Update texture description. | |
| GLuint | internalHandle () const |
| Get internal texture object handle. | |
| void | apply (int slot) const |
| Set texture to pipeline. | |
| void | ensureLevelStorage (int level) |
| Allocate GPU storage for a specific mipmap level of a texture array. | |
| Public Member Functions inherited from Texture | |
| PixelFormat | getPixelFormat () const |
| Get texture format. | |
| TextureUsage | getTextureUsage () const |
| Get texture usage. | |
| TextureType | getTextureType () const |
| Get texture type. | |
| bool | hasMipmaps () const |
| Check if mipmap had generated before. | |
| void | zeroTexData () |
| clear texture data to zero. | |
| Public Member Functions inherited from Object | |
| void | retain () |
| Retains the ownership. | |
| void | release () |
| Releases the ownership immediately. | |
| Object * | autorelease () |
| Releases the ownership sometime soon automatically. | |
| unsigned int | getReferenceCount () const |
| Returns the Object's current reference count. | |
| uint64_t | getObjectID () const noexcept |
| Returns the process-local diagnostic identifier assigned at construction. | |
| virtual | ~Object () |
| Destructor. | |
The texture implementation supports 2D, cubemap, and 2D array textures.
| TextureImpl | ( | const TextureDesc & | desc | ) |
| desc | Specifies the texture description. |
| TextureImpl | ( | GLuint | texture, |
| uint32_t | width, | ||
| uint32_t | height ) |
Wraps an existing OpenGL texture object.
The caller retains ownership; this instance will not delete the texture on destruction.
| texture | The native GL texture handle. |
| width | Width of the texture in pixels. |
| height | Height of the texture in pixels. |
|
overridevirtual |
Update a two-dimensional texture image.
| data | Specifies a pointer to the image data in memory. |
| width | Specifies the width of the texture image. |
| height | Specifies the height of the texture image. |
| level | Specifies the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap |
| layerIndex | Specifies the layer index for 2D array textures. reduction image. |
Implements Texture.
|
overridevirtual |
Update a two-dimensional texture image in a compressed format.
| data | Specifies a pointer to the compressed image data in memory. |
| width | Specifies the width of the texture image. |
| height | Specifies the height of the texture image. |
| dataSize | Specifies the totoal size of compressed image in bytes. |
| level | Specifies the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image. |
| layerIndex | Specifies the layer index for 2D array textures. |
Implements Texture.
|
overridevirtual |
Update a two-dimensional texture subimage.
| xoffset | Specifies a texel offset in the x direction within the texture array. |
| yoffset | Specifies a texel offset in the y direction within the texture array. |
| width | Specifies the width of the texture subimage. |
| height | Specifies the height of the texture subimage. |
| level | Specifies the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image. |
| data | Specifies a pointer to the image data in memory. |
| layerIndex | Specifies the layer index for 2D array textures. |
Implements Texture.
|
overridevirtual |
Update a two-dimensional texture subimage in a compressed format.
| xoffset | Specifies a texel offset in the x direction within the texture array. |
| yoffset | Specifies a texel offset in the y direction within the texture array. |
| width | Specifies the width of the texture subimage. |
| height | Specifies the height of the texture subimage. |
| dataSize | Specifies the totoal size of compressed subimage in bytes. |
| level | Specifies the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image. |
| data | Specifies a pointer to the compressed image data in memory. |
| layerIndex | Specifies the layer index for 2D array textures. |
Implements Texture.
|
overridevirtual |
Update texutre cube data in give slice side.
| side | Specifies which slice texture of cube to be update. |
| data | Specifies a pointer to the image data in memory. |
Implements Texture.
|
overridevirtual |
|
overridevirtual |
Update texture description.
| descriptor | Specifies texture and sampler descriptor. |
Reimplemented from Texture.
|
inline |
Get internal texture object handle.
| void apply | ( | int | slot | ) | const |
Set texture to pipeline.
| index | Specifies the texture image unit selector. |
| target | GL_TEXTURE_2D or GL_TEXTURE_CUBE_MAP |
| void ensureLevelStorage | ( | int | level | ) |
Allocate GPU storage for a specific mipmap level of a texture array.
Ensures that the given mipmap level has valid storage before updating with glTexSubImage3D, preventing GL_INVALID_OPERATION (0x502).
| level | Mipmap level index to allocate. |