diff options
author | ccolin | 2020-12-28 17:36:45 +0100 |
---|---|---|
committer | ccolin | 2020-12-28 17:36:45 +0100 |
commit | f3a34665978729ef65010ac2a4a9408e27d5bf3e (patch) | |
tree | e8f4d6f2402c9b7113e33684f64b82a98d990313 /src/opengl_mesh.cc | |
parent | ef37119f4e94c83a6357ebc0b94a39e4e53b20d7 (diff) |
skybox
Diffstat (limited to 'src/opengl_mesh.cc')
-rw-r--r-- | src/opengl_mesh.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/opengl_mesh.cc b/src/opengl_mesh.cc index 6e1ff72..f2f0981 100644 --- a/src/opengl_mesh.cc +++ b/src/opengl_mesh.cc @@ -10,8 +10,8 @@ OpenGLMesh::OpenGLMesh(QVector<float> verts, QOpenGLTexture *tex) QOpenGLFunctions_4_4_Core *glf = OpenGLWidget::instance; nverts = verts.size() / 8; glf->glGenVertexArrays(1, &vao); - glf->glGenBuffers(1, &vbo); glf->glBindVertexArray(vao); + glf->glGenBuffers(1, &vbo); glf->glBindBuffer(GL_ARRAY_BUFFER, vbo); glf->glBufferData(GL_ARRAY_BUFFER, nverts * 8 * sizeof (float), verts.data(), GL_STATIC_DRAW); glf->glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 8 * sizeof (float), 0); |