Skip to content

FishOfTheNorthStar/lv_gltf_viewer

 
 

Repository files navigation

lv_gltf_viewer

A simple glTF file viewer, made using the LVGL 3dtexture widget.

example running screenclip one

Ensure GLFW is installed for this example.

Getting Started

git clone <TODO>
git submodule update --init
cmake -B build
cmake --build build -j$(nproc)
./build/gltf_view -in ./gltfs/logo1.glb

The STB Image library is included temporarily, just copied from the latest build. Ultimately it should probably be added as a git submodule, but it seems like that will add a few other things that aren't necessary so I'd like to look into a more minimal install for that.


To make this the default gltf / glb file viewer on your Raspberry Pi, you can do the following:

(from the root directory of this project)

cp ./EXAMPLE_gltf-view.desktop ~/.local/share/applications/gltf-view.desktop
xdg-mime default gltf-view.desktop model/gltf-binary
xdg-mime default gltf-view.desktop model/gltf-json

Now when you double click a gltf file in your file-manager, it should open glTF-View.

You can confirm the mime-types are setup correctly by viewing

~/.config/mimeapps.list

More Samples:

example running screenclip two

example running screenclip three

About

glTF File Viewer

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 54.7%
  • C 45.2%
  • Other 0.1%