|
Castor3D
..
|
Inheritance diagram for Castor3D::Texture:
Collaboration diagram for Castor3D::Texture:Public Member Functions | |
| C3D_API | Texture (eTEXTURE_BASE_TYPE p_type, RenderSystem &p_renderSystem, uint8_t p_cpuAccess, uint8_t p_gpuAccess) |
| Constructor. More... | |
| virtual C3D_API | ~Texture () |
| Destructor. More... | |
| C3D_API void | SetImage (Castor::PxBufferBaseSPtr p_buffer) |
| Defines the texture buffer. More... | |
| C3D_API bool | Bind (uint32_t p_index) const |
| Activation function, to tell the GPU it is active. More... | |
| C3D_API void | Unbind (uint32_t p_index) const |
| Deactivation function, to tell the GPU it is inactive. More... | |
| virtual C3D_API bool | Create ()=0 |
| Creation function. More... | |
| virtual C3D_API void | Destroy ()=0 |
| Destruction function. More... | |
| virtual C3D_API bool | Initialise ()=0 |
| Initialisation function. More... | |
| virtual C3D_API void | Cleanup ()=0 |
| Cleanup function. More... | |
| virtual C3D_API uint8_t * | Lock (uint32_t p_lock)=0 |
| Locks image buffer from GPU, allowing modifications into it. More... | |
| virtual C3D_API void | Unlock (bool p_modified)=0 |
| Unlocks image buffer from GPU. More... | |
| virtual C3D_API void | GenerateMipmaps () const =0 |
| Generate texture mipmaps. More... | |
| bool | IsInitialised () const |
| Retrieves the initialisation status. More... | |
| eTEXTURE_BASE_TYPE | GetBaseType () const |
| Retrieves the texture type. More... | |
| eTEXTURE_TYPE | GetType () const |
| Retrieves the texture dimension. More... | |
| void | SetType (eTEXTURE_TYPE p_dimension) |
| Defines the texture dimension. More... | |
| eTEXTURE_MAP_MODE | GetMappingMode () const |
| Retrieves the texture mapping mode. More... | |
| void | SetMappingMode (eTEXTURE_MAP_MODE p_eMapMode) |
| Defines the texture mapping mode. More... | |
| Castor::Size | GetDimensions () const |
| Retrieves the texture image dimensions. More... | |
| uint32_t | GetDepth () const |
| Retrieves the texture depth. More... | |
| Castor::ePIXEL_FORMAT | GetPixelFormat () const |
| Retrieves the texture pixel format. More... | |
| uint32_t | GetWidth () const |
| Retrieves the texture image width. More... | |
| uint32_t | GetHeight () const |
| Retrieves the texture image height. More... | |
| Castor::PxBufferBaseSPtr | GetBuffer () const |
| Retrieves the texture buffer. More... | |
Protected Member Functions | |
| virtual C3D_API bool | DoInitialise ()=0 |
| API specific initialisation function. More... | |
| virtual C3D_API bool | DoBind (uint32_t p_index) const =0 |
| API specific binding function. More... | |
| virtual C3D_API void | DoUnbind (uint32_t p_index) const =0 |
| API specific unbinding function. More... | |
| DECLARE_VECTOR (Castor::PxBufferBaseSPtr, PxBuffer) | |
Protected Attributes | |
| bool | m_initialised |
| Initialisation status. More... | |
| eTEXTURE_BASE_TYPE | m_baseType |
| Texture base type. More... | |
| eTEXTURE_TYPE | m_type |
| Texture type. More... | |
| eTEXTURE_MAP_MODE | m_mapMode |
| Texture mapping modes. More... | |
| uint32_t | m_depth |
| 3D Texture depth More... | |
| Castor::PxBufferBaseSPtr | m_pixelBuffer |
| Texture pixels, at least at initialisation. More... | |
| Castor::ePIXEL_FORMAT | m_pixelFormat |
| The pixel buffer format. More... | |
| Castor::Size | m_size |
| The pixel buffer dimensions. More... | |
| uint8_t | m_cpuAccess |
| The required CPU access (combination of eACCESS_TYPE). More... | |
| uint8_t | m_gpuAccess |
| The required GPU access (combination of eACCESS_TYPE). More... | |
Texture base class.
| C3D_API Castor3D::Texture::Texture | ( | eTEXTURE_BASE_TYPE | p_type, |
| RenderSystem & | p_renderSystem, | ||
| uint8_t | p_cpuAccess, | ||
| uint8_t | p_gpuAccess | ||
| ) |
Constructor.
| [in] | p_type | The texture type. |
| [in] | p_renderSystem | The render system. |
| [in] | p_cpuAccess | The required CPU access (combination of eACCESS_TYPE). |
| [in] | p_gpuAccess | The required GPU access (combination of eACCESS_TYPE). |
|
virtual |
Destructor.
| C3D_API bool Castor3D::Texture::Bind | ( | uint32_t | p_index | ) | const |
Activation function, to tell the GPU it is active.
| [in] | p_index | The texture index |
true if successful
|
pure virtual |
Cleanup function.
Implemented in Castor3D::StaticTexture, and Castor3D::DynamicTexture.
|
pure virtual |
Creation function.
true if OK
|
protected |
|
pure virtual |
Destruction function.
|
protectedpure virtual |
API specific binding function.
if OK
|
protectedpure virtual |
API specific initialisation function.
true if OK.
|
protectedpure virtual |
API specific unbinding function.
|
pure virtual |
Generate texture mipmaps.
|
inline |
|
inline |
|
inline |
|
inline |
Retrieves the texture image dimensions.
References GetHeight(), and GetWidth().
Here is the call graph for this function:
|
inline |
Retrieves the texture image height.
References m_depth, m_pixelBuffer, and m_size.
Referenced by GetDimensions().
Here is the caller graph for this function:
|
inline |
|
inline |
Retrieves the texture pixel format.
References m_pixelBuffer, and m_pixelFormat.
|
inline |
|
inline |
Retrieves the texture image width.
References m_pixelBuffer, and m_size.
Referenced by GetDimensions().
Here is the caller graph for this function:
|
pure virtual |
Initialisation function.
true if OK. Implemented in Castor3D::StaticTexture, and Castor3D::DynamicTexture.
|
inline |
|
pure virtual |
Locks image buffer from GPU, allowing modifications into it.
| [in] | p_lock | Defines the lock mode (r, w, rw), combination of eACCESS_TYPE |
| C3D_API void Castor3D::Texture::SetImage | ( | Castor::PxBufferBaseSPtr | p_buffer | ) |
Defines the texture buffer.
| [in] | p_buffer | The buffer |
|
inline |
Defines the texture mapping mode.
| [in] | p_eMapMode | The texture mapping mode |
References m_mapMode.
|
inline |
| C3D_API void Castor3D::Texture::Unbind | ( | uint32_t | p_index | ) | const |
Deactivation function, to tell the GPU it is inactive.
| [in] | p_index | The texture index |
|
pure virtual |
Unlocks image buffer from GPU.
| [in] | p_modified | Tells if the buffer has been modified, so modifications are uploaded to GPU |
|
protected |
Texture base type.
Referenced by GetBaseType().
|
protected |
The required CPU access (combination of eACCESS_TYPE).
|
protected |
3D Texture depth
Referenced by GetDepth(), and GetHeight().
|
protected |
The required GPU access (combination of eACCESS_TYPE).
|
protected |
Initialisation status.
Referenced by IsInitialised().
|
protected |
Texture mapping modes.
Referenced by GetMappingMode(), and SetMappingMode().
|
protected |
Texture pixels, at least at initialisation.
Referenced by GetBuffer(), GetHeight(), GetPixelFormat(), and GetWidth().
|
protected |
The pixel buffer format.
Referenced by GetPixelFormat().
|
protected |
The pixel buffer dimensions.
Referenced by GetHeight(), and GetWidth().
|
protected |
1.8.15