[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

8.2.1.2 DspyImageOpen

Called before rendering starts. It is time for the display driver to initialize data, open file(s), ....

Here is a description of all the parameters passed to this function.

image
This is an opaque pointer that is not used in any way by 3Delight. It should be allocated and used by the display driver to pass informations to DspyImageData and DspyImageClose. For instance, a TIFF display driver would put some useful informations about the TIFF during DspyImageOpen so that DspyImageData could access the opened file.

drivername
Gives the device driver name as specified by Display. For example:
 
Display "super_render" "framebuffer" "rgb"
will provide `framebuffer' in drivername;

filename
Gives the filename provided in the Display command. For example:
 
Display "render.tif" "tiff" "rgb"
will provide `render.tif' in filename;

width
height
Give the resolution of the image, in pixels. If the image is cropped, width and height will reflect the size of the cropped window;

paramcount
Total number of user parameters provided in this call;

UserParameter
An array of user parameters, of size paramcount. UserParameter is defined as:
 
typedef struct
{
	const char *name;
	char valueType, valueCount;
	const void *value;
	int nbytes;
} UserParameter;
name is the name of the parameter, valueType is its type, which can be one of the following: `i' for an integer type, `f' for an IEEE floating point type and `s' for a string type. valueCount is used for parameters that have more than one value, such as matrices and arrays. value is the pointer to the actual data. A set of standard parameters is alway provided, those are described in the table below.

formatcount
Number of output channels.

formats
An array of channel descriptions of size formatcount. A channel description contains a name and a type:
 
typedef struct
{
	char *name;
	unsigned type;
} PtDspyDevFormat;

Parameters can be passed to a display driver when issuing the Display command:
 
Display "render" "my_display" "rgb" "string compression" "zip"
In this case, `my_display' driver will receive the parameter "compression".

Name Type Count Comments
NP `f' 16 World to Normalized Device Coordinates (NDC) transfom
Nl `f' 16 World => Camera transform
near `f' 1 Near clipping plane, as declared by Clipping
far `f' 1 Far clipping plane, as declared by Clipping
origin `i' 2 Crop window origin in the image, in pixels
OriginalSize `i' 2 Since width and height only provide to DspyImageOpen reflect the size of the croped window, this variable gives the original, uncropped window size
PixelAspectRatio `f' 1 Pixel aspect ratio as given by Format
Software `s' 1 Name of the rendering software: "3Delight"

Default user parameters passed to DspyImageOpen().


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

This document was generated by Aghiles Kheffache on July, 31 2003 using texi2html
3Delight 1.0.0. Copyright 2000-2003 The 3Delight Team. All Rights Reserved.