This is my ModelExtn DLL that I created using C++Builder 3 to monitor the raytracing of POVray. It creates a shared memory block accessible by other programs:

typedef struct
{
    unsigned char red, green, blue;
} RGBValue;

typedef struct
{
    int active;
    int width, height;
    int x, y;
    RGBValue bytes[1];
} RGBImage;

The block is structured as RGBImage - a header with an array of bytes big enough to contain RGBValues the size of the image. 'active' is a flag indicating the state of POVray:

1: initialised
2: rendering
3: stop rendering
-1: done

'width' and 'height' are the size of the image in pixels. 'x' and 'y' are the current coordinates during raytracing.

So far this is a one way system - it outputs data, but doesn't receive. I haven't added that feature as yet.

Pete Goodwin
EMail: pgoodw@netcomuk.co.uk