---
name: "Enable"
section: "3"
platform: "linux"
package: "libvolpack1-dev"
version: "1.0b3-10"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/Enable"
---

# Enable(3)

enable or disable options

## NAME

vpEnable - enable or disable options

## SYNOPSIS

\#include \<volpack.h\>

vpResult

**vpEnable(***vpc, option, value***)**

-

  vpContext \**vpc;*

-

  int *option;*

-

  int *value;*

## ARGUMENTS

- *vpc*

  VolPack context from **vpCreateContext.**

- *option*

  Constant that specifies the option to be adjusted.

- *value*

  New value for the option (boolean: 0 or 1).

## DESCRIPTION

**vpEnable** is used to enable or disable boolean options in a rendering context.  If the *value* option is 0 then the option is disabled; otherwise it is enabled.  The following list summarizes all available options:

- VP\_LIGHT0

  - VP\_LIGHT1

  - VP\_LIGHT2

  - VP\_LIGHT3

  - VP\_LIGHT4

  - VP\_LIGHT5

  Enable the corresponding light source (see vpSetLight(3)). Default: VP\_LIGHT0 is enabled, and all others are disabled.

- VP\_LIGHT\_BOTH\_SIDES

  Enable two-sided lighting (see vpSetLight(3)). Default: disabled

- VP\_REVERSE\_SURFACE\_SIDES

  Reverse the definition of interior and exterior surfaces (see vpSetMaterial(3)). Default: disabled

- VP\_DEPTH\_CUE

  Enable depth cueing (see vpSetDepthCueing(3)). Default: disabled

- VP\_VIEW\_X\_AXIS

  - VP\_VIEW\_Y\_AXIS

  - VP\_VIEW\_Z\_AXIS

  Enable computing a preclassified volume for the corresponding major viewing axis (see vpClassifyVolume(3)). Default: enabled

- VP\_SHADOW

  Enable rendering shadows (see vpSetShadowLookupShader(3)). Default: disabled

- VP\_CLAMP\_SHADE\_TABLE

  Enable clamping the color components in a shade table to the range 0.0-255.0.  This option affects vpShadeTable().  Default: enabled

## ERRORS

The normal return value is VP\_OK.  The following error return value is possible:

- VPERROR\_BAD\_VALUE

  The *option* argument is invalid.

## SEE ALSO

[VolPack(3)](/VolPack/3.md), vpCreateContext(3)
