DigitalSpaces::DIOGREHardwarePixelBuffer Struct Reference
[Ogre]

#include <OGREInterfaces.h>

Inherits DigitalSpaces::DIObjectBase.


Public Member Functions

void * lock (size_t offset, size_t length, OGRELockOptions options)
 Lock the buffer for (potentially) reading / writing.
void readData (size_t offset, size_t length, void *pDest)
 Get the current locked region.
void writeData (size_t offset, size_t length, const void *pSource, bool discardWholeBuffer=false)
void blit (DIOGREHardwarePixelBuffer *src)
 Copies a box from another PixelBuffer to a region of the this PixelBuffer.
void blitToMemory (DIOGREPixelBox *dst)
 Copies a region from normal memory to a region of this pixelbuffer.
unsigned int getWidth ()
 Gets the width of this buffer.
unsigned int getHeight ()
 Gets the height of this buffer.
unsigned int getDepth ()
 Gets the depth of this buffer.
OGREPixelFormat getFormat ()
 Gets the native pixel format of this buffer.

Member Function Documentation

void* DigitalSpaces::DIOGREHardwarePixelBuffer::lock ( size_t  offset,
size_t  length,
OGRELockOptions  options 
)

Lock the buffer for (potentially) reading / writing.

Parameters:
lockBox Region of the buffer to lock
options Locking options
Returns:
PixelBox containing the locked region, the pitches and the pixel format

void DigitalSpaces::DIOGREHardwarePixelBuffer::readData ( size_t  offset,
size_t  length,
void *  pDest 
)

Get the current locked region.

This is the same value as returned by lock(const Image::Box, OGRELockOptions)

Returns:
PixelBox containing the locked region

void DigitalSpaces::DIOGREHardwarePixelBuffer::writeData ( size_t  offset,
size_t  length,
const void *  pSource,
bool  discardWholeBuffer = false 
)

void DigitalSpaces::DIOGREHardwarePixelBuffer::blit ( DIOGREHardwarePixelBuffer src  ) 

Copies a box from another PixelBuffer to a region of the this PixelBuffer.

Parameters:
dst Source pixel buffer
srcBox Image::Box describing the source region in src
dstBox Image::Box describing the destination region in this buffer
Remarks:
The source and destination regions dimensions don't have to match, in which case scaling is done. This scaling is done in software for some render systems, thus for realtime usage it is recommended to pass the source image in the right dimensions.
Note:
Only call this function when both buffers are unlocked. Convience function that blits the entire source pixel buffer to this buffer. If source and destination dimensions don't match, scaling is done.
Parameters:
src PixelBox containing the source pixels and format in memory
Note:
Only call this function when the buffer is unlocked.

void DigitalSpaces::DIOGREHardwarePixelBuffer::blitToMemory ( DIOGREPixelBox dst  ) 

Copies a region from normal memory to a region of this pixelbuffer.

The source image can be in any pixel format supported by OGRE, and in any size.

Parameters:
src PixelBox containing the source pixels and format in memory
dstBox Image::Box describing the destination region in this buffer
Remarks:
The source and destination regions dimensions don't have to match, in which case scaling is done. This scaling is done in software for some render systems, so for realtime usage it is recommended to pass the source image in the right dimensions.
Note:
Only call this function when the buffer is unlocked. Convience function that blits a pixelbox from memory to the entire buffer. The source image is scaled as needed.
Parameters:
src PixelBox containing the source pixels and format in memory
Note:
Only call this function when the buffer is unlocked. Copies a region of this pixelbuffer to normal memory.
Parameters:
srcBox Image::Box describing the source region of this buffer
dst PixelBox describing the destination pixels and format in memory
Remarks:
The source and destination regions don't have to match, in which case scaling is done.
Note:
Only call this function when the buffer is unlocked. Convience function that blits this entire buffer to a pixelbox. The image is scaled as needed.
Parameters:
src PixelBox containing the source pixels and format in memory
Note:
Only call this function when the buffer is unlocked.

unsigned int DigitalSpaces::DIOGREHardwarePixelBuffer::getWidth (  ) 

Gets the width of this buffer.

unsigned int DigitalSpaces::DIOGREHardwarePixelBuffer::getHeight (  ) 

Gets the height of this buffer.

unsigned int DigitalSpaces::DIOGREHardwarePixelBuffer::getDepth (  ) 

Gets the depth of this buffer.

OGREPixelFormat DigitalSpaces::DIOGREHardwarePixelBuffer::getFormat (  ) 

Gets the native pixel format of this buffer.


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

Generated on Sun Aug 31 17:46:32 2008 for Digital Spaces by  doxygen 1.5.6