The problem is, that in debug mode, the only thing I see is the wireframe: What I would like to see is: wireframe together with rendering of my scene and 3d models, like here:
http://www.opengl-tutorial.org/assets/i ... tDebug.png
My draw line code below:
Code: Select all
virtual void drawLine(const btVector3& from, const btVector3& to, const btVector3& color)
{
// Vertex data
GLfloat points[12];
points[0] = from.x();
points[1] = from.y();
points[2] = from.z();
points[3] = color.x();
points[4] = color.y();
points[5] = color.z();
points[6] = to.x();
points[7] = to.y();
points[8] = to.z();
points[9] = color.x();
points[10] = color.y();
points[11] = color.z();
glGenBuffers(1, &vertexbuffer);
glGenVertexArrays(1, &VertexArrayID);
glBindVertexArray(VertexArrayID);
glBindBuffer(GL_ARRAY_BUFFER, vertexbuffer);
glBufferData(GL_ARRAY_BUFFER, sizeof(points), &points, GL_STATIC_DRAW);
glEnableVertexAttribArray(0);
glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 6 * sizeof(GLfloat), 0);
glEnableVertexAttribArray(1);
glVertexAttribPointer(1, 3, GL_FLOAT, GL_FALSE, 6 * sizeof(GLfloat), (GLvoid*)(3 * sizeof(GLfloat)));
glDrawArrays(GL_LINES, 0, 2);
glBindVertexArray(0);
}