testgles2: Fix buffer object sizes

This commit is contained in:
capehill 2022-03-28 21:01:06 +03:00 committed by Ryan C. Gordon
parent a5672b858e
commit 006a5a9e03
1 changed files with 2 additions and 2 deletions

View File

@ -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));