Fanning Software Consulting

Can Object and Direct Graphics Co-exist?

QUESTION: Is it possible to display both direct graphics output and object graphics output in the same display window? How about if I used some trickery like creating a pixmap and then sending that to an image object, which was then over-layed in a draw object?

ANSWER: No, without employing some kind of trickery (and even then I am not convinced it would work satisfactorily) you cannot combine object graphics and direct graphics in the same graphics window. Object graphics and direct graphics are (currently) two completely separate graphics systems and you must select the system and a graphics window appropriate to that system to display graphics.

Moreover, unless you are using a 24-bit color display, it is even difficult to combine direct and object graphics programs (or windows) in the same IDL session due to the completely different ways in which they use and load color tables in this color-limited environment.

This, unfortunately, makes it critical that you carefully weigh the pros and cons of building programs in one system or the other. Object graphics is clearly the choice if interactive 3D graphical display is of utmost importance. However, this must often be weighed against more difficult printer and hardcopy output support, as well as the type of computer environment your programs will be running in. Sometimes it makes more sense to write direct graphics programs in an object-like way to take advantage of the best parts of both systems.

In my humble opinion, object graphics programs should only be considered on fast machines running in 24-bit color mode. (And I would prefer to run on machines that supported OpenGL hardware acceleration.)

Google
 
Web Coyote's Guide to IDL Programming