|
The Vish Visualization Shell 0.3
Vish
|
Enum for the storage type of the texture, which will affect memory utilization on the GPU. More...
#include <ocean/Anemonia/RenderBasin.hpp>
Public Types | |
| enum | BitPrecision { Unspecified , Bit4 , Bit5 , Bit8 , Bit12 , Bit16 , Bit32 , HalfFloat , Float , Double } |
| The numerical precision of the texture. More... | |
| enum | ColorMode { None =0 , R , RG , RGB , RGBA , DEPTH , Automatic } |
| Options for color channels in the texture. More... | |
Public Member Functions | |
| bool | isIntensityTexture () const |
| Check if this is supposed to be an intensity texture. | |
| std::string | str () const |
| Create a description for this texture storage format. | |
| TextureStorageFormat (bool doAlpha=false, ColorMode theColors=None, BitPrecision theAlphaBits=Unspecified, BitPrecision theColorBits=Unspecified, bool doCompression=true) | |
| Construct a texture storage format. | |
Public Attributes | |
| unsigned | Alpha:1 |
| Include alpha channel (boolean) | |
| BitPrecision | AlphaBits:4 |
| Numerical precision for alpha channel. | |
| BitPrecision | ColorBits:4 |
| Numerical precision for color channel. | |
| ColorMode | Colors:3 |
| How many color channels to include. | |
| unsigned | Compressed:1 |
| Enable Texture compression, if possible for the specified precision. | |
| unsigned | Integer:1 |
| This is an integer texture, corresponding to a isampler2D or usampler2D in the shader code. | |
| unsigned | Normalized:1 |
| The texture is a floating point value that is normalized to the range [0,1] or [-1,1]. | |
| int | OpenGLTextureType |
| Allowing to override the bitwise specification by giving an OpenGL enum. | |
| unsigned | Signed:1 |
| The texture values might be negative. | |
Enum for the storage type of the texture, which will affect memory utilization on the GPU.
OpenGL specifies a set of texture storage options such as described at http://www.opengl.org/wiki/Image_Format and http://www.opengl.org/registry/specs/ARB/texture_compression.txt
This class tries to match these using a some bit structure clarifying the requestable properties. Not all texture storage format are available through this API, but since the driver implementation is free to chose another storage anyway this might not be of much relevance in practice. Specifying a specific storage layout is anticipated to be easier using this structure.
The intensity texture format replicates the single intensity component value in the red, green, blue, and alpha channels.
| Wizt::RenderBasin::TextureStorageFormat::TextureStorageFormat | ( | bool | doAlpha = false, |
| ColorMode | theColors = None, |
||
| BitPrecision | theAlphaBits = Unspecified, |
||
| BitPrecision | theColorBits = Unspecified, |
||
| bool | doCompression = true |
||
| ) |
Construct a texture storage format.
Note that if both Alpha is false and Colors is set to None, then this texture is interpreted as an Intensity texture which has all four channels set from the same one storage value.
See also isIntensityTexture()
| unsigned Wizt::RenderBasin::TextureStorageFormat::Compressed |
Enable Texture compression, if possible for the specified precision.
http://www.opengl.org/registry/specs/ARB/texture_compression.txt