mirror of
https://github.com/bloeys/nterm.git
synced 2025-12-29 14:38:19 +00:00
Make SizeU/SizeV uniforms instead of per-vertex+reduce glyph info
This commit is contained in:
2
main.go
2
main.go
@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user