#include <OgreD3D9HardwarePixelBuffer.h>
Inheritance diagram for Ogre::D3D9HardwarePixelBuffer:
Public Types | |||||||||||||
enum | Usage { HBU_STATIC = 1, HBU_DYNAMIC = 2, HBU_WRITE_ONLY = 4, HBU_DISCARDABLE = 8, HBU_STATIC_WRITE_ONLY = 5, HBU_DYNAMIC_WRITE_ONLY = 6, HBU_DYNAMIC_WRITE_ONLY_DISCARDABLE = 14 } | ||||||||||||
Enums describing buffer usage; not mutually exclusive. More... | |||||||||||||
enum | LockOptions { HBL_NORMAL, HBL_DISCARD, HBL_READ_ONLY, HBL_NO_OVERWRITE } | ||||||||||||
Locking options. More... | |||||||||||||
Public Member Functions | |||||||||||||
D3D9HardwarePixelBuffer (HardwareBuffer::Usage usage) | |||||||||||||
void | bind (IDirect3DDevice9 *dev, IDirect3DSurface9 *mSurface, bool update) | ||||||||||||
Call this to associate a D3D surface or volume with this pixel buffer. | |||||||||||||
void | bind (IDirect3DDevice9 *dev, IDirect3DVolume9 *mVolume, bool update) | ||||||||||||
void | blit (const HardwarePixelBufferSharedPtr &src, const Image::Box &srcBox, const Image::Box &dstBox) | ||||||||||||
| |||||||||||||
void | blitFromMemory (const PixelBox &src, const Image::Box &dstBox) | ||||||||||||
The source image can be in any pixel format supported by OGRE, and in any size.
| |||||||||||||
void | blitToMemory (const Image::Box &srcBox, const PixelBox &dst) | ||||||||||||
| |||||||||||||
void | _genMipmaps () | ||||||||||||
Internal function to update mipmaps on update of level 0. | |||||||||||||
void | _setMipmapping (bool doMipmapGen, bool HWMipmaps, IDirect3DBaseTexture9 *mipTex) | ||||||||||||
Function to set mipmap generation. | |||||||||||||
~D3D9HardwarePixelBuffer () | |||||||||||||
RenderTexture * | getRenderTarget (size_t zoffset) | ||||||||||||
Get rendertarget for z slice. | |||||||||||||
IDirect3DSurface9 * | getSurface () | ||||||||||||
Accessor for surface. | |||||||||||||
virtual void | _clearSliceRTT (size_t zoffset) | ||||||||||||
Notify TextureBuffer of destruction of render target. | |||||||||||||
virtual const PixelBox & | lock (const Image::Box &lockBox, LockOptions options) | ||||||||||||
Lock the buffer for (potentially) reading / writing. | |||||||||||||
virtual void * | lock (size_t offset, size_t length, LockOptions options) | ||||||||||||
| |||||||||||||
void * | lock (LockOptions options) | ||||||||||||
Lock the entire buffer for (potentially) reading / writing. | |||||||||||||
const PixelBox & | getCurrentLock () | ||||||||||||
Get the current locked region. | |||||||||||||
virtual void | readData (size_t offset, size_t length, void *pDest) | ||||||||||||
| |||||||||||||
virtual void | writeData (size_t offset, size_t length, const void *pSource, bool discardWholeBuffer=false) | ||||||||||||
| |||||||||||||
void | blit (const HardwarePixelBufferSharedPtr &src) | ||||||||||||
Convience function that blits the entire source pixel buffer to this buffer. | |||||||||||||
void | blitFromMemory (const PixelBox &src) | ||||||||||||
Convience function that blits a pixelbox from memory to the entire buffer. | |||||||||||||
void | blitToMemory (const PixelBox &dst) | ||||||||||||
Convience function that blits this entire buffer to a pixelbox. | |||||||||||||
size_t | getWidth () const | ||||||||||||
Gets the width of this buffer. | |||||||||||||
size_t | getHeight () const | ||||||||||||
Gets the height of this buffer. | |||||||||||||
size_t | getDepth () const | ||||||||||||
Gets the depth of this buffer. | |||||||||||||
PixelFormat | getFormat () const | ||||||||||||
Gets the native pixel format of this buffer. | |||||||||||||
virtual void | unlock (void) | ||||||||||||
Releases the lock on this buffer. | |||||||||||||
virtual void | copyData (HardwareBuffer &srcBuffer, size_t srcOffset, size_t dstOffset, size_t length, bool discardWholeBuffer=false) | ||||||||||||
Copy data from another buffer into this one. | |||||||||||||
virtual void | _updateFromShadow (void) | ||||||||||||
Updates the real buffer from the shadow buffer, if required. | |||||||||||||
size_t | getSizeInBytes (void) const | ||||||||||||
Returns the size of this buffer in bytes. | |||||||||||||
Usage | getUsage (void) const | ||||||||||||
Returns the Usage flags with which this buffer was created. | |||||||||||||
bool | isSystemMemory (void) const | ||||||||||||
Returns whether this buffer is held in system memory. | |||||||||||||
bool | hasShadowBuffer (void) const | ||||||||||||
Returns whether this buffer has a system memory shadow for quicker reading. | |||||||||||||
bool | isLocked (void) const | ||||||||||||
Returns whether or not this buffer is currently locked. | |||||||||||||
void | suppressHardwareUpdate (bool suppress) | ||||||||||||
Pass true to suppress hardware upload of shadow buffer changes. | |||||||||||||
Protected Types | |||||||||||||
typedef std::vector< RenderTexture * > | SliceTRT | ||||||||||||
Render targets. | |||||||||||||
Protected Member Functions | |||||||||||||
PixelBox | lockImpl (const Image::Box lockBox, LockOptions options) | ||||||||||||
Lock a box. | |||||||||||||
void | unlockImpl (void) | ||||||||||||
Unlock a box. | |||||||||||||
void | createRenderTextures (bool update) | ||||||||||||
Create (or update) render textures for slices. | |||||||||||||
void | destroyRenderTextures () | ||||||||||||
Destroy render textures for slices. | |||||||||||||
virtual void * | lockImpl (size_t offset, size_t length, LockOptions options) | ||||||||||||
Internal implementation of lock(), do not OVERRIDE or CALL this for HardwarePixelBuffer implementations, but override the previous method. | |||||||||||||
Protected Attributes | |||||||||||||
IDirect3DDevice9 * | mpDev | ||||||||||||
D3DDevice pointer. | |||||||||||||
IDirect3DSurface9 * | mSurface | ||||||||||||
Surface abstracted by this buffer. | |||||||||||||
IDirect3DVolume9 * | mVolume | ||||||||||||
Volume abstracted by this buffer. | |||||||||||||
IDirect3DSurface9 * | mTempSurface | ||||||||||||
Temporary surface in main memory if direct locking of mSurface is not possible. | |||||||||||||
IDirect3DVolume9 * | mTempVolume | ||||||||||||
Temporary volume in main memory if direct locking of mVolume is not possible. | |||||||||||||
bool | mDoMipmapGen | ||||||||||||
Mipmapping. | |||||||||||||
bool | mHWMipmaps | ||||||||||||
IDirect3DBaseTexture9 * | mMipTex | ||||||||||||
SliceTRT | mSliceTRT | ||||||||||||
size_t | mWidth | ||||||||||||
size_t | mHeight | ||||||||||||
size_t | mDepth | ||||||||||||
size_t | mRowPitch | ||||||||||||
size_t | mSlicePitch | ||||||||||||
PixelFormat | mFormat | ||||||||||||
PixelBox | mCurrentLock | ||||||||||||
size_t | mSizeInBytes | ||||||||||||
Usage | mUsage | ||||||||||||
bool | mIsLocked | ||||||||||||
size_t | mLockStart | ||||||||||||
size_t | mLockSize | ||||||||||||
bool | mSystemMemory | ||||||||||||
bool | mUseShadowBuffer | ||||||||||||
HardwareBuffer * | mpShadowBuffer | ||||||||||||
bool | mShadowUpdated | ||||||||||||
bool | mSuppressHardwareUpdate | ||||||||||||
Friends | |||||||||||||
class | RenderTexture |
|
Render targets.
Definition at line 67 of file OgreD3D9HardwarePixelBuffer.h. |
|
Locking options.
Definition at line 111 of file OgreHardwareBuffer.h. |
|
Enums describing buffer usage; not mutually exclusive.
Definition at line 69 of file OgreHardwareBuffer.h. |
|
|
|
|
|
Notify TextureBuffer of destruction of render target.
Reimplemented from Ogre::HardwarePixelBuffer. Definition at line 100 of file OgreD3D9HardwarePixelBuffer.h. References mSliceTRT. |
|
Internal function to update mipmaps on update of level 0.
|
|
Function to set mipmap generation.
|
|
Updates the real buffer from the shadow buffer, if required.
Definition at line 275 of file OgreHardwareBuffer.h. |
|
|
|
Call this to associate a D3D surface or volume with this pixel buffer.
|
|
Convience function that blits the entire source pixel buffer to this buffer. If source and destination dimensions don't match, scaling is done.
|
|
Reimplemented from Ogre::HardwarePixelBuffer. |
|
Convience function that blits a pixelbox from memory to the entire buffer. The source image is scaled as needed.
Definition at line 139 of file OgreHardwarePixelBuffer.h. |
|
The source image can be in any pixel format supported by OGRE, and in any size.
Implements Ogre::HardwarePixelBuffer. |
|
Convience function that blits this entire buffer to a pixelbox. The image is scaled as needed.
Definition at line 158 of file OgreHardwarePixelBuffer.h. |
|
Implements Ogre::HardwarePixelBuffer. |
|
Copy data from another buffer into this one.
Definition at line 265 of file OgreHardwareBuffer.h. References Ogre::HardwareBuffer::lock(), and Ogre::HardwareBuffer::unlock(). |
|
Create (or update) render textures for slices.
|
|
Destroy render textures for slices.
|
|
Get the current locked region. This is the same value as returned by lock(const Image::Box, LockOptions)
|
|
Gets the depth of this buffer.
Definition at line 177 of file OgreHardwarePixelBuffer.h. |
|
Gets the native pixel format of this buffer.
Definition at line 179 of file OgreHardwarePixelBuffer.h. Referenced by Ogre::D3D9RenderTexture::rebind(). |
|
Gets the height of this buffer.
Definition at line 175 of file OgreHardwarePixelBuffer.h. Referenced by Ogre::D3D9RenderTexture::rebind(). |
|
Get rendertarget for z slice.
Reimplemented from Ogre::HardwarePixelBuffer. |
|
Returns the size of this buffer in bytes.
Definition at line 300 of file OgreHardwareBuffer.h. |
|
Accessor for surface.
Definition at line 97 of file OgreD3D9HardwarePixelBuffer.h. References mSurface. |
|
Returns the Usage flags with which this buffer was created.
Definition at line 302 of file OgreHardwareBuffer.h. |
|
Gets the width of this buffer.
Definition at line 173 of file OgreHardwarePixelBuffer.h. Referenced by Ogre::D3D9RenderTexture::rebind(). |
|
Returns whether this buffer has a system memory shadow for quicker reading.
Definition at line 306 of file OgreHardwareBuffer.h. |
|
Returns whether or not this buffer is currently locked.
Definition at line 308 of file OgreHardwareBuffer.h. |
|
Returns whether this buffer is held in system memory.
Definition at line 304 of file OgreHardwareBuffer.h. |
|
Lock the entire buffer for (potentially) reading / writing.
Definition at line 201 of file OgreHardwareBuffer.h. |
|
Reimplemented from Ogre::HardwareBuffer. |
|
Lock the buffer for (potentially) reading / writing.
|
|
Internal implementation of lock(), do not OVERRIDE or CALL this for HardwarePixelBuffer implementations, but override the previous method.
Implements Ogre::HardwareBuffer. |
|
Lock a box.
Implements Ogre::HardwarePixelBuffer. |
|
Implements Ogre::HardwareBuffer. |
|
Pass true to suppress hardware upload of shadow buffer changes.
Definition at line 312 of file OgreHardwareBuffer.h. |
|
Releases the lock on this buffer.
Reimplemented in Ogre::DefaultHardwareVertexBuffer, Ogre::DefaultHardwareIndexBuffer, Ogre::GLDefaultHardwareVertexBuffer, and Ogre::GLDefaultHardwareIndexBuffer. Definition at line 217 of file OgreHardwareBuffer.h. Referenced by Ogre::HardwareBuffer::copyData(). |
|
Unlock a box.
Implements Ogre::HardwareBuffer. |
|
Implements Ogre::HardwareBuffer. |
|
Definition at line 69 of file OgreHardwarePixelBuffer.h. |
|
Definition at line 53 of file OgreHardwarePixelBuffer.h. |
|
Definition at line 47 of file OgreHardwarePixelBuffer.h. |
|
Mipmapping.
Definition at line 62 of file OgreD3D9HardwarePixelBuffer.h. |
|
Definition at line 51 of file OgreHardwarePixelBuffer.h. |
|
Definition at line 47 of file OgreHardwarePixelBuffer.h. |
|
Definition at line 63 of file OgreD3D9HardwarePixelBuffer.h. |
|
Definition at line 133 of file OgreHardwareBuffer.h. |
|
Definition at line 135 of file OgreHardwareBuffer.h. |
|
Definition at line 134 of file OgreHardwareBuffer.h. |
|
Definition at line 64 of file OgreD3D9HardwarePixelBuffer.h. |
|
D3DDevice pointer.
Definition at line 50 of file OgreD3D9HardwarePixelBuffer.h. |
|
Definition at line 138 of file OgreHardwareBuffer.h. |
|
Definition at line 49 of file OgreHardwarePixelBuffer.h. |
|
Definition at line 139 of file OgreHardwareBuffer.h. |
|
Definition at line 131 of file OgreHardwareBuffer.h. |
|
Definition at line 49 of file OgreHardwarePixelBuffer.h. |
|
Definition at line 68 of file OgreD3D9HardwarePixelBuffer.h. Referenced by _clearSliceRTT(). |
|
Definition at line 140 of file OgreHardwareBuffer.h. |
|
Surface abstracted by this buffer.
Definition at line 53 of file OgreD3D9HardwarePixelBuffer.h. Referenced by getSurface(). |
|
Definition at line 136 of file OgreHardwareBuffer.h. |
|
Temporary surface in main memory if direct locking of mSurface is not possible.
Definition at line 57 of file OgreD3D9HardwarePixelBuffer.h. |
|
Temporary volume in main memory if direct locking of mVolume is not possible.
Definition at line 59 of file OgreD3D9HardwarePixelBuffer.h. |
|
Definition at line 132 of file OgreHardwareBuffer.h. |
|
Definition at line 137 of file OgreHardwareBuffer.h. |
|
Volume abstracted by this buffer.
Definition at line 55 of file OgreD3D9HardwarePixelBuffer.h. |
|
Definition at line 47 of file OgreHardwarePixelBuffer.h. |
Copyright © 2000-2005 by The OGRE Team
This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.
Last modified Sun Jan 21 10:09:54 2007