diff -r fe094d0687ad -r c27612f0eac0 src/gl/compiler.cpp
--- a/src/gl/compiler.cpp Wed Jun 22 23:51:06 2022 +0300
+++ b/src/gl/compiler.cpp Sun Jun 26 19:44:45 2022 +0300
@@ -16,9 +16,6 @@
* along with this program. If not, see .
*/
-#define GL_GLEXT_PROTOTYPES
-#include
-#include
#include
#include "gl/compiler.h"
#include "documentmanager.h"
@@ -213,8 +210,10 @@
shader.program->setAttributeBuffer(0, GL_FLOAT, offsetof(Vertex, position), 3, stride);
shader.program->setAttributeBuffer(1, GL_FLOAT, offsetof(Vertex, color), 4, stride);
shader.program->setAttributeBuffer(2, GL_FLOAT, offsetof(Vertex, normal), 3, stride);
- glVertexAttribIPointer(3, 1, GL_INT, stride, reinterpret_cast(offsetof(Vertex, id)));
- glVertexAttribIPointer(4, 1, GL_INT, stride, reinterpret_cast(offsetof(Vertex, selected)));
+ const void* vertexptr = reinterpret_cast(offsetof(Vertex, id));
+ glfunc().glVertexAttribPointer(3, 1, GL_INT, GL_FALSE, stride, vertexptr);
+ const void* selectedptr = reinterpret_cast(offsetof(Vertex, selected));
+ glfunc().glVertexAttribPointer(4, 1, GL_INT, GL_FALSE, stride, selectedptr);
shader.vertexArray.release();
shader.buffer.release();
shader.program->release();
@@ -350,7 +349,8 @@
}
const GLsizeiptr size = static_cast(vector.size() * sizeof vector[0]);
object.buffer.bind();
- glBufferSubData(GL_ARRAY_BUFFER, 0, size, vector.data());
+ QOpenGLFunctions glfunc;
+ glfunc.glBufferSubData(GL_ARRAY_BUFFER, 0, size, vector.data());
object.buffer.release();
}
}