|
Castor3D
..
|
Texture unit representation. More...
Inheritance diagram for Castor3D::TextureUnit:
Collaboration diagram for Castor3D::TextureUnit:Classes | |
| class | BinaryParser |
| TextureUnit loader. More... | |
| class | TextLoader |
| TextureUnit loader. More... | |
Public Member Functions | |
| C3D_API | TextureUnit (Engine &p_engine) |
| Constructor. More... | |
| C3D_API | ~TextureUnit () |
| Destructor. More... | |
| C3D_API void | Initialise () |
| Initialises the texture, id est : fills the image buffer, creates the texture in the render system. More... | |
| C3D_API void | Cleanup () |
| Cleans up the texture. More... | |
| C3D_API void | SetTexture (TextureSPtr p_texture) |
| Sets the texture. More... | |
| C3D_API void | Bind () const |
| Applies the texture unit. More... | |
| C3D_API void | Unbind () const |
| Removes the texture unit from the stack, in order not to interfere with other ones. More... | |
| C3D_API void | UploadImage (bool p_bSync) |
| Uploads current image to the GPU. More... | |
| C3D_API void | DownloadImage (bool p_bSync) |
| Downloads the current image from the GPU. More... | |
| C3D_API bool | LoadTexture (Castor::Path const &p_pathFile) |
| Loads the texture image from the given path. More... | |
| C3D_API eTEXTURE_TYPE | GetType () const |
| Retrieves the texture dimension. More... | |
| C3D_API eTEXTURE_MAP_MODE | GetMappingMode () const |
| Retrieves the texture mapping mode. More... | |
| C3D_API void | SetMappingMode (eTEXTURE_MAP_MODE p_mode) |
| Defines the texture mapping mode. More... | |
| C3D_API uint8_t const * | GetImageBuffer () const |
| Retrieves the texture image buffer. More... | |
| C3D_API uint8_t * | GetImageBuffer () |
| Retrieves the texture image buffer. More... | |
| C3D_API Castor::PxBufferBaseSPtr const | GetImagePixels () const |
| Retrieves the texture image pixels. More... | |
| C3D_API Castor::PxBufferBaseSPtr | GetImagePixels () |
| Retrieves the texture image pixels. More... | |
| C3D_API uint32_t | GetImageSize () const |
| Retrieves the texture image size (in bytes) More... | |
| C3D_API uint32_t | GetWidth () const |
| Retrieves the texture image width. More... | |
| C3D_API uint32_t | GetHeight () const |
| Retrieves the texture image height. More... | |
| C3D_API Castor::ePIXEL_FORMAT | GetPixelFormat () const |
| Retrieves the texture image pixel format. More... | |
| C3D_API bool | IsTextureInitialised () const |
| Retrieves the texture initalisation status. More... | |
| const Castor::Path & | GetTexturePath () const |
| Retrieves the texture file path. More... | |
| Castor3D::TextureSPtr | GetTexture () const |
| Retrieves the texture. More... | |
| Castor3D::eALPHA_BLEND_FUNC | GetAlpFunction () const |
| Retrieves the alpha blending function. More... | |
| void | SetAlpFunction (Castor3D::eALPHA_BLEND_FUNC p_func) |
| Sets the alpha blending function. More... | |
| Castor3D::eRGB_BLEND_FUNC | GetRgbFunction () const |
| Retrieves RGB blending function. More... | |
| void | SetRgbFunction (Castor3D::eRGB_BLEND_FUNC p_func) |
| Sets RGB blending function. More... | |
| Castor3D::eALPHA_FUNC | GetAlphaFunc () const |
| Retrieves the alpha function. More... | |
| void | SetAlphaFunc (Castor3D::eALPHA_FUNC p_func) |
| Sets the alpha function. More... | |
| float | GetAlphaValue () const |
| Retrieves the alpha reference value. More... | |
| void | SetAlphaValue (float p_fAlpha) |
| Sets the alpha reference value. More... | |
| Castor3D::eTEXTURE_CHANNEL | GetChannel () const |
| Retrieves the texture channel. More... | |
| void | SetChannel (Castor3D::eTEXTURE_CHANNEL p_channel) |
| Sets the texture channel. More... | |
| uint32_t | GetIndex () const |
| Retrieves the unit index. More... | |
| void | SetIndex (uint32_t p_index) |
| Sets the unit index. More... | |
| const Castor::Colour & | GetBlendColour () const |
| Retrieves the blend colour. More... | |
| void | SetBlendColour (const Castor::Colour &p_clrBlend) |
| Sets the blend colour. More... | |
| void | SetRenderTarget (RenderTargetSPtr p_pTarget) |
| Sets the target holding the texture. More... | |
| void | SetSampler (SamplerSPtr p_pSampler) |
| Defines the texture sampler. More... | |
| SamplerSPtr | GetSampler () const |
| Retrieves the texture sampler. More... | |
| eBLEND_SOURCE | GetRgbArgument (eBLEND_SRC_INDEX p_index) const |
| Retrieves the RGB blend parameter. More... | |
| void | SetRgbArgument (eBLEND_SRC_INDEX p_index, eBLEND_SOURCE p_value) |
| Sets the RGB blend parameter. More... | |
| eBLEND_SOURCE | GetAlpArgument (eBLEND_SRC_INDEX p_index) const |
| Retrieves the Alpha blend parameter. More... | |
| void | SetAlpArgument (eBLEND_SRC_INDEX p_index, eBLEND_SOURCE p_value) |
| Sets the Alpha blend parameter. More... | |
| bool | IsTextured () const |
| Tells if the unit has a texture. More... | |
| void | SetAutoMipmaps (bool p_value) |
| Sets the auto mipmaps generation status. More... | |
| bool | GetAutoMipmaps () const |
| Retrieves the auto mipmaps generation status. More... | |
| RenderTargetSPtr | GetRenderTarget () const |
| Retrieves the render target. More... | |
Friends | |
| class | TextureRenderer |
Texture unit representation.
| C3D_API Castor3D::TextureUnit::TextureUnit | ( | Engine & | p_engine | ) |
Constructor.
| p_engine | The Engine |
| C3D_API Castor3D::TextureUnit::~TextureUnit | ( | ) |
Destructor.
| C3D_API void Castor3D::TextureUnit::Bind | ( | ) | const |
Applies the texture unit.
| C3D_API void Castor3D::TextureUnit::Cleanup | ( | ) |
Cleans up the texture.
| C3D_API void Castor3D::TextureUnit::DownloadImage | ( | bool | p_bSync | ) |
Downloads the current image from the GPU.
| [in] | p_bSync | Tells if the download must be synchronous or not |
|
inline |
Retrieves the Alpha blend parameter.
| [in] | p_index | The parameter index |
|
inline |
Retrieves the alpha blending function.
|
inline |
Retrieves the alpha function.
|
inline |
Retrieves the alpha reference value.
|
inline |
Retrieves the auto mipmaps generation status.
|
inline |
Retrieves the blend colour.
|
inline |
Retrieves the texture channel.
| C3D_API uint32_t Castor3D::TextureUnit::GetHeight | ( | ) | const |
Retrieves the texture image height.
| C3D_API uint8_t const* Castor3D::TextureUnit::GetImageBuffer | ( | ) | const |
Retrieves the texture image buffer.
| C3D_API uint8_t* Castor3D::TextureUnit::GetImageBuffer | ( | ) |
Retrieves the texture image buffer.
| C3D_API Castor::PxBufferBaseSPtr const Castor3D::TextureUnit::GetImagePixels | ( | ) | const |
Retrieves the texture image pixels.
| C3D_API Castor::PxBufferBaseSPtr Castor3D::TextureUnit::GetImagePixels | ( | ) |
Retrieves the texture image pixels.
| C3D_API uint32_t Castor3D::TextureUnit::GetImageSize | ( | ) | const |
Retrieves the texture image size (in bytes)
|
inline |
Retrieves the unit index.
| C3D_API eTEXTURE_MAP_MODE Castor3D::TextureUnit::GetMappingMode | ( | ) | const |
Retrieves the texture mapping mode.
| C3D_API Castor::ePIXEL_FORMAT Castor3D::TextureUnit::GetPixelFormat | ( | ) | const |
Retrieves the texture image pixel format.
|
inline |
Retrieves the render target.
|
inline |
Retrieves the RGB blend parameter.
| [in] | p_index | The parameter index |
|
inline |
Retrieves RGB blending function.
|
inline |
Retrieves the texture sampler.
|
inline |
Retrieves the texture.
|
inline |
Retrieves the texture file path.
| C3D_API eTEXTURE_TYPE Castor3D::TextureUnit::GetType | ( | ) | const |
Retrieves the texture dimension.
| C3D_API uint32_t Castor3D::TextureUnit::GetWidth | ( | ) | const |
Retrieves the texture image width.
| C3D_API void Castor3D::TextureUnit::Initialise | ( | ) |
Initialises the texture, id est : fills the image buffer, creates the texture in the render system.
|
inline |
Tells if the unit has a texture.
false if the texture is null | C3D_API bool Castor3D::TextureUnit::IsTextureInitialised | ( | ) | const |
Retrieves the texture initalisation status.
false if the texture is null or uninitialised | C3D_API bool Castor3D::TextureUnit::LoadTexture | ( | Castor::Path const & | p_pathFile | ) |
Loads the texture image from the given path.
| [in] | p_pathFile | The image file path |
false if any problem occured
|
inline |
Sets the Alpha blend parameter.
| [in] | p_index | The parameter index |
| [in] | p_value | The new value |
|
inline |
Sets the alpha blending function.
| [in] | p_func | The new value |
|
inline |
Sets the alpha function.
| [in] | p_func | The new value |
|
inline |
Sets the alpha reference value.
| [in] | p_fAlpha | The new value |
|
inline |
Sets the auto mipmaps generation status.
| [in] | p_value | The new value |
|
inline |
Sets the blend colour.
| [in] | p_clrBlend | The new value |
|
inline |
Sets the texture channel.
| [in] | p_channel | The new value |
|
inline |
Sets the unit index.
| [in] | p_index | The new value |
| C3D_API void Castor3D::TextureUnit::SetMappingMode | ( | eTEXTURE_MAP_MODE | p_mode | ) |
Defines the texture mapping mode.
| [in] | p_mode | The texture mapping mode |
|
inline |
Sets the target holding the texture.
| [in] | p_pTarget | The new value |
|
inline |
Sets the RGB blend parameter.
| [in] | p_index | The parameter index |
| [in] | p_value | The new value |
|
inline |
Sets RGB blending function.
| [in] | p_func | The new value |
|
inline |
Defines the texture sampler.
| [in] | p_pSampler | The sampler |
| C3D_API void Castor3D::TextureUnit::SetTexture | ( | TextureSPtr | p_texture | ) |
Sets the texture.
| [in] | p_texture | The texture |
| C3D_API void Castor3D::TextureUnit::Unbind | ( | ) | const |
Removes the texture unit from the stack, in order not to interfere with other ones.
| C3D_API void Castor3D::TextureUnit::UploadImage | ( | bool | p_bSync | ) |
Uploads current image to the GPU.
| [in] | p_bSync | Tells if the upload must be synchronous or not |
|
friend |
1.8.15