From 6a9f176d2337735d765fc3ca748316189eff73a7 Mon Sep 17 00:00:00 2001 From: SpaiR Date: Sat, 21 May 2022 11:28:05 +0300 Subject: [PATCH] Fix golangci-lint --- src/app/render/brush/brush.go | 2 +- src/app/render/brush/draw.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/render/brush/brush.go b/src/app/render/brush/brush.go index 25adcdd7..d0d83f14 100644 --- a/src/app/render/brush/brush.go +++ b/src/app/render/brush/brush.go @@ -96,7 +96,7 @@ func initAttributes() { var offset int32 for idx, attr := range attrsList.attrs { gl.EnableVertexAttribArray(uint32(idx)) - gl.VertexAttribPointer(uint32(idx), attr.size, attr.xtype, attr.normalized, attrsList.stride, gl.PtrOffset(int(offset))) + gl.VertexAttribPointerWithOffset(uint32(idx), attr.size, attr.xtype, attr.normalized, attrsList.stride, uintptr(offset)) offset += attr.size * attr.xtypeSize } diff --git a/src/app/render/brush/draw.go b/src/app/render/brush/draw.go index a5818ed7..d19574b3 100644 --- a/src/app/render/brush/draw.go +++ b/src/app/render/brush/draw.go @@ -37,9 +37,9 @@ func Draw(w, h, x, y, z float32) { switch c.mode { case mtRect: - gl.DrawElements(gl.TRIANGLES, c.len, gl.UNSIGNED_INT, gl.PtrOffset(c.offset)) + gl.DrawElementsWithOffset(gl.TRIANGLES, c.len, gl.UNSIGNED_INT, uintptr(c.offset)) case mtLine: - gl.DrawElements(gl.LINES, c.len, gl.UNSIGNED_INT, gl.PtrOffset(c.offset)) + gl.DrawElementsWithOffset(gl.LINES, c.len, gl.UNSIGNED_INT, uintptr(c.offset)) } }