Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/boomer.nim
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ proc main() =
let h = screenshot.image.height.float32
var
vao, vbo, ebo: GLuint
vertices_foo = [
vertices = [
# Position Texture coords
[GLfloat w, 0, 1.0, 1.0], # Top right
[GLfloat w, h, 1.0, 0.0], # Bottom right
Expand All @@ -379,14 +379,14 @@ proc main() =
glBindVertexArray(vao)

glBindBuffer(GL_ARRAY_BUFFER, vbo)
glBufferData(GL_ARRAY_BUFFER, size = GLsizeiptr(sizeof(vertices_foo)),
addr vertices_foo, GL_STATIC_DRAW)
glBufferData(GL_ARRAY_BUFFER, size = GLsizeiptr(sizeof(vertices)),
addr vertices, GL_STATIC_DRAW)

glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, ebo);
glBufferData(GL_ELEMENT_ARRAY_BUFFER, size = GLsizeiptr(sizeof(indices)),
addr indices, GL_STATIC_DRAW);

var stride = GLsizei(vertices_foo[0].len * sizeof(GLfloat))
var stride = GLsizei(vertices[0].len * sizeof(GLfloat))

glVertexAttribPointer(0, 2, cGL_FLOAT, false, stride, cast[pointer](0))
glEnableVertexAttribArray(0)
Expand Down