Skip to content

Ogre v2-1 glTF2.0 loader plugin v0.1

Pre-release
Pre-release
Compare
Choose a tag to compare
@Ybalrid Ybalrid released this 16 Jul 10:12
· 71 commits to master since this release
25d8928

This is the first release of the plugin for Ogre v2-1!

It support loading of single-mesh glTF files (same content as you would find in an Ogre .mesh file)

.gltf + their accompanying files are loadable by directly accessing the file system.

.glb files are loadable from Ogre resource group, and from direct file system access.

I would recommend you to use .glb files from Ogre resources.

There are probably lots of bugs to find at the moment, I expect this plugin to break easily if there are some non handled edge cases on your glTF files. If this happens to you PLEASE Open an issue here, and provide the file that does not work, so that the problem can be solved!

Included here is a build of the source code for Windows made with Visual Studio 2017 and the necessary header files to access the functionality once the plugin's DLL was loaded. project README contains some usage information, but basically :

  • Point your compiler to the public headers (the /include directory of the repository), or copy them to
  • Point Ogre to use Ogre_glTF as a plugin in the same way you'll do to the other (e.g. RenderSystems, using plugin.cfg, ...)
  • You can put binary glTF files (GLB files) inside your resources, like you would do with .mesh/.skeleton/textures files
  • In your code:
//Get access to the gltf loader, and load a GLB file in the resources to an item
//This actually search through the list of installed plugin, keep that pointer somewhere convinient
auto glTFLoader = gltfPluginAccessor::findPlugin()->getLoader(); 

//You can creae an Item for a scene by giving the name of the GLB file to look for in the resources
Ogre::Item* cesiumMan = glTFLoader->getItemFromResource("CesiumMan.glb, smgr);