Skip to content

Commit

Permalink
testgles2: Fix buffer object sizes
Browse files Browse the repository at this point in the history
  • Loading branch information
capehill authored and icculus committed Apr 5, 2022
1 parent a5672b8 commit 006a5a9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/testgles2.c
Original file line number Diff line number Diff line change
Expand Up @@ -712,13 +712,13 @@ main(int argc, char *argv[])

GL_CHECK(ctx.glGenBuffers(1, &data->position_buffer));
GL_CHECK(ctx.glBindBuffer(GL_ARRAY_BUFFER, data->position_buffer));
GL_CHECK(ctx.glBufferData(GL_ARRAY_BUFFER, sizeof(_vertices) * 4, _vertices, GL_STATIC_DRAW));
GL_CHECK(ctx.glBufferData(GL_ARRAY_BUFFER, sizeof(_vertices), _vertices, GL_STATIC_DRAW));
GL_CHECK(ctx.glVertexAttribPointer(data->attr_position, 3, GL_FLOAT, GL_FALSE, 0, 0));
GL_CHECK(ctx.glBindBuffer(GL_ARRAY_BUFFER, 0));

GL_CHECK(ctx.glGenBuffers(1, &data->color_buffer));
GL_CHECK(ctx.glBindBuffer(GL_ARRAY_BUFFER, data->color_buffer));
GL_CHECK(ctx.glBufferData(GL_ARRAY_BUFFER, sizeof(_colors) * 4, _colors, GL_STATIC_DRAW));
GL_CHECK(ctx.glBufferData(GL_ARRAY_BUFFER, sizeof(_colors), _colors, GL_STATIC_DRAW));
GL_CHECK(ctx.glVertexAttribPointer(data->attr_color, 3, GL_FLOAT, GL_FALSE, 0, 0));
GL_CHECK(ctx.glBindBuffer(GL_ARRAY_BUFFER, 0));

Expand Down

0 comments on commit 006a5a9

Please sign in to comment.