Unable to write GLB with 0 buffers
See original GitHub issueMy 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:
- Created 2 years ago
- Comments:9 (5 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I’m not quite sure how best to export a file like this; asking for clarification in https://github.com/KhronosGroup/glTF/issues/1975.
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!