render: re-add texCoord vertex attribute
This commit is contained in:
parent
d8d7fe8233
commit
74283d7147
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user