• Runtimes
  • Guidance for implementing custom runtime in Vulkan

I'm currently implementing support for Spine in my toy engine and I could use some guidance. I'm a point where I'm trying to draw a Spine animation on screen.

My toy engine is written in C++17 and Vulkan.

I've been following the generic runtime documentation. It's definitely a good overview, but it lacks in-depth code examples.

  1. Are there code examples for drawing using Vulkan and C/C++, or something close to it?
  2. In general, for drawing animations, are engines expected to upload per-vertex data (position, coords, etc) every frame to the GPU ? Or can vertex info be uploaded once, and thereafter transformed using matrices?
Related Discussions
...
  • Изменено

Have you seen the Spine C++ documentation? It gives an overview of what's involved when creating your own renderer: Spine-cpp Runtime Documentation

To render a Spine skeleton you need to be able to render textured triangle soups with per vertex color and blending at a minimum. The mesh data is usually uploaded per frame, as Spine allows a vertex to be weighted by an arbitrary number of bones. Spine also supports free form deformation (keying position of vertices) which can't be easily done on the GPU. However, if you can fit the matrix palette into GPU side buffers, and don't use free form deformation, GPU side skinning is definitely possible.

We don't have an example for Vulkan, but you might find the renderer for SFML informative: spine-runtimes/spine-sfml.cpp at 3.7