diff --git a/video/font.go b/video/font.go index 613f50ff..07780b81 100644 --- a/video/font.go +++ b/video/font.go @@ -194,11 +194,11 @@ func LoadTrueTypeFont(program uint32, r io.Reader, scale int32, low, high rune, vertAttrib := uint32(gl.GetAttribLocation(f.program, gl.Str("vert\x00"))) gl.EnableVertexAttribArray(vertAttrib) - gl.VertexAttribPointer(vertAttrib, 2, gl.FLOAT, false, 4*4, gl.PtrOffset(0)) + gl.VertexAttribPointerWithOffset(vertAttrib, 2, gl.FLOAT, false, 4*4, 0) texCoordAttrib := uint32(gl.GetAttribLocation(f.program, gl.Str("vertTexCoord\x00"))) gl.EnableVertexAttribArray(texCoordAttrib) - gl.VertexAttribPointer(texCoordAttrib, 2, gl.FLOAT, false, 4*4, gl.PtrOffset(2*4)) + gl.VertexAttribPointerWithOffset(texCoordAttrib, 2, gl.FLOAT, false, 4*4, 2*4) gl.BindBuffer(gl.ARRAY_BUFFER, 0) bindVertexArray(0) diff --git a/video/video.go b/video/video.go index 2e536d2f..c96a342e 100644 --- a/video/video.go +++ b/video/video.go @@ -187,11 +187,11 @@ func (video *Video) Configure(fullscreen bool) { vertAttrib := uint32(gl.GetAttribLocation(video.program, gl.Str("vert\x00"))) gl.EnableVertexAttribArray(vertAttrib) - gl.VertexAttribPointer(vertAttrib, 2, gl.FLOAT, false, 4*4, gl.PtrOffset(0)) + gl.VertexAttribPointerWithOffset(vertAttrib, 2, gl.FLOAT, false, 4*4, 0) texCoordAttrib := uint32(gl.GetAttribLocation(video.program, gl.Str("vertTexCoord\x00"))) gl.EnableVertexAttribArray(texCoordAttrib) - gl.VertexAttribPointer(texCoordAttrib, 2, gl.FLOAT, false, 4*4, gl.PtrOffset(2*4)) + gl.VertexAttribPointerWithOffset(texCoordAttrib, 2, gl.FLOAT, false, 4*4, 2*4) // Some cores won't call SetPixelFormat, provide default values if video.pixFmt == 0 {