Make SizeU/SizeV uniforms instead of per-vertex+reduce glyph info

This commit is contained in:
bloeys
2022-07-03 22:08:40 +04:00
parent 9c09814322
commit afb5453a3a
4 changed files with 78 additions and 106 deletions

View File

@ -181,7 +181,7 @@ func (p *program) drawGrid() {
sizeY := float32(p.GlyphRend.ScreenHeight)
//columns
adv := p.GlyphRend.Atlas.Glyphs['A'].Advance
adv := p.GlyphRend.Atlas.Advance
for i := int32(0); i < p.GlyphRend.ScreenWidth; i += int32(adv) {
p.rend.Draw(p.gridMesh, gglm.NewTrMatId().Translate(gglm.NewVec3(float32(i)+0.5, sizeY/2, 0)).Scale(gglm.NewVec3(1, sizeY, 1)), p.gridMat)
}