Update to lastest Go-Glut release
This commit is contained in:
parent
a37314d721
commit
99b0e2a2de
1 changed files with 2 additions and 3 deletions
|
@ -4,7 +4,6 @@ import (
|
||||||
"image"
|
"image"
|
||||||
"exp/draw"
|
"exp/draw"
|
||||||
"gl"
|
"gl"
|
||||||
"unsafe"
|
|
||||||
"freetype-go.googlecode.com/hg/freetype/raster"
|
"freetype-go.googlecode.com/hg/freetype/raster"
|
||||||
"draw2d.googlecode.com/hg/draw2d"
|
"draw2d.googlecode.com/hg/draw2d"
|
||||||
//"log"
|
//"log"
|
||||||
|
@ -41,8 +40,8 @@ func (p *GLPainter) Flush() {
|
||||||
if len(p.vertices) != 0 {
|
if len(p.vertices) != 0 {
|
||||||
gl.EnableClientState(gl.COLOR_ARRAY)
|
gl.EnableClientState(gl.COLOR_ARRAY)
|
||||||
gl.EnableClientState(gl.VERTEX_ARRAY)
|
gl.EnableClientState(gl.VERTEX_ARRAY)
|
||||||
gl.ColorPointer(4, gl.UNSIGNED_BYTE, 0, unsafe.Pointer(&(p.colors[0])))
|
gl.ColorPointer(4, 0, p.colors)
|
||||||
gl.VertexPointer(2, gl.INT, 0, unsafe.Pointer(&(p.vertices[0])))
|
gl.VertexPointer(2, 0, p.vertices)
|
||||||
|
|
||||||
// draw lines
|
// draw lines
|
||||||
gl.DrawArrays(gl.LINES, 0, len(p.vertices)/2)
|
gl.DrawArrays(gl.LINES, 0, len(p.vertices)/2)
|
||||||
|
|
Loading…
Reference in a new issue