From ecce5fdcc910feb74d8030ee46664f2f727c3120 Mon Sep 17 00:00:00 2001 From: faiface Date: Thu, 24 Nov 2016 14:37:11 +0100 Subject: [PATCH] some blank lines --- pixelgl/texture.go | 2 ++ pixelgl/vertex.go | 2 ++ 2 files changed, 4 insertions(+) diff --git a/pixelgl/texture.go b/pixelgl/texture.go index e7bd12a..f948ada 100644 --- a/pixelgl/texture.go +++ b/pixelgl/texture.go @@ -18,6 +18,7 @@ func NewTexture(parent BeginEnder, width, height int, pixels []uint8) (*Texture, defer parent.End() texture := &Texture{parent: parent} + err := DoGLErr(func() { gl.GenTextures(1, &texture.tex) gl.BindTexture(gl.TEXTURE_2D, texture.tex) @@ -40,6 +41,7 @@ func NewTexture(parent BeginEnder, width, height int, pixels []uint8) (*Texture, if err != nil { return nil, errors.Wrap(err, "failed to create a texture") } + return texture, nil } diff --git a/pixelgl/vertex.go b/pixelgl/vertex.go index 241da40..9ad6156 100644 --- a/pixelgl/vertex.go +++ b/pixelgl/vertex.go @@ -108,6 +108,7 @@ func NewVertexArray(parent BeginEnder, format VertexFormat, mode VertexDrawMode, format: format, mode: mode, } + err := DoGLErr(func() { gl.GenVertexArrays(1, &va.vao) gl.BindVertexArray(va.vao) @@ -139,6 +140,7 @@ func NewVertexArray(parent BeginEnder, format VertexFormat, mode VertexDrawMode, if err != nil { return nil, errors.Wrap(err, "failed to create a vertex array") } + return va, nil }