This commit is contained in:
Liam Galvin 2018-08-09 18:03:33 +01:00
parent 2ea6f067c5
commit 83988cd2ce
3 changed files with 4 additions and 5 deletions

View File

@ -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)

View File

@ -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

View File

@ -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
}