#include <OgreGLHardwarePixelBuffer.h>
Inheritance diagram for Ogre::GLRenderBuffer:
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 | |||||||||||||
GLRenderBuffer (GLenum format, size_t width, size_t height) | |||||||||||||
~GLRenderBuffer () | |||||||||||||
virtual void | bindToFramebuffer (GLenum attachment, size_t zoffset) | ||||||||||||
Needs FBO extension. | |||||||||||||
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 | blitFromMemory (const PixelBox &src) | ||||||||||||
Convience function that blits a pixelbox from memory to the entire buffer. | |||||||||||||
void | blitToMemory (const Image::Box &srcBox, const PixelBox &dst) | ||||||||||||
| |||||||||||||
void | blitToMemory (const PixelBox &dst) | ||||||||||||
Convience function that blits this entire buffer to a pixelbox. | |||||||||||||
GLenum | getGLFormat () | ||||||||||||
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) | ||||||||||||
| |||||||||||||
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. | |||||||||||||
void | blit (const HardwarePixelBufferSharedPtr &src) | ||||||||||||
Convience function that blits the entire source pixel buffer to this buffer. | |||||||||||||
virtual RenderTexture * | getRenderTarget (size_t slice=0) | ||||||||||||
Get a render target for this PixelBuffer, or a slice of it. | |||||||||||||
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. | |||||||||||||
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. | |||||||||||||
void | unlockImpl (void) | ||||||||||||
Unlock a box. | |||||||||||||
void | allocateBuffer () | ||||||||||||
void | freeBuffer () | ||||||||||||
virtual void | upload (const PixelBox &data) | ||||||||||||
virtual void | download (const PixelBox &data) | ||||||||||||
virtual void | _clearSliceRTT (size_t zoffset) | ||||||||||||
Notify TextureBuffer of destruction of render target. | |||||||||||||
Protected Attributes | |||||||||||||
GLuint | mRenderbufferID | ||||||||||||
PixelBox | mBuffer | ||||||||||||
GLenum | mGLInternalFormat | ||||||||||||
LockOptions | mCurrentLockOptions | ||||||||||||
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 |
Needs FBO extension.
Definition at line 121 of file OgreGLHardwarePixelBuffer.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. Called by RenderTexture when destroyed. Reimplemented in Ogre::D3D9HardwarePixelBuffer, and Ogre::GLTextureBuffer. |
|
Updates the real buffer from the shadow buffer, if required.
Definition at line 275 of file OgreHardwareBuffer.h. |
|
|
|
Needs FBO extension.
Reimplemented from Ogre::GLHardwarePixelBuffer. |
|
Convience function that blits the entire source pixel buffer to this buffer. If source and destination dimensions don't match, scaling is done.
|
|
Copies a box from another PixelBuffer to a region of the this PixelBuffer.
Reimplemented in Ogre::D3D9HardwarePixelBuffer, and Ogre::GLTextureBuffer. |
|
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. Reimplemented in Ogre::GLTextureBuffer. |
|
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(). |
|
Reimplemented in Ogre::GLTextureBuffer. |
|
|
|
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(). |
|
Definition at line 71 of file OgreGLHardwarePixelBuffer.h. References Ogre::GLHardwarePixelBuffer::mGLInternalFormat. |
|
Gets the height of this buffer.
Definition at line 175 of file OgreHardwarePixelBuffer.h. Referenced by Ogre::D3D9RenderTexture::rebind(). |
|
Get a render target for this PixelBuffer, or a slice of it. The texture this was acquired from must have TU_RENDERTARGET set, otherwise it is possible to render to it and this method will throw an ERR_RENDERSYSTEM exception.
Reimplemented in Ogre::D3D9HardwarePixelBuffer, and Ogre::GLTextureBuffer. |
|
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 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. |
|
Reimplemented in Ogre::GLTextureBuffer. |
|
Implements Ogre::HardwareBuffer. |
|
Definition at line 69 of file OgreHardwarePixelBuffer.h. |
|
Definition at line 43 of file OgreGLHardwarePixelBuffer.h. |
|
Definition at line 53 of file OgreHardwarePixelBuffer.h. |
|
Definition at line 45 of file OgreGLHardwarePixelBuffer.h. |
|
Definition at line 47 of file OgreHardwarePixelBuffer.h. |
|
Definition at line 51 of file OgreHardwarePixelBuffer.h. |
|
Definition at line 44 of file OgreGLHardwarePixelBuffer.h. Referenced by Ogre::GLHardwarePixelBuffer::getGLFormat(). |
|
Definition at line 47 of file OgreHardwarePixelBuffer.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 138 of file OgreHardwareBuffer.h. |
|
Definition at line 131 of file OgreGLHardwarePixelBuffer.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 140 of file OgreHardwareBuffer.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 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 Nov 12 11:00:00 2006