GDIndex.gif Previous-2.gif Next-3.gif

GDview_xxxx- GD API


Synopsis

access the Graphics Display Kit view

GDview_get_xxxx

void   GDview_get_renderer ( view_id ,  int  * renderer  );
void   GDview_get_accel ( view_id , int  * accel  );
void   GDview_get_timer ( view_id , int  * timer  );
void   GDview_get_pcache ( view_id , int  * pcache  );
void   GDview_get_render_mode ( view_id ,  float  * mode  );
void   GDview_get_buffer_mode ( view_id , int  * buffer_mode  );
void   GDview_get_back_color ( view_id , float * color  );

OMobj_id   view_id ;

 

GDview_set_xxxx

int   GDview_set_renderer ( view_id ,  int   renderer  );
int   GDview_set_accel ( view_id , int   accel  );
int   GDview_set_timer ( view_id , int   timer  );
int   GDview_set_pcache ( view_id , int   pcache  );
int   GDview_set_render_mode ( view_id ,  float   mode  );
int   GDview_set_buffer_mode ( view_id , int   buffer_mode  );
int   GDview_set_back_color ( view_id , float * color  );
int   GDview_set_refresh ( view_id  );

OMobj_id   view_id ;

 

GDview_attach/detach_xxxx

void   GDview_attach_camera ( view_id ,   camera_id , int flag  );
void GDview_detach_cameras ( view_id );
void GDview_detach_camera ( view_id, camera_id ) ;

void   GDview_attach_light_info ( view_id ,   light_info_id, int flag  );
void GDview_detach_light_info ( view_id, int flag );

void   GDview_attach_pick_ctrl ( view_id ,   pick_ctrl_id, int flag  );
void GDview_detach_pick_ctrl ( view_id, int flag );

void   GDview_attach_virtpal ( view_id ,   vpal_id, int flag  );
void GDview_detach_virtpal ( view_id, int flag );

OMobj_id   view_id ;
OMobj_id   camera_id , pick_ctrl_id , light_info_id, vpal_id ;

 

GDview_delete

void   GDview_delete (
NULL,
OMobj_id   view_id ,
0,
GDview  * view  );

 

Description

These routines are used to access the Graphics Display Kit view.

The GDview_get_xxxx routines get the subobject values of the view. The GDview_set_xxxx routines set the subobject values of a view. These routines are used by the Graphics Display Kit view editor (i.e., GDview_edit).

GDview_attach_camera attaches a camera to the view. The view maintains an array of cameras to be rendered. GDview_detach_camera detaches the specified camera from the array of cameras in the view. GDview_detach_cameras detaches all the cameras at once.

GDview_attach_light_info attaches light information to the view. If the view already has light information attached, the routine returns without changing the light information. GDvlew_detach_light_info detaches the light information from a view.

GDview_attach_pick_ctrl attaches pick control information to the view. If the view already has pick control information attached, the routine returns without changing the pick control information. GDview_detach_pick_ctrl detaches the pick control information from a view.

GDview_attach_virtpal attaches a virtual palette to the view. If the view already has a virtual palette attached, the routine returns without changing the virtual palette. GDview_detach_virtpal detaches the virtual palette from a view.

GDview_delete deletes the view. This method is called directly by the Object Manager when a view is deleted.

To create an instance of a view, call the utility routine GDcreate_instance.

Parameters

view_id

The id of a view.

Other get/set parameters

The other parameters in the get/set routines correspond to subobjects of the view.

For details, see DefaultView .

camera_id
pick_ctrl_id
light_info_id
vpal_id

(GDview_attach_xxxx only)  The id of an object to attach or detach.

flag

(attach/detach routines only) This argument controls whether the routine attaches the object to the view: 0 means no; 1 means yes. In normal usage within the Graphics Display Kit, the flag is set to 0. If you are using the routines programatically, set the flag to 1.

view

(GDview_delete only)  The view object's local pointer. To get this value, call the utility routine GDget_local.

Example


/* Get and set a view object's renderer subobject. */
OMobj_id view_id; /* Assume this has been set. */
int renderer;
...
GDview_get_renderer(view_id, &renderer);
GDview_set_renderer(view_id, GD_SWX_RENDERER);

 



GDIndex.gif Previous-2.gif Next-3.gif