Polygon triangulation renderer
Jerboa-app opened this issue · comments
- port triangulation code
- refactor sRender to use sSpriteRender
- polygon component
- implement sDynamicSpriteRender to use polygon components
- pass to sRender to render rigged objects
Rigging polygon can be any polygon + triangulation
Routines to construct one from collision mesh/ v.v.
sRender will take in sprites as current, and rigged renderables as well
sSpriteRender will take in sprite renderables (as all were before)
sDynamicSpriteRender will take in those that also have riggin polygons
sRender will be an interface to use both seamlessly
Sprite
Dynamic components
- Shader/s
- Texture/s
Fixed size object (can have render frames though)
- Quad (pos and tex coords)
- translation (vec4)
- colour (vec4)
- atlas coords (vec4)
- util (vec4
ProceduralSprite
Dynamic sized components
- Triangulation pos coords - gets changed as object shifts, N = n * 3 * 2
- Triangulation tex coords - static for uv mapping, N
- Colour, N
Fixed size components
- Atlas coords (vec4)
- Util (vec4)