I need to plot a diagram with more than 30,000 rectangles with embedded text and inter-linked by lines. There are also zoom and pan operations to be implemented on this diagram. Is OpenGL the right package to use? How would it compare with GDI?

Thanks

In someway’s openGL would be more flexible, when doing a zome and scale operation.

You should look at some openGL applications and tutors to help you make up your mind

Originally posted by electricate:

I need to plot a diagram with more than 30,000 rectangles with embedded text and inter-linked by lines. There are also zoom and pan operations to be implemented on this diagram. Is OpenGL the right package to use? How would it compare with GDI?

Thanks

With OpenGL u can:

- draw antialiased lines/rectangles
- draw textured-triangles
- do fancy lighting effects
- do shadows (ok, this is a “little bit” more advanced)

…but you can’t do any textoutput.

With GDI yuo are happy, when you get some colored lines on the screen (of course only with one color). But the textoutput if (of course) much more better (or let me say: “is there”)

my suggestion:

use openGL for geometry mixed with GDI for textoutput (you should create an offscreen DIB and draw your text into it, and then copy it into a texture… there are several tutorials on the web, describing how to do it)

Actually, if you use wglUseFontBitmaps, you can easily implement text in your OpenGL code. OpenGL wins