Sorry for replying so late. I was on vacation. Thank you for your answers, all are helpful.
I think it is some C#/.NET/SharpGL issue.
When you draw using GL_TRIANGLES, are you perhaps still sending all the point data to the GPU? While this won't render the points, there will still be some processing of the points somewhere along the line, which will cause a similar a slow-down as with GL_POINTS.
i.e. are you doing something like this? (pseudocode, assuming you're using VAOs of some kind)
bool drawPoints
...
GLenum type = if drawPoints then GL_POINTS else GL_TRIANGLES
// draw the points
glBindVertexArray(pointCloud)
glDraw...(type, ... )
// draw the cube
glBindVertexArray(cube)
glDraw...(type, ... )
When actually you should be doing something like this:
bool drawPoints
...
if (drawPoints) {
// draw the points with GL_POINTS
glBindVertexArray(pointCloud)
glDraw...(GL_POINTS, ... )
} else
{
// draw the cube with GL_TRIANGLES
glBindVertexArray(cube)
glDraw...(GL_TRIANGLES, ... )
}
Yes I do something like this.
if (drawPoints)
{
gl.Begin(OpenGL.GL_POINTS);
Points.ForEach(x => gl.Vertex(x.x, x.y, x.z));
gl.End();
}
else
{
gl.Begin(OpenGL.GL_TRIANGLES);
foreach (Testing_Environment.src.Geometry_DataStructures.Face face in m_Mesh.Faces)
{
gl.Normal(face.v0.Normal.x, face.v0.Normal.y, face.v0.Normal.z);
gl.Vertex(face.v0.x, face.v0.y, face.v0.z);
gl.Normal(face.v1.Normal.x, face.v1.Normal.y, face.v1.Normal.z);
gl.Vertex(face.v1.x, face.v1.y, face.v1.z);
gl.Normal(face.v2.Normal.x, face.v2.Normal.y, face.v2.Normal.z);
gl.Vertex(face.v2.x, face.v2.y, face.v2.z);
}
gl.End();
}
whereas I create the points like this:
public void CreatePoints()
{
for(int i = 0; i < 100; i++)
for(int j = 0; j < 100; j++)
for (int k = 0; k < 100; k++)
{
Points.Add(new Vertex3D(i, j, k, null));
}
}
I will look in more detail at this topic.
Again thank you for your help!