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

# Debug(3)

enable/disable debugging options

## NAME

vpSetDebug - enable/disable debugging options

## SYNOPSIS

\#include \<volpack.h\>

vpResult

**vpSetDebug(***vpc, flag, value***)**

-

  vpContext \**vpc;*

-

  int *flag;*

-

  int *value;*

## ARGUMENTS

- *vpc*

  VolPack context from **vpCreateContext.**

- *flag*

  Constant that specifies the debugging option to be adjusted.

- *value*

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

## DESCRIPTION

**vpSetDebug** is used to enable or disable a debugging option in a rendering context.  The debugging options cause messages to be printed during execution.  These messages are probably useless without a good understanding of the source code.  If the *value* option is 0 then the option is disabled; otherwise it is enabled.  The following list summarizes all available options:

- VPDEBUG\_VIEW

  view transform calculations

- VPDEBUG\_RENDER

  high-level rendering stages

- VPDEBUG\_RBUF

  intermediate image (render buffer) allocation

- VPDEBUG\_OPCCORRECT

  opacity correction

- VPDEBUG\_DEPTHCUE

  depth cueing

- VPDEBUG\_PYRAMID

  pyramid construction

- VPDEBUG\_OCTREE

  octree construction

- VPDEBUG\_CLSFYOCTREE

  octree classification

- VPDEBUG\_OCTREERUNS

  runs computed from octree

- VPDEBUG\_OCTREETRAVERSE

  octree traversal

- VPDEBUG\_TRANSPOSE

  volume transposing

- VPDEBUG\_COMPOSITE

  compositing

The VolPack library must be compiled with the -DDEBUG compiler option for this function to have any effect.

## ERRORS

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

- VPERROR\_BAD\_OPTION

  The *flag* argument is invalid.

## SEE ALSO

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