diff --git a/internal/render/render_world_helper.go b/internal/render/render_world_helper.go index db190c7..bf40145 100644 --- a/internal/render/render_world_helper.go +++ b/internal/render/render_world_helper.go @@ -9,11 +9,17 @@ import ( var ( screenQuadVerts = []float32{ -1, -1, + 0, 0, 1, -1, + 1, 0, + 1, 1, 1, 1, -1, -1, + 0, 0, + 1, 1, 1, 1, -1, 1, + 0, 1, } screenQuadVAO uint32 screenQuadVBO uint32 @@ -27,8 +33,10 @@ func initScreenQuad() { gl.GenVertexArrays(1, &screenQuadVAO) gl.BindVertexArray(screenQuadVAO) - gl.VertexAttribPointer(0, 2, gl.FLOAT, false, int32(2*unsafe.Sizeof(float32(0))), gl.PtrOffset(0)) + gl.VertexAttribPointer(0, 2, gl.FLOAT, false, int32(4*unsafe.Sizeof(float32(0))), gl.PtrOffset(0)) + gl.VertexAttribPointer(1, 2, gl.FLOAT, false, int32(4*unsafe.Sizeof(float32(0))), gl.PtrOffset(int(2*unsafe.Sizeof(float32(0))))) gl.EnableVertexAttribArray(0) + gl.EnableVertexAttribArray(1) } // drawScreenQuad draws a Quad covering the entire screen.