fixed the glyph panic, this still is very wrong

This commit is contained in:
2020-02-05 00:15:08 -08:00
parent f3f52becb4
commit 1fde36e42c
5 changed files with 121 additions and 23 deletions

View File

@@ -8,8 +8,30 @@ Creation-Date: 2020-02-03T23:57:15-08:00
===== Details =====
Canvas frame
**<notes>**
Canvas frame is at it's core, an accumulator of meta data to draw to the screen.
At the moment it is split up into these groups:
* Colored items like non-textured sprites are just a list of triangles, simple vertices.
@todo
* Textured are grouped by their texture handle. Currently implemented as a list of lists of vertices. I don't think the vertices need to be grouped by sprite as long as they are triangle lists with texture coords included in the definition
* Images are just the same as Textured
* Text is a simple Font->Glyph lookup. XY coords of the font and the ASCII code
{{{code: lang="rust" linenumbers="True"
colored_drawables: Vec<RuntimeVertexDef>
textured_drawables: HashMap<Arc<CanvasTextureHandle>, Vec<Vec<RuntimeVertexDef>>>
image_drawables: HashMap<Arc<CanvasImageHandle>, Vec<Vec<RuntimeVertexDef>>>
text_drawables: HashMap<Arc<CanvasFontHandle>, Vec<GlyphInstance>>
}}}
===== Future =====
I like this immediate interface for this simple style of UI and drawing.
@todo finish this
--------------------