From f3a34665978729ef65010ac2a4a9408e27d5bf3e Mon Sep 17 00:00:00 2001 From: ccolin Date: Mon, 28 Dec 2020 17:36:45 +0100 Subject: skybox --- src/opengl_mesh.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/opengl_mesh.cc') 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 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); -- cgit v1.2.3-70-g09d2