Refactoring Notes

Update 1

  • Overall refactoring was successful - code compiles and deploys much more nicely than it ever has before. There's still a strong dependency on relative paths to content, but precise duplication of the data/ and src/Shaders/ directory should be enough to generate an independent build.
  • MeshInstance has inlined types for skeleton access (including pointer to actual skeleton type, SSBOs for skinning), surface access (normals, display shader and VAO, deformations), and skinning (shader, VAO, and connection to skin weights)
  • Current issue: rendering is broken somewhere. not anymore!
  • The display shader doesn't seem to be working at all.
  • I can render the XFB geometry with immediate mode, but the vertices aren't responding to skeleton changes.
  • Checking into SSBO binding to make sure I'm doing it right. I used to just have 2, now I have like 6.

Initial

  • Dissecting Laplacian Surface Editor class and scattering its unrelated-but-still-essential parts to more permanent homes in other scopes.
  • Reorganized SkeletonMeshMapping into a more generic SkeletonBinding container. Types that derive from SkeletonBinding can overload the binding behavior for whatever affect we're trying to capture. The two current derivations are:
  1. cut plane binding, and
  2. loaded skin weight binding
  • Dividing the Mesh class up into separate pieces. Now Mesh is strictly a container for the geometry, and MeshInstance is the object used for interaction.
  • Each MeshInstance has a reference to the Mesh it loaded.
  • The construction of MeshInstances ensures that there are no duplicate Mesh objects in memory.
  • A Mesh stores its own data on the GPU, and its up to the MeshInstance to utilize this storage when setting up rendering commands (binding to vertex attributes, element arrays, etc.)
  • Shader construction is more generic. Added a StagedShader that makes loading skinning shaders fairly quick.
  • Culled the skinning shader types to classic LBS/DQS and incremental rotation skinning. Haven't touched differential blending or bounded biharmonic weights in a long time.
  • MeshInstance object contains inlined types and structs that organize its internal mechanics. This was definitely inspired by Carmack's words on inlining functions.
  • Transform feedback to store the results of skinning
  • Geometry buffer (G-Buffer) to provide screen-coordinate lookup to anything that gets put on the screen
    • Same old silhouette vertex detector, except there's no need for a separate object, so this is now just a function in GBuffer