Castor3D  ..
Public Member Functions | List of all members
Castor3D::DynamicTexture Class Referenceabstract

Dynamic texture class. More...

+ Inheritance diagram for Castor3D::DynamicTexture:
+ Collaboration diagram for Castor3D::DynamicTexture:

Public Member Functions

C3D_API DynamicTexture (RenderSystem &p_renderSystem, uint8_t p_cpuAccess, uint8_t p_gpuAccess)
 Constructor. More...
 
virtual C3D_API ~DynamicTexture ()
 Destructor. More...
 
virtual C3D_API bool Initialise ()
 Initialisation function. More...
 
virtual C3D_API void Cleanup ()
 Cleanup function. More...
 
C3D_API void SetImage (Castor::Size const &p_size, Castor::ePIXEL_FORMAT p_format)
 Defines the texture buffer. More...
 
C3D_API void SetImage (Castor::Point3ui const &p_size, Castor::ePIXEL_FORMAT p_format)
 Defines the 3D texture buffer. More...
 
virtual C3D_API void Resize (Castor::Size const &p_size)
 Resizes the texture buffer. More...
 
virtual C3D_API void Resize (Castor::Point3ui const &p_size)
 Resizes the 3D texture buffer. More...
 
RenderTargetSPtr GetRenderTarget () const
 Retrieves the render target. More...
 
void SetRenderTarget (RenderTargetSPtr p_target)
 Defines the render target. More...
 
int GetSamplesCount () const
 Retrieves the samples count. More...
 
void SetSamplesCount (int p_count)
 Defines the samples count. More...
 
virtual C3D_API void Fill (uint8_t const *p_buffer, Castor::Size const &p_size, Castor::ePIXEL_FORMAT p_format)=0
 Sends the given image buffer to the driver. More...
 
C3D_API void SetImage (Castor::PxBufferBaseSPtr p_buffer)
 Defines the texture buffer. More...
 
- Public Member Functions inherited from Castor3D::Texture
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 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...
 

Additional Inherited Members

- Protected Member Functions inherited from Castor3D::Texture
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 inherited from Castor3D::Texture
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...
 

Detailed Description

Dynamic texture class.

Author
Sylvain DOREMUS
Date
14/02/2010
Remarks
A dynamic texture can update it's buffer

Constructor & Destructor Documentation

◆ DynamicTexture()

C3D_API Castor3D::DynamicTexture::DynamicTexture ( RenderSystem p_renderSystem,
uint8_t  p_cpuAccess,
uint8_t  p_gpuAccess 
)

Constructor.

Parameters
[in]p_renderSystemThe render system.
[in]p_cpuAccessThe required CPU access (combination of eACCESS_TYPE).
[in]p_gpuAccessThe required GPU access (combination of eACCESS_TYPE).

◆ ~DynamicTexture()

virtual C3D_API Castor3D::DynamicTexture::~DynamicTexture ( )
virtual

Destructor.

Member Function Documentation

◆ Cleanup()

virtual C3D_API void Castor3D::DynamicTexture::Cleanup ( )
virtual

Cleanup function.

Implements Castor3D::Texture.

◆ Fill()

virtual C3D_API void Castor3D::DynamicTexture::Fill ( uint8_t const *  p_buffer,
Castor::Size const &  p_size,
Castor::ePIXEL_FORMAT  p_format 
)
pure virtual

Sends the given image buffer to the driver.

Remarks
Doesn't update the internal buffer, so either never use it or always use it
Parameters
[in]p_bufferThe image buffer
[in]p_sizeThe image resolution
[in]p_formatThe image pixel format

◆ GetRenderTarget()

RenderTargetSPtr Castor3D::DynamicTexture::GetRenderTarget ( ) const
inline

Retrieves the render target.

Returns
The target

◆ GetSamplesCount()

int Castor3D::DynamicTexture::GetSamplesCount ( ) const
inline

Retrieves the samples count.

Returns
The samples count

◆ Initialise()

virtual C3D_API bool Castor3D::DynamicTexture::Initialise ( )
virtual

Initialisation function.

Returns
true if OK.

Implements Castor3D::Texture.

◆ Resize() [1/2]

virtual C3D_API void Castor3D::DynamicTexture::Resize ( Castor::Size const &  p_size)
virtual

Resizes the texture buffer.

Parameters
[in]p_sizeThe new size

◆ Resize() [2/2]

virtual C3D_API void Castor3D::DynamicTexture::Resize ( Castor::Point3ui const &  p_size)
virtual

Resizes the 3D texture buffer.

Parameters
[in]p_sizeThe new size

◆ SetImage() [1/3]

C3D_API void Castor3D::DynamicTexture::SetImage ( Castor::Size const &  p_size,
Castor::ePIXEL_FORMAT  p_format 
)

Defines the texture buffer.

Parameters
[in]p_sizeThe buffer dimensions
[in]p_formatThe buffer format

◆ SetImage() [2/3]

C3D_API void Castor3D::DynamicTexture::SetImage ( Castor::Point3ui const &  p_size,
Castor::ePIXEL_FORMAT  p_format 
)

Defines the 3D texture buffer.

Parameters
[in]p_sizeThe buffer dimensions
[in]p_formatThe buffer format

◆ SetImage() [3/3]

C3D_API void Castor3D::Texture::SetImage

Defines the texture buffer.

Parameters
[in]p_bufferThe buffer

◆ SetRenderTarget()

void Castor3D::DynamicTexture::SetRenderTarget ( RenderTargetSPtr  p_target)
inline

Defines the render target.

Parameters
[in]p_targetThe target

◆ SetSamplesCount()

void Castor3D::DynamicTexture::SetSamplesCount ( int  p_count)
inline

Defines the samples count.

Parameters
[in]p_countThe samples count

The documentation for this class was generated from the following file: