Porting Xlib to OpenGL on Linux

Hello,

I recently ported an Xlib/Motif 2D mapping application from hp-ux onto redhat enterprise linux 3.0. I would like to port the Xlib drawing calls over to OpenGL and use the glx motif drawing widget, in order to maintain the motif look vice using glut or something else. What sort of performance difference should I expect between X11 and OpenGL? Our linux boxes have NVIDIA graphics cards w/ the NVIDIA linux drivers installed so direct rendering under OpenGL is available. There are also a couple of implementation issues that I’m looking at: First off, this application allows objects (symbols) that are drawn on the base map to blink under certain conditions. Under hp-ux, since a writable colormap was available, we could simply manipulate the color cells in order to get a blink affect without having to redraw the objects every half-second. This method was very efficient. Unfortunately, when we moved to linux, the default colormap is read-only. So then we were forced to redraw the blink objects every half second. This is very inefficient, especially when the number of blinking objects (consisting of a bitmap, label, and any number of lines) exceeds 100. Are there any tricks to implementing this blinking functionality in OpenGL besides just redrawing every half-second? Secondly, I would like to implement a ‘brightness’ slider to enable the user to lessen the intesity of the background base map without affecting the objects drawn on top of the base map in order to make the objects more visible. Our NVIDIA boards do not support hardware overlays. How could this be implemented in OpenGL? Any information about these topics would greatly be appreciated.

Thanks,

Tony

Originally posted by <Tony Rossomano>

What sort of performance difference should I expect between X11 and OpenGL?

If the driver has DRI enabled I would assume some performance improvement. Benchmark some simple stuff to get a rough estimate.


Are there any tricks to implementing this blinking functionality in OpenGL besides just redrawing every half-second?

I don’t think so.

[b]

Secondly, I would like to implement a ‘brightness’ slider to enable the user to lessen the intesity of the background base map without affecting the objects drawn on top of the base map in order to make the objects more visible. Our NVIDIA boards do not support hardware overlays. How could this be implemented in OpenGL?
[/b]
Scale your base texture with some ‘brightness’ factor. This can be implemented with multi-texturing/texture combiner gl extensions.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.