org.ogre4j
Class DefaultHardwareIndexBuffer

java.lang.Object
  extended by org.xbig.base.NativeObject
      extended by org.ogre4j.DefaultHardwareIndexBuffer
All Implemented Interfaces:
IAllocatedObject<IRenderSysAllocPolicy>, IDefaultHardwareIndexBuffer, IHardwareBuffer, IHardwareIndexBuffer, IRenderSysAllocatedObject, INativeObject

public class DefaultHardwareIndexBuffer
extends NativeObject
implements IDefaultHardwareIndexBuffer


Field Summary
 
Fields inherited from class org.xbig.base.NativeObject
deleted, object, remote
 
Constructor Summary
  DefaultHardwareIndexBuffer(HardwareIndexBuffer.IndexType idxType, int numIndexes, HardwareBuffer.Usage usage)
           
  DefaultHardwareIndexBuffer(InstancePointer p)
          This constructor is public for internal useage only!
protected DefaultHardwareIndexBuffer(InstancePointer p, boolean remote)
          Creates a Java wrapper object for an existing C++ object.
  DefaultHardwareIndexBuffer(WithoutNativeObject val)
          Allows creation of Java objects without C++ objects.
 
Method Summary
 void _updateFromShadow()
           
 void copyData(IHardwareBuffer srcBuffer, int srcOffset, int dstOffset, int length, boolean discardWholeBuffer)
          Copy data from another buffer into this one.
 void delete()
          Deletes the corresponding C++ object.
 void finalize()
           
 int getIndexSize()
           
 int getNumIndexes()
           
 int getSizeInBytes()
           
 HardwareIndexBuffer.IndexType getType()
           
 HardwareBuffer.Usage getUsage()
           
 boolean hasShadowBuffer()
           
 boolean isLocked()
           
 boolean isSystemMemory()
           
 VoidPointer lock(HardwareBuffer.LockOptions options)
          Lock the entire buffer for (potentially) reading / writing.
 VoidPointer lock(int offset, int length, HardwareBuffer.LockOptions options)
          Override to turn off all shadowing.
 void readData(int offset, int length, VoidPointer pDest)
          See .
 void suppressHardwareUpdate(boolean suppress)
           
 void unlock()
          Override to turn off all shadowing.
 void writeData(int offset, int length, VoidPointer pSource, boolean discardWholeBuffer)
          See .
 
Methods inherited from class org.xbig.base.NativeObject
disconnectFromNativeObject, equals, getInstancePointer, hashCode, setInstancePointer, setInstancePointer, setInstancePointer, toString
 
Methods inherited from class java.lang.Object
clone, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.xbig.base.INativeObject
disconnectFromNativeObject, getInstancePointer, setInstancePointer, setInstancePointer, setInstancePointer
 

Constructor Detail

DefaultHardwareIndexBuffer

public DefaultHardwareIndexBuffer(InstancePointer p)
This constructor is public for internal useage only! Do not use it!


DefaultHardwareIndexBuffer

protected DefaultHardwareIndexBuffer(InstancePointer p,
                                     boolean remote)
Creates a Java wrapper object for an existing C++ object. If remote is set to 'true' this object cannot be deleted in Java.


DefaultHardwareIndexBuffer

public DefaultHardwareIndexBuffer(WithoutNativeObject val)
Allows creation of Java objects without C++ objects.

See Also:
WithoutNativeObject, INativeObject.disconnectFromNativeObject()

DefaultHardwareIndexBuffer

public DefaultHardwareIndexBuffer(HardwareIndexBuffer.IndexType idxType,
                                  int numIndexes,
                                  HardwareBuffer.Usage usage)
Method Detail

delete

public void delete()
Description copied from interface: INativeObject
Deletes the corresponding C++ object.

Subclasses must implement this but if the native instance was created by the underlying library the native call to dispose must not happen!

Specified by:
delete in interface INativeObject
Specified by:
delete in class NativeObject
See Also:
#remote

finalize

public void finalize()
Overrides:
finalize in class NativeObject

readData

public void readData(int offset,
                     int length,
                     VoidPointer pDest)
See .

Specified by:
readData in interface IHardwareBuffer

writeData

public void writeData(int offset,
                      int length,
                      VoidPointer pSource,
                      boolean discardWholeBuffer)
See .

Specified by:
writeData in interface IHardwareBuffer

lock

public VoidPointer lock(int offset,
                        int length,
                        HardwareBuffer.LockOptions options)
Override to turn off all shadowing.

Specified by:
lock in interface IHardwareBuffer

unlock

public void unlock()
Override to turn off all shadowing.

Specified by:
unlock in interface IHardwareBuffer

getType

public HardwareIndexBuffer.IndexType getType()
Specified by:
getType in interface IHardwareIndexBuffer

getNumIndexes

public int getNumIndexes()
Specified by:
getNumIndexes in interface IHardwareIndexBuffer

getIndexSize

public int getIndexSize()
Specified by:
getIndexSize in interface IHardwareIndexBuffer

lock

public VoidPointer lock(HardwareBuffer.LockOptions options)
Lock the entire buffer for (potentially) reading / writing.

Specified by:
lock in interface IHardwareBuffer

copyData

public void copyData(IHardwareBuffer srcBuffer,
                     int srcOffset,
                     int dstOffset,
                     int length,
                     boolean discardWholeBuffer)
Copy data from another buffer into this one.

Specified by:
copyData in interface IHardwareBuffer

_updateFromShadow

public void _updateFromShadow()
Specified by:
_updateFromShadow in interface IHardwareBuffer

getSizeInBytes

public int getSizeInBytes()
Specified by:
getSizeInBytes in interface IHardwareBuffer

getUsage

public HardwareBuffer.Usage getUsage()
Specified by:
getUsage in interface IHardwareBuffer

isSystemMemory

public boolean isSystemMemory()
Specified by:
isSystemMemory in interface IHardwareBuffer

hasShadowBuffer

public boolean hasShadowBuffer()
Specified by:
hasShadowBuffer in interface IHardwareBuffer

isLocked

public boolean isLocked()
Specified by:
isLocked in interface IHardwareBuffer

suppressHardwareUpdate

public void suppressHardwareUpdate(boolean suppress)
Specified by:
suppressHardwareUpdate in interface IHardwareBuffer


Copyright © 2007 netAllied GmbH. All Rights Reserved.