Module glium::texture
[−]
[src]
A texture is an image loaded in video memory, which can be sampled in your shaders.
Textures come in ten different dimensions:
- Textures with one dimension.
- Textures with two dimensions.
- Textures with two dimensions and multisampling enabled.
- Textures with three dimensions.
- Cube textures, which are arrays of six two-dimensional textures corresponding to the six faces of a cube.
- Arrays of one-dimensional textures.
- Arrays of two-dimensional textures.
- Arrays of two-dimensional textures with multisampling enabled.
- Arrays of cube textures.
- Buffer textures, which are one-dimensional textures that are mapped to a buffer.
In addition to this, there are six kinds of texture formats:
- The texture contains floating-point data,
with either the
Compressedprefix or no prefix at all. - The texture contains signed integers, with the
Integralprefix. - The texture contains unsigned integers, with the
Unsignedprefix. - The texture contains depth information, with the
Depthprefix. - The texture contains stencil information, with the
Stencilprefix. - The texture contains depth and stencil information, with the
DepthStencilprefix.
Each combination of dimensions and format corresponds to a sampler type in GLSL. For example,
an IntegralTexture3d can only be bound to an isampler3D uniform in GLSL. Some combinations
don't exist, like DepthBufferTexture.
The difference between compressed textures and uncompressed textures is that you can't do render-to-texture on the former.
The most common types of textures are CompressedTexture2d and Texture2d (the two dimensions
being the width and height). These are what you will use most of the time.
Structs
| BindlessTexturesNotSupportedError |
Bindless textures are not supported. |
| CompressedSrgbTexture1d |
A compressed one-dimensional texture containing sRGB floating-point data. |
| CompressedSrgbTexture1dArray |
An array of compressed one-dimensional textures containing sRGB floating-point data. |
| CompressedSrgbTexture1dArrayLayer |
Represents a single layer of a |
| CompressedSrgbTexture1dArrayMipmap |
Represents a single mipmap level of a |
| CompressedSrgbTexture1dMipmap |
Represents a single mipmap level of a |
| CompressedSrgbTexture2d |
A compressed two-dimensional texture containing sRGB floating-point data. |
| CompressedSrgbTexture2dArray |
An array of compressed two-dimensional textures containing sRGB floating-point data. |
| CompressedSrgbTexture2dArrayLayer |
Represents a single layer of a |
| CompressedSrgbTexture2dArrayMipmap |
Represents a single mipmap level of a |
| CompressedSrgbTexture2dMipmap |
Represents a single mipmap level of a |
| CompressedSrgbTexture3d |
A compressed three-dimensional texture containing sRGB floating-point data. |
| CompressedSrgbTexture3dMipmap |
Represents a single mipmap level of a |
| CompressedTexture1d |
A compressed one-dimensional texture containing floating-point data. |
| CompressedTexture1dArray |
An array of compressed one-dimensional textures containing floating-point data. |
| CompressedTexture1dArrayLayer |
Represents a single layer of a |
| CompressedTexture1dArrayMipmap |
Represents a single mipmap level of a |
| CompressedTexture1dMipmap |
Represents a single mipmap level of a |
| CompressedTexture2d |
A compressed two-dimensional texture containing floating-point data. |
| CompressedTexture2dArray |
An array of compressed two-dimensional textures containing floating-point data. |
| CompressedTexture2dArrayLayer |
Represents a single layer of a |
| CompressedTexture2dArrayMipmap |
Represents a single mipmap level of a |
| CompressedTexture2dMipmap |
Represents a single mipmap level of a |
| CompressedTexture3d |
A compressed three-dimensional texture containing floating-point data. |
| CompressedTexture3dMipmap |
Represents a single mipmap level of a |
| DepthStencilTexture1d |
A one-dimensional texture containing both depth and stencil data. |
| DepthStencilTexture1dArray |
An array of one-dimensional textures containing both depth and stencil data. |
| DepthStencilTexture1dArrayLayer |
Represents a single layer of a |
| DepthStencilTexture1dArrayMipmap |
Represents a single mipmap level of a |
| DepthStencilTexture1dMipmap |
Represents a single mipmap level of a |
| DepthStencilTexture2d |
A two-dimensional texture containing both depth and stencil data. |
| DepthStencilTexture2dArray |
An array of two-dimensional textures containing both depth and stencil data. |
| DepthStencilTexture2dArrayLayer |
Represents a single layer of a |
| DepthStencilTexture2dArrayMipmap |
Represents a single mipmap level of a |
| DepthStencilTexture2dMipmap |
Represents a single mipmap level of a |
| DepthStencilTexture2dMultisample |
A two-dimensional texture containing both depth and stencil data. |
| DepthStencilTexture2dMultisampleArray |
An array of two-dimensional textures containing both depth and stencil data. |
| DepthStencilTexture2dMultisampleArrayMipmap |
Represents a single mipmap level of a |
| DepthStencilTexture2dMultisampleMipmap |
Represents a single mipmap level of a |
| DepthStencilTexture3d |
A three-dimensional texture containing both depth and stencil data. |
| DepthStencilTexture3dMipmap |
Represents a single mipmap level of a |
| DepthTexture1d |
A one-dimensional texture containing depth data. |
| DepthTexture1dArray |
An array of one-dimensional textures containing depth data. |
| DepthTexture1dArrayLayer |
Represents a single layer of a |
| DepthTexture1dArrayMipmap |
Represents a single mipmap level of a |
| DepthTexture1dMipmap |
Represents a single mipmap level of a |
| DepthTexture2d |
A two-dimensional texture containing depth data. |
| DepthTexture2dArray |
An array of two-dimensional textures containing depth data. |
| DepthTexture2dArrayLayer |
Represents a single layer of a |
| DepthTexture2dArrayMipmap |
Represents a single mipmap level of a |
| DepthTexture2dMipmap |
Represents a single mipmap level of a |
| DepthTexture2dMultisample |
A two-dimensional texture containing depth data. |
| DepthTexture2dMultisampleArray |
An array of two-dimensional textures containing depth data. |
| DepthTexture2dMultisampleArrayMipmap |
Represents a single mipmap level of a |
| DepthTexture2dMultisampleMipmap |
Represents a single mipmap level of a |
| DepthTexture3d |
A three-dimensional texture containing depth data. |
| DepthTexture3dMipmap |
Represents a single mipmap level of a |
| IntegralTexture1d |
A one-dimensional texture containing signed integral data. |
| IntegralTexture1dArray |
An array of one-dimensional textures containing signed integral data. |
| IntegralTexture1dArrayLayer |
Represents a single layer of a |
| IntegralTexture1dArrayMipmap |
Represents a single mipmap level of a |
| IntegralTexture1dMipmap |
Represents a single mipmap level of a |
| IntegralTexture2d |
A two-dimensional texture containing signed integral data. |
| IntegralTexture2dArray |
An array of two-dimensional textures containing signed integral data. |
| IntegralTexture2dArrayLayer |
Represents a single layer of a |
| IntegralTexture2dArrayMipmap |
Represents a single mipmap level of a |
| IntegralTexture2dMipmap |
Represents a single mipmap level of a |
| IntegralTexture2dMultisample |
A two-dimensional texture containing signed integral data. |
| IntegralTexture2dMultisampleArray |
An array of two-dimensional textures containing signed integral data. |
| IntegralTexture2dMultisampleArrayMipmap |
Represents a single mipmap level of a |
| IntegralTexture2dMultisampleMipmap |
Represents a single mipmap level of a |
| IntegralTexture3d |
A three-dimensional texture containing signed integral data. |
| IntegralTexture3dMipmap |
Represents a single mipmap level of a |
| RawImage1d |
Represents raw data for a two-dimensional image. |
| RawImage2d |
Represents raw data for a two-dimensional image. |
| RawImage3d |
Represents raw data for a two-dimensional image. |
| ResidentTexture |
A texture that is resident in video memory. This allows you to use bindless textures in your shaders. |
| SrgbTexture1d |
A one-dimensional texture containing sRGB floating-point data. |
| SrgbTexture1dArray |
An array of one-dimensional textures containing sRGB floating-point data. |
| SrgbTexture1dArrayLayer |
Represents a single layer of a |
| SrgbTexture1dArrayMipmap |
Represents a single mipmap level of a |
| SrgbTexture1dMipmap |
Represents a single mipmap level of a |
| SrgbTexture2d |
A two-dimensional texture containing sRGB floating-point data. |
| SrgbTexture2dArray |
An array of two-dimensional textures containing sRGB floating-point data. |
| SrgbTexture2dArrayLayer |
Represents a single layer of a |
| SrgbTexture2dArrayMipmap |
Represents a single mipmap level of a |
| SrgbTexture2dMipmap |
Represents a single mipmap level of a |
| SrgbTexture2dMultisample |
A two-dimensional texture containing sRGB floating-point data. |
| SrgbTexture2dMultisampleArray |
An array of two-dimensional textures containing sRGB floating-point data. |
| SrgbTexture2dMultisampleArrayMipmap |
Represents a single mipmap level of a |
| SrgbTexture2dMultisampleMipmap |
Represents a single mipmap level of a |
| SrgbTexture3d |
A three-dimensional texture containing sRGB floating-point data. |
| SrgbTexture3dMipmap |
Represents a single mipmap level of a |
| StencilTexture1d |
A one-dimensional texture containing stencil data. |
| StencilTexture1dArray |
An array of one-dimensional textures containing stencil data. |
| StencilTexture1dArrayLayer |
Represents a single layer of a |
| StencilTexture1dArrayMipmap |
Represents a single mipmap level of a |
| StencilTexture1dMipmap |
Represents a single mipmap level of a |
| StencilTexture2d |
A two-dimensional texture containing stencil data. |
| StencilTexture2dArray |
An array of two-dimensional textures containing stencil data. |
| StencilTexture2dArrayLayer |
Represents a single layer of a |
| StencilTexture2dArrayMipmap |
Represents a single mipmap level of a |
| StencilTexture2dMipmap |
Represents a single mipmap level of a |
| StencilTexture2dMultisample |
A two-dimensional texture containing stencil data. |
| StencilTexture2dMultisampleArray |
An array of two-dimensional textures containing stencil data. |
| StencilTexture2dMultisampleArrayMipmap |
Represents a single mipmap level of a |
| StencilTexture2dMultisampleMipmap |
Represents a single mipmap level of a |
| StencilTexture3d |
A three-dimensional texture containing stencil data. |
| StencilTexture3dMipmap |
Represents a single mipmap level of a |
| Texture1d |
A one-dimensional texture containing floating-point data. |
| Texture1dArray |
An array of one-dimensional textures containing floating-point data. |
| Texture1dArrayLayer |
Represents a single layer of a |
| Texture1dArrayMipmap |
Represents a single mipmap level of a |
| Texture1dMipmap |
Represents a single mipmap level of a |
| Texture2d |
A two-dimensional texture containing floating-point data. |
| Texture2dArray |
An array of two-dimensional textures containing floating-point data. |
| Texture2dArrayLayer |
Represents a single layer of a |
| Texture2dArrayMipmap |
Represents a single mipmap level of a |
| Texture2dMipmap |
Represents a single mipmap level of a |
| Texture2dMultisample |
A two-dimensional texture containing floating-point data. |
| Texture2dMultisampleArray |
An array of two-dimensional textures containing floating-point data. |
| Texture2dMultisampleArrayMipmap |
Represents a single mipmap level of a |
| Texture2dMultisampleMipmap |
Represents a single mipmap level of a |
| Texture3d |
A three-dimensional texture containing floating-point data. |
| Texture3dMipmap |
Represents a single mipmap level of a |
| TextureAny |
A texture whose type isn't fixed at compile-time. |
| TextureAnyMipmap |
Represents a specific mipmap of a texture. |
| TextureHandle |
Handle to a texture. |
| UnsignedTexture1d |
A one-dimensional texture containing unsigned integral data. |
| UnsignedTexture1dArray |
An array of one-dimensional textures containing unsigned integral data. |
| UnsignedTexture1dArrayLayer |
Represents a single layer of a |
| UnsignedTexture1dArrayMipmap |
Represents a single mipmap level of a |
| UnsignedTexture1dMipmap |
Represents a single mipmap level of a |
| UnsignedTexture2d |
A two-dimensional texture containing unsigned integral data. |
| UnsignedTexture2dArray |
An array of two-dimensional textures containing unsigned integral data. |
| UnsignedTexture2dArrayLayer |
Represents a single layer of a |
| UnsignedTexture2dArrayMipmap |
Represents a single mipmap level of a |
| UnsignedTexture2dMipmap |
Represents a single mipmap level of a |
| UnsignedTexture2dMultisample |
A two-dimensional texture containing unsigned integral data. |
| UnsignedTexture2dMultisampleArray |
An array of two-dimensional textures containing unsigned integral data. |
| UnsignedTexture2dMultisampleArrayMipmap |
Represents a single mipmap level of a |
| UnsignedTexture2dMultisampleMipmap |
Represents a single mipmap level of a |
| UnsignedTexture3d |
A three-dimensional texture containing unsigned integral data. |
| UnsignedTexture3dMipmap |
Represents a single mipmap level of a |
Enums
| ClientFormat |
List of client-side pixel formats. |
| CompressedFormat |
List of compressed texture formats. |
| CompressedMipmapsOption |
Describes what to do about mipmaps during compressed texture creation. |
| CompressedSrgbFormat |
List of compressed pixel formats in the sRGB color space. |
| DepthFormat |
List of formats available for depth textures. |
| DepthStencilFormat |
List of formats available for depth-stencil textures. |
| Dimensions |
Type of a texture. |
| GetFormatError |
Error that can happen when retrieving the internal format of a texture. |
| InternalFormat |
Internal format of a texture. |
| InternalFormatType |
Format of a component of an internal format. |
| MipmapsOption |
Describes what to do about mipmaps during texture creation. |
| SrgbFormat |
List of uncompressed pixel formats that contain floating-point data in the sRGB color space. |
| StencilFormat |
List of formats available for stencil textures. |
| TextureCreationError |
Error that can happen when creating a texture. |
| TextureFormat |
Format of the internal representation of a texture. |
| UncompressedFloatFormat |
List of uncompressed pixel formats that contain floating-point-like data. |
| UncompressedIntFormat |
List of uncompressed pixel formats that contain signed integral data. |
| UncompressedUintFormat |
List of uncompressed pixel formats that contain unsigned integral data. |
Traits
| PixelValue |
A trait that must be implemented for any type that can represent the value of a pixel. |
| Texture |
Trait that describes a texture. |
| Texture1dDataSink |
Trait that describes types that can be built from one-dimensional texture data. |
| Texture1dDataSource |
Trait that describes data for a one-dimensional texture. |
| Texture2dDataSink |
Trait that describes types that can be built from two-dimensional texture data. |
| Texture2dDataSource |
Trait that describes data for a two-dimensional texture. |
| Texture3dDataSink |
Trait that describes types that can be built from one-dimensional texture data. |
| Texture3dDataSource |
Trait that describes data for a two-dimensional texture. |