Hi, all!
For several purposes (physics, procedural generation) I need to load some Ogre's .mesh and .gltf files directly bypassing uploading them to GPU
as it is useless clutter there and might become a problem later, as this is information being interesting on CPU side, but also I'd like to benefit from format support and not reinvent wheel writing my own custom mesh format/loader. Any ideas? As special note because of need of some auto batch processing that would be important to be able to run in total GPU-less headless environment totally in software.
Bypassing GPU for mesh loading and reading
-
slapin
- Bronze Sponsor

- Posts: 362
- Joined: Fri May 23, 2025 5:04 pm
- x 26
Bypassing GPU for mesh loading and reading
-
paroj
- OGRE Team Member

- Posts: 2278
- Joined: Sun Mar 30, 2014 2:51 pm
- x 1241
-
slapin
- Bronze Sponsor

- Posts: 362
- Joined: Fri May 23, 2025 5:04 pm
- x 26
Re: Bypassing GPU for mesh loading and reading
Will try that, thanks!
-
slapin
- Bronze Sponsor

- Posts: 362
- Joined: Fri May 23, 2025 5:04 pm
- x 26
Re: Bypassing GPU for mesh loading and reading
@paroj
Well, I found no way to use it when loading mesh from file.
I'd appreciate an example.
-
paroj
- OGRE Team Member

- Posts: 2278
- Joined: Sun Mar 30, 2014 2:51 pm
- x 1241
Re: Bypassing GPU for mesh loading and reading
Code: Select all
DefaultHardwareBufferManager dmgr;
auto mesh = MeshManager::getSingleton().getByName("my.mesh");
mesh->setHardwareBufferManager(&dmgr)
mesh->load();-
slapin
- Bronze Sponsor

- Posts: 362
- Joined: Fri May 23, 2025 5:04 pm
- x 26
Re: Bypassing GPU for mesh loading and reading
Thanks a lot!
-
slapin
- Bronze Sponsor

- Posts: 362
- Joined: Fri May 23, 2025 5:04 pm
- x 26
Re: Bypassing GPU for mesh loading and reading
Code: Select all
DefaultHardwareBufferManager dmgr;
crashes in case there is hardware buffer manager already initialized (in normal app).
It works in headless tool but I need it to work in normal app too.
If I don't use it I get everything through GPU ![]()
-
paroj
- OGRE Team Member

- Posts: 2278
- Joined: Sun Mar 30, 2014 2:51 pm
- x 1241
Re: Bypassing GPU for mesh loading and reading
use DefaultHardwareBufferManagerBase