Go to the documentation of this file.
28 #ifndef __HardwarePixelBuffer__
29 #define __HardwarePixelBuffer__
109 virtual void readData(
size_t offset,
size_t length,
void* pDest);
111 virtual void writeData(
size_t offset,
size_t length,
const void* pSource,
112 bool discardWholeBuffer =
false);
151 blitFromMemory(src,
Box(0,0,0,mWidth,mHeight,mDepth));
170 blitToMemory(
Box(0,0,0,mWidth,mHeight,mDepth), dst);
virtual void blitFromMemory(const PixelBox &src, const Image::Box &dstBox)=0
Copies a region from normal memory to a region of this pixelbuffer.
PixelBox mCurrentLock
Currently locked region (local coords)
Image::Box mLockedBox
The current locked box of this surface (entire surface coords)
virtual void _clearSliceRTT(size_t zoffset)
Notify TextureBuffer of destruction of render target.
virtual RenderTexture * getRenderTarget(size_t slice=0)
Get a render target for this PixelBuffer, or a slice of it.
uint32 getHeight() const
Gets the height of this buffer.
Specialisation of HardwareBuffer for a pixel buffer.
HardwarePixelBufferSharedPtr()
PixelFormat getFormat() const
Gets the native pixel format of this buffer.
virtual void writeData(size_t offset, size_t length, const void *pSource, bool discardWholeBuffer=false)
Writes data to the buffer from an area of system memory; note that you must ensure that your buffer i...
PixelFormat mFormat
Internal format.
virtual void readData(size_t offset, size_t length, void *pDest)
Reads data from the buffer and places it in the memory pointed to by pDest.
virtual void * lock(size_t offset, size_t length, LockOptions options)
Lock the buffer for (potentially) reading / writing.
PixelFormat
The pixel format used for images, textures, and render surfaces.
virtual const PixelBox & lock(const Image::Box &lockBox, LockOptions options)
Lock the buffer for (potentially) reading / writing.
Structure used to define a box in a 3-D integer space.
virtual void blit(const HardwarePixelBufferSharedPtr &src, const Image::Box &srcBox, const Image::Box &dstBox)
Copies a box from another PixelBuffer to a region of the this PixelBuffer.
HardwarePixelBufferSharedPtr(HardwarePixelBuffer *buf)
virtual PixelBox lockImpl(const Image::Box lockBox, LockOptions options)=0
Internal implementation of lock(), must be overridden in subclasses.
Reference-counted shared pointer, used for objects where implicit destruction is required.
void blitToMemory(const PixelBox &dst)
Convenience function that blits this entire buffer to a pixelbox.
virtual void * lockImpl(size_t offset, size_t length, LockOptions options)
Internal implementation of lock(), do not OVERRIDE or CALL this for HardwarePixelBuffer implementatio...
Abstract class defining common features of hardware buffers.
void blitFromMemory(const PixelBox &src)
Convenience function that blits a pixelbox from memory to the entire buffer.
A primitive describing a volume (3D), image (2D) or line (1D) of pixels in memory.
HardwarePixelBuffer(uint32 mWidth, uint32 mHeight, uint32 mDepth, PixelFormat mFormat, HardwareBuffer::Usage usage, bool useSystemMemory, bool useShadowBuffer)
Should be called by HardwareBufferManager.
Shared pointer implementation used to share pixel buffers.
uint32 getWidth() const
Gets the width of this buffer.
uint32 getDepth() const
Gets the depth of this buffer.
This class represents a RenderTarget that renders to a Texture.
Usage
Enums describing buffer usage; not mutually exclusive.
virtual void * lock(size_t offset, size_t length, LockOptions options)
Lock the buffer for (potentially) reading / writing.
LockOptions
Locking options.
virtual void blitToMemory(const Image::Box &srcBox, const PixelBox &dst)=0
Copies a region of this pixelbuffer to normal memory.
void blit(const HardwarePixelBufferSharedPtr &src)
Convenience function that blits the entire source pixel buffer to this buffer.
const PixelBox & getCurrentLock()
Get the current locked region.
Copyright © 2012 Torus Knot Software Ltd

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.