Please refer to the video.
In my application, I display stack of contours using a DisplayList created using GL_LINE_STRIP.
User can select contour lines using mouse . For that ,before rendering the DisplayList, I render all contours using an unique color and read the pixel-color under the mouse .(as explained here) .This rendering is done using "immediate mode".
User can also move,delete selected contours.In that case ,I regenerate the DisplayList.
My questions are:
1) I am using old OpenGL techniques .(fixed pipe-line architecture.) Is there any ways to improve the performance using new OpenGL techniques ? (using GPU,shaders...etc) Because for large number of contours,the operations are not smooth.
2) I think the "immediate mode" rendering done for contour selection is also a performance panelty.Is there any better way to do this ?
3) I need to display contour nodes as a point-cloud ,using GL_POINTS.In this ,I should create another DisplayList using GL_POINTS? (that means there are two DisplayLists; one when diaplaying lines , other for displaying points)?
Moving away from display lists and switching to vertex arrays (VAs) or vertex buffer objects (VBOs) should give you a decent speed-up.
You can very easily switch between GL_LINE_STRIP
and GL_POINTS
by changing the first argument to glDrawArrays()
. No need for two copies of your geometry.