org.ogre4j
Interface IHardwarePixelBuffer

All Superinterfaces:
IAllocatedObject<IRenderSysAllocPolicy>, IHardwareBuffer, INativeObject, IRenderSysAllocatedObject
All Known Implementing Classes:
HardwarePixelBuffer

public interface IHardwarePixelBuffer
extends INativeObject, IHardwareBuffer


Method Summary
 void blit(IHardwarePixelBufferSharedPtr src)
          Convenience function that blits the entire source pixel buffer to this buffer.
 void blit(IHardwarePixelBufferSharedPtr src, IBox srcBox, IBox dstBox)
          Copies a box from another PixelBuffer to a region of the this PixelBuffer.
 void blitFromMemory(IPixelBox src)
          Convenience function that blits a pixelbox from memory to the entire buffer.
 void blitFromMemory(IPixelBox src, IBox dstBox)
          Copies a region from normal memory to a region of this pixelbuffer.
 void blitToMemory(IBox srcBox, IPixelBox dst)
          Copies a region of this pixelbuffer to normal memory.
 void blitToMemory(IPixelBox dst)
          Convience function that blits this entire buffer to a pixelbox.
 IPixelBox getCurrentLock()
          Get the current locked region.
 int getDepth()
           
 PixelFormat getFormat()
           
 int getHeight()
           
 IRenderTexture getRenderTarget(int slice)
          Get a render target for this PixelBuffer, or a slice of it.
 int getWidth()
           
 IPixelBox lock(IBox lockBox, HardwareBuffer.LockOptions options)
          Lock the buffer for (potentially) reading / writing.
 VoidPointer lock(int offset, int length, HardwareBuffer.LockOptions options)
          Lock the buffer for (potentially) reading / writing.
 void readData(int offset, int length, VoidPointer pDest)
          Reads data from the buffer and places it in the memory pointed to by pDest.
 void writeData(int offset, int length, VoidPointer pSource, boolean discardWholeBuffer)
          Writes data to the buffer from an area of system memory; note that you must ensure that your buffer is big enough.
 
Methods inherited from interface org.ogre4j.IHardwareBuffer
_updateFromShadow, copyData, getSizeInBytes, getUsage, hasShadowBuffer, isLocked, isSystemMemory, lock, suppressHardwareUpdate, unlock
 
Methods inherited from interface org.xbig.base.INativeObject
delete, disconnectFromNativeObject, getInstancePointer, setInstancePointer, setInstancePointer, setInstancePointer
 

Method Detail

lock

IPixelBox lock(IBox lockBox,
               HardwareBuffer.LockOptions options)
Lock the buffer for (potentially) reading / writing.


lock

VoidPointer lock(int offset,
                 int length,
                 HardwareBuffer.LockOptions options)
Description copied from interface: IHardwareBuffer
Lock the buffer for (potentially) reading / writing.

Specified by:
lock in interface IHardwareBuffer

getCurrentLock

IPixelBox getCurrentLock()
Get the current locked region. This is the same value as returned by lock(const Image::Box, LockOptions)


readData

void readData(int offset,
              int length,
              VoidPointer pDest)
Description copied from interface: IHardwareBuffer
Reads data from the buffer and places it in the memory pointed to by pDest.

Specified by:
readData in interface IHardwareBuffer

writeData

void writeData(int offset,
               int length,
               VoidPointer pSource,
               boolean discardWholeBuffer)
Description copied from interface: IHardwareBuffer
Writes data to the buffer from an area of system memory; note that you must ensure that your buffer is big enough.

Specified by:
writeData in interface IHardwareBuffer

blit

void blit(IHardwarePixelBufferSharedPtr src,
          IBox srcBox,
          IBox dstBox)
Copies a box from another PixelBuffer to a region of the this PixelBuffer.


blit

void blit(IHardwarePixelBufferSharedPtr src)
Convenience function that blits the entire source pixel buffer to this buffer. If source and destination dimensions don't match, scaling is done.


blitFromMemory

void blitFromMemory(IPixelBox src,
                    IBox dstBox)
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.


blitFromMemory

void blitFromMemory(IPixelBox src)
Convenience function that blits a pixelbox from memory to the entire buffer. The source image is scaled as needed.


blitToMemory

void blitToMemory(IBox srcBox,
                  IPixelBox dst)
Copies a region of this pixelbuffer to normal memory.


blitToMemory

void blitToMemory(IPixelBox dst)
Convience function that blits this entire buffer to a pixelbox. The image is scaled as needed.


getRenderTarget

IRenderTexture getRenderTarget(int slice)
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.


getWidth

int getWidth()

getHeight

int getHeight()

getDepth

int getDepth()

getFormat

PixelFormat getFormat()


Copyright © 2007 netAllied GmbH. All Rights Reserved.