GUI<-->POV Communications, or what to do if you hate MUI.

Read the 'amiga.h' file from the main POV-Ray sourcecode.

When the POV-Ray binary is called with the single argument "GUI", it runs in a GUI-specific mode. It opens a messageport "POV-Render", initializes message structures, and finally searches for a messageport "POV-GUI", sending it a RENDERREADY message. The POVMessage->Data field is filled in with the name of the messageport set up by POV-Ray. This does little now ("POV-Render") but will allow for multiple renderers in the future.

From this point it works normally, with two exceptions:

When rendering is complete, POV-Ray sends RENDERDONE message, waits for reply, then exits. Handshaking on these messages is fairly loose, replies to line-by-line status updates is not expected. I've fixed the +X setting (# pixels between message checks) at 10 in the .ini file generated by the GUI. This can be overridden by a .ini file parsed later.

I've now added a display mode, "+DM" ('M' for 'message') that will send the display information through to the GUI as message packets. When POV-Ray wants the display initialized, POVMessage->Command is set to DISPLAYDATA, and POVMessage->Data is set to "S {width}|{height}". For each pixel to display, Command is DISPLAYDATA, and Data is "P {red} {green} {blue} {x} {y}". Rectangle (mosaic preview) and Box (show vistabuffer) are the same, except Data is "R..." or "B...", and x1,x2,y1,y2 values are sent. My GUI currently does not support this (I see no reason, but it was so simple to implement) but the capability is there. Theoretically, the GUI mode could be used by ANY front-end, including an AREXX script.