Here is a little preview of a work in progress…
The video demo both a new “buffer” resource type and a new “mesh” component. The buffer resource is essentially a resource version of a
dmBuffer::HBuffer, and the mesh component is a very simple component that uses buffers and renders them as vertex buffers. Combining these should open up a lot of new possibilities; custom meshes, implementing the official Spine runtime as a native extension, or why not write your own custom particle/sprite system?
Buffer resources, just as runtime
dmBuffers , can include any combination of streams and types. This means that you can supply positions, multiple uv coords, normals, tangent vectors etc… Essentially whatever you like, as long as the material attached has attributes for them. For this demo I wrote a simple script that convert OBJ files into
.buffer files. Together with our plans for editor extensions, I think this can result in some really awesome Defold libraries.
.buffer resources turns into
dmBuffers at runtime, we already have a runtime API to modify them (shown last in the video above where I modify the position stream for the buffer when dragging the mouse pointer).
As always, I want to point out this is an early WIP and things might change drastically. It’s currently being prototyped together with the design for custom meshes and has already gone through a couple of different ideas, but I have a feeling we are on to something here.