GINO Graphics Suite - GINO v9.0  

gSetClippingMode

Syntax

[C/C++:]
void gSetClippingMode(int sw);
[F90:]
subroutine gSetClippingMode(sw)
integer, intent(in) :: sw

Arguments

sw
Clipping mode

= GNOCLIP, Switch off hardware and software clipping
= GHARD, Switch on hardware clipping
= GSOFT, Switch on software clipping

Description

The routine gSetClippingMode() sets the clipping mode for all GINO drawing.

By default GINO will use hardware clipping if the current device has the facility in the driver.  Otherwise GINO will perform its own clipping.  In both cases graphics is clipped to the current window, this having been set using gSetWindow2D()/gSetWindow3D(), the current viewport limits (if gSetViewportClipSwitch(GOFF) has been called) or the device limits if none of these conditions apply.

Where a device has hardware clipping facilities, it should be noted that this will affect pixel output, whereas the pixel primitives are not affected by software clipping. Hardware clipping is, in most cases, more efficient than software clipping.

In the rare instance of not requiring hardware or software clipping, both operations can be switched off by using GNOCLIP as the argument to gSetClippingMode(). Where this mode is used, the effect of drawing outside the device limits vary from device to device and may corrupt output. However, where it is known that output is restricted to within the device limits, this mode of operation is likely to be significantly faster than with hardware or software clipping switched on.

Very few devices have the capability of hardware clipping - use the routine gEnqDeviceState() to check the settings for the current device.

See Also

gSetClippingMode Usage
gEnqClippingMode
gEnqDeviceState
gSetViewportClipSwitch
gSetWindow2D
gSetWindow3D