Next: Event Handling
Up: Programmer's Reference for the
Previous: Drawing Objects
These functions control how a graphically drawn object is rendered,
i.e., how it appears in the graphics window.
public void G_set_shaded_state(
Gwindow window,
BOOLEAN state )
-
- If the shaded state is TRUE, then polygons and quadmeshes
are drawn as solid, shaded surfaces. Otherwise, only a wireframe
outline is drawn for these objects. The default value is FALSE.
public void G_set_shading_type(
Gwindow window,
Shading_types type )
-
- This function sets the method of interpolation of colours across
a polygon or quadmesh. If a value of FLAT_SHADING is
specified, then the interpolation is flat and discontinuous across
polygon boundaries. If a value of GOURAUD_SHADING is
specified, then the interpolation is smooth and continuous across
polygon boundaries. GOURAUD_SHADING generally produces more pleasing
results and is the default.
public void G_set_lighting_state(
Gwindow window,
BOOLEAN state )
-
- This function enables or disables the use of lighting in the
colour computation. If lighting is enabled, then the colours of
objects are computed based on the object position and the states and
colours of the defined lights. Otherwise, the object is shown in the
colour specified when it is drawn. The default value is TRUE.
public void G_backface_culling_state(
Gwindow window,
BOOLEAN state )
-
- This function enables or disables backface culling. When
enabled, parts of objects which are not facing the viewer are not
drawn. This is useful for systems which do not have a depth buffer
with which to correctly perform occlusion. However, backface culling
only works well for closed, convex surfaces, such as spheres or
cubes. The default value is FALSE.
public void G_set_transparency_state(
Gwindow window,
BOOLEAN state )
-
- Enables or disables the display of transparent surfaces. If
enabled, objects that are drawn on top of other objects will be
displayed as a composite based on the opacity of both objects. If
disabled, the opacity of objects will be ignored, and the colour at
any position in the window is based solely on the colour of the object
that is on top. The default value is FALSE.
Next: Event Handling
Up: Programmer's Reference for the
Previous: Drawing Objects