question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to write GLB with 0 buffers

See original GitHub issue

My use case is web and I want to export to .gltf/.glb files.

I’ll do that via simply downloading through the browser. I can handle that part, but it’d be helpful of the library to handle the rest (converting the Document to ArrayBuffer for glb, and a JSON string for the gltf). Not sure how to do that with the current state of the library.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
donmccurdycommented, May 3, 2021

I’m not quite sure how best to export a file like this; asking for clarification in https://github.com/KhronosGroup/glTF/issues/1975.

1reaction
donmccurdycommented, Apr 18, 2021

Your code looks right, does including document.createBuffer() fix that error? I believe the GLB export does require a buffer, which might be a bug in the library, it’s just unusual in this case because normally there would be vertex data or textures with binary data, and the camera doesn’t require any.

I’ll look into this more in a bit!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error: GLB must have 0–1 buffers. when writing glb #555
I'm trying to convert a gltf to glb. The gltf has this specificities: uses draco; uses texture transform; the textures and binaries are...
Read more >
GLTF loader API question - Babylon.js Forum
HI, Im trying to use the importMeshAsync method from the gltfLoader. I was able to split my glb data to obtain an object...
Read more >
OpenGL Uniform buffers? - Stack Overflow
In this process, there is a call to glDeleteBuffers() for buffer 0. ... According to documentation, buffer 0 will be silently ignored by...
Read more >
How to manually read GLTF files - WireWhiz
I'm currently working on a game engine, and one very important part of that is being able to import 3D models. And at...
Read more >
Chapter 3: Index Buffer Objects and Primitive Types
The GL_TRIANGLE_STRIP primitive type creates triangles out of every newly added vertex and its preceding two vertices. In the animation, P0 to P...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found