#include <OgreD3D7HardwarePixelBuffer.h>
Inheritance diagram for Ogre::D3D7HardwarePixelBuffer:
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 | |||||||||
D3D7HardwarePixelBuffer (HardwareBuffer::Usage usage, IDirect3DDevice7 *device) | |||||||||
void | bind (LPDIRECTDRAWSURFACE7 surface, PixelFormat format) | ||||||||
Call this to associate a D3D surface or volume with this pixel buffer. | |||||||||
void | blit (HardwarePixelBuffer *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 | _setMipmapping (bool doMipmapGen) | ||||||||
Function to set mipmap generation. | |||||||||
void | _genMipmaps (const RECT &texRect) | ||||||||
Function to generate mipmaps. | |||||||||
~D3D7HardwarePixelBuffer () | |||||||||
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) | ||||||||
| |||||||||
virtual void * | lock (size_t offset, size_t length, LockOptions options) | ||||||||
make every lock method from HardwareBuffer available. | |||||||||
void * | lock (LockOptions options) | ||||||||
make every lock method from HardwareBuffer available. | |||||||||
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 (HardwarePixelBuffer *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 Member Functions | |||||||||
PixelBox | lockImpl (const Image::Box lockBox, LockOptions options) | ||||||||
Lock a box. | |||||||||
void | unlockImpl (void) | ||||||||
Unlock a box. | |||||||||
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 | |||||||||
IDirect3DDevice7 * | mD3DDevice | ||||||||
A pointer to the Direct3D device. | |||||||||
LPDIRECTDRAWSURFACE7 | mSurface | ||||||||
Surface abstracted by this buffer. | |||||||||
bool | mDoMipmapGen | ||||||||
RECT | mLockRect | ||||||||
RECT * | mpRect | ||||||||
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 |
|
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. |
|
|
|
|
|
Function to generate mipmaps.
|
|
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.
Definition at line 114 of file OgreHardwarePixelBuffer.h. References Ogre::HardwarePixelBuffer::getDepth(), Ogre::HardwarePixelBuffer::getHeight(), and Ogre::HardwarePixelBuffer::getWidth(). |
|
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 138 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 157 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(). |
|
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 167 of file OgreHardwarePixelBuffer.h. Referenced by Ogre::HardwarePixelBuffer::blit(). |
|
Gets the native pixel format of this buffer.
Definition at line 169 of file OgreHardwarePixelBuffer.h. References Ogre::PixelFormat. |
|
Gets the height of this buffer.
Definition at line 165 of file OgreHardwarePixelBuffer.h. Referenced by Ogre::HardwarePixelBuffer::blit(). |
|
Returns the size of this buffer in bytes.
Definition at line 300 of file OgreHardwareBuffer.h. |
|
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 163 of file OgreHardwarePixelBuffer.h. Referenced by Ogre::HardwarePixelBuffer::blit(). |
|
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. |
|
make every lock method from HardwareBuffer available. See http://www.research.att.com/~bs/bs_faq2.html#overloadderived Definition at line 201 of file OgreHardwareBuffer.h. |
|
make every lock method from HardwareBuffer available. See http://www.research.att.com/~bs/bs_faq2.html#overloadderived Definition at line 171 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 52 of file OgreHardwarePixelBuffer.h. |
|
A pointer to the Direct3D device.
Definition at line 43 of file OgreD3D7HardwarePixelBuffer.h. |
|
Definition at line 46 of file OgreHardwarePixelBuffer.h. |
|
Definition at line 49 of file OgreD3D7HardwarePixelBuffer.h. |
|
Definition at line 50 of file OgreHardwarePixelBuffer.h. |
|
Definition at line 46 of file OgreHardwarePixelBuffer.h. |
|
Definition at line 133 of file OgreHardwareBuffer.h. |
|
Definition at line 53 of file OgreD3D7HardwarePixelBuffer.h. |
|
Definition at line 135 of file OgreHardwareBuffer.h. |
|
Definition at line 134 of file OgreHardwareBuffer.h. |
|
Definition at line 54 of file OgreD3D7HardwarePixelBuffer.h. |
|
Definition at line 138 of file OgreHardwareBuffer.h. |
|
Definition at line 48 of file OgreHardwarePixelBuffer.h. |
|
Definition at line 139 of file OgreHardwareBuffer.h. |
|
Definition at line 131 of file OgreHardwareBuffer.h. |
|
Definition at line 48 of file OgreHardwarePixelBuffer.h. |
|
Definition at line 140 of file OgreHardwareBuffer.h. |
|
Surface abstracted by this buffer.
Definition at line 46 of file OgreD3D7HardwarePixelBuffer.h. |
|
Definition at line 136 of file OgreHardwareBuffer.h. |
|
Definition at line 132 of file OgreHardwareBuffer.h. |
|
Definition at line 137 of file OgreHardwareBuffer.h. |
|
Definition at line 46 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 Feb 12 13:08:02 2006