DISPLAY_MODES > the Display Mode Used for Graphics
DISPLAY_MODE The display mode used for graphics
D3PLOT supports four possible display modes, which affect animation performance: DIRECTFrames are calculated from scratch each time, no data being stored, so animation memory consumption is zero.
VECTORThe data to redisplay each frame is stored in "vector" form in the D3PLOT (client) process itself. This is the default.
OBJECT3D OpenGL only . Each image is stored as graphical "objects" in the OpenGL server, no animation data being stored in the client process.
Why so many different modes?
The answer is the trade-off of replay speed vs. memory use, and the need to optimise this in some cases. For a small model this is not an issue, but as you start to approach the limits of your computer with larger models you may find that you need to alter the animation method, or even move to using two computers in client/server mode. The following table summarises this:
| Display mode | 2D X-windows | 3D OpenGL | Comments |
| DIRECT |
Speed: Slow
|
Speed: Slow
Mem: Zero |
Use if memory is short and you can tolerate slow speed. |
| VECTOR |
Speed: Fast
|
Speed: Medium
Mem: Medium |
Best all-rounder, set as the programme's default. |
| OBJECT |
n/a
|
Speed: Fast
|
Again fast until you run out of memory, then dire. Runs well on remote server. |
| When do I need to change my display mode? | |
|
|
|
What is meant by "runs well on a remote server"? Under OpenGL on LINUIX you are in fact using two processes: |
|
|
|
On a single machine the data transfer between the processes is fast - usually
via shared memory - and OpenGL usage is generally direct from D3PLOT to the
display card.
However there are some obvious advantages to separating the tasks between two machines: the client process can use all its host machine's resources to generate graphical requests, while the server can devote all its resources to displaying them. The disadvantage is that the data has to go down a piece of wire between the two machines, which may slow down data transfer. Therefore the best of all worlds is to store the graphics data in the server, whereupon the client only has to send a "draw this frame" request to render each frame of an animation.
|
display modes achieve this end in related, but different, ways. |
|
mode:
Is no slower to compute in the client than mode, but can take longer to draw during the first pass because of the overhead of building "objects" in the server.
Is reasonably fast to redraw (usually about 1.5 - 2x speed), but this is a function of the number and complexity of the objects that make up the image.
Its memory requirements in the server are unquantifiable but large - typically up to 10 times that required for mode.
Since it cannot tell how much memory the server is using D3PLOT is unable to protect you from the ill-effects of excessive memory consumption there. Ultimately it may lock up or crash if driven completely out of memory.
In 3D mode a viewing transform change imposes no speed penalty. All that is required is to send a new transformation matrix to the server.
If the contents of an object change then only that object has to be re-computed and re-sent to the server. So the "cost" of changes is proportional to the extent of the changes made.
Usually the memory consumption of mode, and its less than phenomenal speed advantage over mode, make its use impractical if both client and server processes are on the same machine. However if you have two machines available, or you are working from a remote host and want image transforms to be quick on your local machine, it is worth trying.
Setting up a remote client/server connection: (This is only possible on machines running X11, i.e. Linux or Unix hosts)
A description of how to display on a remote server is given in Starting the code , but briefly:
|
Prior to running the Shell to invoke D3PLOT: |
|
| On the client machine: | Set the DISPLAY environment variable to point to <display>:0 on the server. (Eg setenv DISPLAY server_name:0 ) |
| On the server: |
Make sure that windows can be opened by remote clients.
(Under Unix the command is
xhost +
)
|