Using opengl for a intensive engineering charts

This is my first post here, so Hi everybody! My name is Ibrahim KAMAL, and i am an electronics engineer from France.

I have a beginner question that (i think) only an experienced OpenGL developer can answer!

In my company we are developping this Logic Analyzer, that connects to a PC and shows huge amount of charts describing electronics signals (for info: here is our product http://www.ikalogic.com/scanalogic2/index.php ). Uptill now, the software graphics part was developed using GDI+ under VB.NET. It’s fine but frustratingly slow (no matter how i tried to optimize).

I have started playing around with some OpenGL code under VB, and the results seems very promising for my application.

I know this question have been asked many times, but the answers i found were more “game” oriented. So what i am kindly asking you, is that i expose to your my strategy of using OpenGL, and hopefully you can tell me if i am going in the right direction (i don’t want to spend 2 weeks porting the software to opengl only to discover it wont work :slight_smile: )

What i need to do is basically show waveforms that will be completely static, and let the user zoom in, and translate it from right to left, etc… all basic manipulation you would expect…

The way i plan to do that is to build a couple of rather huge drawlists describing the waveforms to be displayed (apparently this is possible: http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=showflat&Number=22369) and then simply apply translations and scaling according to user requirements.

Till now that seems quite realistic to me. does it seem realistic to you too given your experience?

Any mistakes or false assumptions i am making?

Thank you very much in advance.

That should work, until you hit the detail limit where you should start culling and selecting level of detail. How many vertices are there typically in each waveform?

If your displays are typically 2D why don’t you use something like Java (2D with Swing) to make the interface and the graph displays? 3D might be overkill and could limit you to certain platforms.

You can easily draw those graphs with GL. It’s just that you will meet problems with older Intel IGPUs. So, keep the GDI+ version around for those customers that didn’t invest in a more capable laptop/PC.

For the gpu-accelerated path, require FBOs and VBOs -it’s useless to try to support older GL versions in the accelerated path. Render the waveforms to an FBO, when the zoom/panning/data changes.

Thank you very much for all your answers. (and sorry for my late follow up)

After a lot of thinking and analysis of all other possible solutions, openGL seemed the way to go!

So, I’ve been playing around with a sample application i made to do some “stress test” to see how openGL will perform.

So, I build 5000 segments of lines in a displaylist, and display them, i do the right/left translation with the glTranslatef function and everything is smooth, my frame rate is above 60.

Now if if i put 50 000 (which is more realistic in my application), i clearly notice that the speed is dropping. frame rate drops to below 10 depending on the scale i am using. If the scale is small, more vertices are visible and refresh rate drops.

Is that how it is supposed to be?

am i doing something wrong?

I can’t find information about the usage of culling to increase performance… would that be the thing to do?

alternatively, i am thinking of breaking the display list into many tiny ones of 1000 to 5000 vertices, but i would love if GL could handle the display list as one entity (mainly because it wont change most of the time, and even when it changes, a load time is very acceptable…)

any advises? thank you in advance for your help

Another quick question:

What is the best method to check the GL version required to run each of my functions?

For example, i want to be sure that my code is compatible with GL 1.2 and above, is there a place to check the functions i use against some kind of database of functions to see if they are suppoirted in GL 1.2 ?

Thanks! :slight_smile:

GLEW can do that : http://glew.sourceforge.net/basic.html

two suggestions:

  1. since you’re using VB.NET take a look at OpenTK
  2. use VBOs instead of display lists

Look at the specification files
http://www.opengl.org/documentation/specs/

If the function is not in the pdf, then it isn’t part of GL 1.2

Thank you all for your posts!

@V-man that’s exactly what i was looking for!

@A.Conz, i just checked the PDF specs of GL 1.2, and it seems VBOs are not supported… is that right? If that’s the case i’ll stick with displaylists because:

  • I need a maximum audience to be able to use the software
  • It aint a game, so i find it more difficult to ask customers to invest in graphics cards supporting higher versions of GL
  • I’ve been advancing on the porting of the software all day, and up till now i am very happy with the performance… should be more than enough

I’ll keep you posted on the advance of that project!

Thanks a lot again!

Also consider using VAs, if the content is variable. DLs are the fastest, but immutable.

VBOs are the part of OpenGL since ver. 1.5. (October 30, 2003.). The hardware has to be pretty old or pretty incapable not to support buffer-objects. The only potential problem can make integrated Intel’s cards on older notebooks.

i can assure you that an opengl 1.5 capable graphics card is a quite good requirement for a non-game product as i face your problems every day developing cad/cam products.