qmuntal / gltf

Go library for encoding glTF 2.0 files
https://www.khronos.org/gltf/
BSD 2-Clause "Simplified" License
241 stars 32 forks source link

How about a Hello World? #44

Open andrebolle opened 2 years ago

andrebolle commented 2 years ago

Hi,

I'm very new to Go and gltf. Is there any chance of you (or someone else) adding a "Hello World" example to display a rotating cube? The program would read a gltf file (e.g. Box.gltf) using gltf.Open and extract the necessary vertices to display a rotating cube using the simplest vertex and frag shaders.

My main difficulty is going from opening a gltf.Document to displaying something. An example would be nice.

Thanks Andre

qmuntal commented 2 years ago

I haven't used this library to render meshes using simple shader that works for a helloworld. You may have more luck checking other projects depending on qmunta/gltf: https://github.com/qmuntal/gltf/network/dependents

Anyway, I'll add this to my TODO list.

xackery commented 2 years ago

Just popping in here to say would love it too. I've been struggling to get this library to generate gltf from scratch, which I believe is noted inside the readme as something not fully covered.. tried to peruse other folks usage but not seeing many trying to do what I am