diff --git a/gui/gui.go b/gui/gui.go index b2f9db9..bb6531d 100644 --- a/gui/gui.go +++ b/gui/gui.go @@ -146,8 +146,7 @@ func (gui *GUI) Render() error { // stop smoothing fonts - //gl.Enable(gl.DEPTH_TEST) - //gl.DepthFunc(gl.LESS) + gl.Disable(gl.DEPTH_TEST) gl.TexParameterf(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST) //glfw.SwapInterval(1) diff --git a/gui/renderer.go b/gui/renderer.go index f83664c..fd8d764 100644 --- a/gui/renderer.go +++ b/gui/renderer.go @@ -251,7 +251,7 @@ func (r *OpenGLRenderer) DrawCell(cell *buffer.Cell, col int, row int) { } rect.setColour(bg) gl.BindVertexArray(rect.vao) - gl.DrawArrays(gl.TRIANGLES, 0, 6) + gl.DrawArrays(gl.TRIANGLE_STRIP, 0, 6) } var alpha float32 = 1 diff --git a/vendor/github.com/liamg/glfont/font.go b/vendor/github.com/liamg/glfont/font.go index 20617a6..802e097 100644 --- a/vendor/github.com/liamg/glfont/font.go +++ b/vendor/github.com/liamg/glfont/font.go @@ -219,7 +219,7 @@ func (f *Font) Height(scale float32, text string) float32 { baseHeight = height height = 0 } - + //skip runes that are not in font chacter range if int(runeIndex)-int(lowChar) > len(f.fontChar) || runeIndex < lowChar { continue @@ -229,7 +229,7 @@ func (f *Font) Height(scale float32, text string) float32 { ch := f.fontChar[runeIndex-lowChar] // Now advance cursors for next glyph (note that advance is number of 1/64 pixels) - if float32(ch.height) * scale > height { + if float32(ch.height)*scale > height { height = float32(ch.height) * scale }