Unable to get a usable HardwarebufferManager

inquirer123

19-11-2010 09:20:03

Hi

I am using Mogre 1.7.1 downloaded from the Mogre 1.7.1 thread.

I am using Mogre but i will write some part of my application with C++ linking to the OgreMain.DLL

I am now writing a custom Water Spray Effect in which i untilize the HardwareBufferManager . I get the HardwareBufferManager through the Ogre::HardwareBufferManager::getSingleton() however the return HWM cannot be use .

How do i solve this?

thanks

nataz

19-11-2010 21:22:35

Well...

Mogre.HardwareBufferManager.Singleton.CreateVertexBuffer(12, 22, Mogre.HardwareBuffer.Usage.HBU_DYNAMIC);


works for me in the latest build.

If you are having trouble getting the Singleton Object for the Native Ogre Class, please post the question in the Main Forums.

inquirer123

22-11-2010 12:05:03

I have no problem with the Ogre build but when i use the MOGRE Ogre.dll i get the error . any idea?

mstoyke

23-11-2010 10:48:00

If you want to use the Ogre.dll from the Mogre project, make sure you application is linked against the Mogre version of Ogre.dll. Code linked against the "normal" Ogre.dll will not work with the Mogre version of Ogre.dll.

inquirer123

23-11-2010 12:17:09

hi mstoyke,

Yes I have linked it to the Mogre Ogre.dll. It seems that when getSingleton the point is not empty but when I try to call CreateVertexBuffer () it crashed . Using the PDB it crashed at the

HardwareVertexBufferSharedPtr
HardwareBufferManagerBase::makeBufferCopy(
const HardwareVertexBufferSharedPtr& source,
HardwareBuffer::Usage usage, bool useShadowBuffer)
{
return this->createVertexBuffer(
source->getVertexSize(),
source->getNumVertices(),
usage, useShadowBuffer);
}

source is null

inquirer123

25-11-2010 03:31:54

I cannot see why it will jump to that section of the code . Please help i really need to do the custom effect in C++ or else it will be quite slow . Anyone have any idea? have any try ? thanks