Background Resource Loading Topic is solved

Discussion area about developing with Ogre-Next (2.1, 2.2 and beyond)


Post Reply
limesX
Gnoblar
Posts: 17
Joined: Mon Nov 12, 2012 3:05 pm
x 2

Background Resource Loading

Post by limesX »

Hi everyone. Help needed. Don't know if I am doing something wrong or maybe missing some steps.
I am trying to load meshes in the background while having some splash screen rendered.
In ogre.log file I get this message when background mesh loading starts:

11:39:15: Mesh: Loading test_model.mesh.
11:39:15: OGRE EXCEPTION(7:InternalErrorException): Cannot find serializer implementation for mesh version [MeshSerializer_v2.1 R2] in MeshSerializer::importMesh at D:\vs_2015\source\ogre_2_1\OgreMain\src\OgreMeshSerializer.cpp (line 191)

I use this to start loading the mesh in the background:
Ogre::MeshPtr meshV2 = Ogre::MeshManager::getSingleton().create("test_model.mesh", "TEST_GROUP");
meshV2 ->setBackgroundLoaded(true);
Ogre::BackgroundProcessTicket ticket = Ogre::ResourceBackgroundQueue::getSingleton.load("Mesh", "test_model.mesh", "TEST_GROUP", false, 0, 0, this);

I tried loading the same mesh when ogre starts (not in the background), and I don't get that error log.
I think the problem might be that when using background loading Ogre uses OgreMeshSerializer instead of OgreMesh2Serializer.
I this correct? If so, how to get around this.....
Thx
limesX
Gnoblar
Posts: 17
Joined: Mon Nov 12, 2012 3:05 pm
x 2

Re: Background Resource Loading

Post by limesX »

Solved it.
The line:
Ogre::BackgroundProcessTicket ticket = Ogre::ResourceBackgroundQueue::getSingleton.load("Mesh", "test_model.mesh", "TEST_GROUP", false, 0, 0, this);
should be Ogre::BackgroundProcessTicket ticket = Ogre::ResourceBackgroundQueue::getSingleton.load("Mesh2", "test_model.mesh", "TEST_GROUP", false, 0, 0, this);
Post Reply