Internal: Information on IDLgrWindow's RENDERER and RETAIN Settings [or Options]
Anonym
This article discusses how IDL handles repair/repainting of an Object Graphics Window (IDLgrWindow object) when it is exposed after being covered up by other windows or after being minimized. The behavior differs according to the setting of the
RENDERER and
RETAIN properties of the IDLgrWindow. It can differ per operating system and video card as well, depending on how OpenGL hardware rendering is implemented on your system.
Windows platform - the IDL application is running on the Windows box:
Setting
RENDERER=0 always uses the OpenGL libraries on the machine.
RETAIN=0: The OpenGL libraries draw directly to window with hardware acceleration and do not necessarily have the ability to repair the window. Some implementations of OpenGL can repair the window, but this should not be relied on. In general, the application needs to monitor window expose events and redraw the window when the expose events arrive.
RETAIN=1: Not real meaningful under Windows - IDL treats it the same as RETAIN=0
RETAIN=2: The OpenGL libraries draw into a bitmap (DIB) and IDL uses the DIB to automatically repair the window on behalf of the application when the window needs to be repaired. This will usually cause the rendering to be slower, because deep inside the OpenGL libraries, they probably use software to render into the DIB.
Setting
RENDERER=1 always uses the Mesa software renderer:
Mesa renders into a DIB, just like the
RETAIN=2 setting for
RENDERER=0, so IDL is always able to repair the window, for all
RETAIN settings. But rendering may be slower than
RENDERER=0 and
RETAIN=0 or
1.
---------------
Unix platform Scenerio 1 - the IDL application is running on a Unix box and displaying on a Windows box using an XVision X server.
In this case, IDL will always force software rendering because it cannot access the graphics hardware over the network and there is no GLX extension. IDL renders a bitmap on the client side (on Unix) and sends the bitmap over the network to the X server running on the PC.
The
RETAIN settings should work as advertised:
RETAIN=0: IDL does not try to use the X server backing store and does not try to create a server side pixmap. Therefore, when an expose event occurs, the IDL application must redraw the window.
RETAIN=1: IDL tells the X server to use its backing store, if it can. What this means is that the X server will try to make a copy of the window so that it can repair the window itself on an expose event. Not all X servers have backing store, so this does not always work. Also, even if backing store is enabled on an X server, there may not be enough of it to backup a given window. If there is no or not enough backing store, the behavior reverts to
RETAIN=0.
If your IDLgrWindow object is a draw window in an IDL widget program, then you can code that program to repair a window on a system that has no backing store. In other words, the application must be prepared to redraw on expose events. When
RETAIN=1 and the server has no backing store, the server will send expose events that the IDL widget program can explicitly respond to by drawing the window. Servers with backing store, on the other hand, may quietly repair the window without sending expose events to the IDL widget program.
RETAIN=2: IDL creates a pixmap on the X server, draws the scene into it, and then responds to expose events by copying the server-side pixmap to the window. IDL therefore handles expose events on behalf of the application. Note that it may be possible that IDL cannot create the pixmap, in which case, IDL tries to use backing store, as explained in
RETAIN=1.
---------------
Unix platform Scenerio 2 - The IDL application is running on a Unix box and is displaying on a local or remote X server with GLX support.
The discussion is the same as above, except that IDL sends GLX protocol in an attempt to use the hardware on the machine running the X server.
RETAIN=0: Same as previous Unix case.
RETAIN=1: Servers rarely have backing store for GL windows, so
RETAIN=1 will rarely work and you end up with behavior like RETAIN=0.
RETAIN=2: IDL tries to use a GLXPixmap on the server side; otherwise same as previous Unix case. Some GLX implementations may not support GLX pixmaps.