Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Game Development
  4. GLTF importer with C++ Qt
Forum Updated to NodeBB v4.3 + New Features

GLTF importer with C++ Qt

Scheduled Pinned Locked Moved Unsolved Game Development
2 Posts 2 Posters 687 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    MadMcCrow
    wrote on last edited by
    #1

    Hi !
    I have started writing a GLTF parser with Qt for my pet project (a multi plateform game engine) and so I initially used the Json system : https://github.com/this-engine/this/blob/qt-this/src/extra/gltf_importer.cpp
    But I've noticed Qt already has a GLTF parser in the Qt3D module. Unfortunately I don't see how to use it without using Qt3D as my renderer.
    Anyway I'm stuck at trying to read a data URI :

      "uri" : "data:application/gltf-buffer;base64,AAAIAAcAAAABAAgAAQAJAAgAAQACAAkAAgAKAAkAAgADAAoAAwALAAoAAwAEAAsABAAMAAsABAAFAAwABQANAAwABQAGAA0AAAAAAAAAAAAAAAAAAACAPwAAAAAAAAAAAAAAQAAAAAAAAAAAAABAQAAAAAAAAAAAAACAQAAAAAAAAAAAAACgQAAAAAAAAAAAAADAQAAAAAAAAAAAAAAAAAAAgD8AAAAAAACAPwAAgD8AAAAAAAAAQAAAgD8AAAAAAABAQAAAgD8AAAAAAACAQAAAgD8AAAAAAACgQAAAgD8AAAAAAADAQAAAgD8AAAAACAAKAAwAAAAAAIA/AAAAQAAAAAAAAEBAAABAQAAAAAAAAKBAAACAQAAAAAA=",
    

    for now, I've detected the type, the base, but how to interpret that long string and convert it to a QByteArray

    Did anyone tried doing gltf import? Did you succeed? Am I missing an obviously simple solution?

    Thank you in advance !

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      As the string suggests, it's base64 encoded. Therefore you can use QByteArray::fromBase64 to load the data that is available after the "base64,".

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      2

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved