29 initializeOpenGLFunctions();
31 const auto& mesh = geometry.
m_mesh;
34 QOpenGLVertexArrayObject::Binder dummy(&
m_vao);
40 glEnableVertexAttribArray(0);
41 glEnableVertexAttribArray(1);
43 glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 2 *
sizeof(
Vector3D),
nullptr);
44 glVertexAttribPointer(1, 3, GL_FLOAT, GL_FALSE, 2 *
sizeof(
Vector3D),
45 reinterpret_cast<void*
>(
sizeof(
Vector3D)));
50 QOpenGLVertexArrayObject::Binder dummy(&
m_vao);
56 initializeOpenGLFunctions();
58 QOpenGLVertexArrayObject::Binder dummy(&
m_vao3DAxes);
61 const GLfloat vertices3DAxes[] = {
62 0.00f, 0.00f, 0.00f, 1.0f, 0.0f, 0.0f,
63 cx * 1.00f, 0.00f, 0.00f, 1.0f, 0.0f, 0.0f, cx * 1.00f,
64 0.00f, 0.00f, 1.0f, 0.0f, 0.0f, cx * 0.95f, cz * 0.05f,
65 cz * 0.05f, 1.0f, 0.0f, 0.0f, cx * 1.00f, 0.00f, 0.00f,
66 1.0f, 0.0f, 0.0f, cx * 0.95f, cz * 0.05f, cz * -0.05f, 1.0f,
67 0.0f, 0.0f, cx * 1.00f, 0.00f, 0.00f, 1.0f, 0.0f,
68 0.0f, cx * 0.95f, cz * -0.05f, cz * 0.05f, 1.0f, 0.0f, 0.0f,
69 cx * 1.00f, 0.00f, 0.00f, 1.0f, 0.0f, 0.0f, cx * 0.95f,
70 cz * -0.05f, cz * -0.05f, 1.0f, 0.0f, 0.0f,
72 0.00f, 0.00f, 0.00f, 0.0f, 1.0f, 0.0f,
73 0.00f, cx * 1.00f, 0.00f, 0.0f, 1.0f, 0.0f, 0.00f,
74 cx * 1.00f, 0.00f, 0.0f, 1.0f, 0.0f, cz * 0.05f, cx * 0.95f,
75 cz * 0.05f, 0.0f, 1.0f, 0.0f, 0.00f, cx * 1.00f, 0.00f,
76 0.0f, 1.0f, 0.0f, cz * 0.05f, cx * 0.95f, cz * -0.05f, 0.0f,
77 1.0f, 0.0f, 0.00f, cx * 1.00f, 0.00f, 0.0f, 1.0f,
78 0.0f, cz * -0.05f, cx * 0.95f, cz * 0.05f, 0.0f, 1.0f, 0.0f,
79 0.00f, cx * 1.00f, 0.00f, 0.0f, 1.0f, 0.0f, cz * -0.05f,
80 cx * 0.95f, cz * -0.05f, 0.0f, 1.0f, 0.0f,
82 0.00f, 0.00f, 0.00f, 0.0f, 0.0f, 1.0f,
83 0.00f, 0.00f, cz * 1.00f, 0.0f, 0.0f, 1.0f, 0.00f,
84 0.00f, cz * 1.00f, 0.0f, 0.0f, 1.0f, cz * 0.05f, cz * 0.05f,
85 cz * 0.95f, 0.0f, 0.0f, 1.0f, 0.00f, 0.00f, cz * 1.00f,
86 0.0f, 0.0f, 1.0f, cz * 0.05f, cz * -0.05f, cz * 0.95f, 0.0f,
87 0.0f, 1.0f, 0.00f, 0.00f, cz * 1.00f, 0.0f, 0.0f,
88 1.0f, cz * -0.05f, cz * 0.05f, cz * 0.95f, 0.0f, 0.0f, 1.0f,
89 0.00f, 0.00f, cz * 1.00f, 0.0f, 0.0f, 1.0f, cz * -0.05f,
90 cz * -0.05f, cz * 0.95f, 0.0f, 0.0f, 1.0f,
99 glEnableVertexAttribArray(0);
100 glEnableVertexAttribArray(2);
102 glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 6 *
sizeof(
float),
nullptr);
103 glVertexAttribPointer(2, 3, GL_FLOAT, GL_FALSE, 6 *
sizeof(
float),
104 reinterpret_cast<void*
>(3 *
sizeof(
float)));
109 QOpenGLVertexArrayObject::Binder dummy(&
m_vao3DAxes);
QOpenGLVertexArrayObject m_vao3DAxes
QOpenGLBuffer m_glBuffer3DAxes
QOpenGLVertexArrayObject m_vao