Background Resource Loading Topic is solved

Design / architecture / roadmap discussions related to future of Ogre3D (version 2.0 and above)
Post Reply
limesX
Gnoblar
Posts: 12
Joined: Mon Nov 12, 2012 3:05 pm

Background Resource Loading

Post by limesX » Sat Nov 10, 2018 11:49 am

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
0 x

limesX
Gnoblar
Posts: 12
Joined: Mon Nov 12, 2012 3:05 pm

Re: Background Resource Loading

Post by limesX » Sat Nov 10, 2018 2:53 pm

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);
0 x

Post Reply