%{ #include "OgreHardwareIndexBuffer.h" #include "IndexBufferProxy.h" %} namespace Ogre { %template(HardwareIndexBufferSharedPtrSWIG) SharedPtr; /** * Taken from pyogre, we need a special proxy object for dealing with locked * memory buffers. The normal C++ code has pointer access, and can just increment (++) * through memory. As we can't do that in Ruby, we'll proxy off the calls back * into C++ */ %extend HardwareIndexBuffer { IndexBufferProxy lock(HardwareBuffer::LockOptions options) { return IndexBufferProxy(self, self->lock(options), self->getNumIndexes()); } } } %include "OgreHardwareIndexBuffer.h" %include "IndexBufferProxy.h"