clarifying density

This commit is contained in:
Loic Nageleisen 2014-04-27 16:04:34 +02:00
parent d31785c5a1
commit a86e49d505

View file

@ -298,7 +298,8 @@ func render(textures map[string]gl.Texture, lists map[string]uint) {
// set viewport // set viewport
width := float32(640.0) width := float32(640.0)
height := float32(480.0) height := float32(480.0)
gl.Viewport(0, 0, int(width)*2, int(height)*2) // times 2 because HiDPI density := 2 // times 2 because HiDPI
gl.Viewport(0, 0, int(width)*density, int(height)*density)
gl.MatrixMode(gl.PROJECTION) gl.MatrixMode(gl.PROJECTION)
gl.LoadIdentity() gl.LoadIdentity()
gl.Ortho(0, float64(width), 0, float64(height), -1.0, 1.0) gl.Ortho(0, float64(width), 0, float64(height), -1.0, 1.0)