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

# GetLight(3)

get lighting properties

## NAME

vpGetLight - get lighting properties

## SYNOPSIS

\#include \<volpack.h\>

vpResult

**vpGetLight(***vpc, light\_num, property, n0\_ptr, n1\_ptr, n2\_ptr***)**

-

  vpContext \**vpc;*

-

  int *light\_num;*

-

  int *property;*

-

  double \**n0\_ptr,* \**n1\_ptr,* \**n2\_ptr;*

## ARGUMENTS

- *vpc*

  VolPack context from **vpCreateContext.**

- *light\_num*

  A constant specifying a particular light source (VP\_LIGHT0, VP\_LIGHT1, ..., VP\_LIGHT5).

- *property*

  A constant specifying one lighting property (VP\_COLOR or VP\_DIRECTION).

- *n0\_ptr, n1\_ptr, n2\_ptr*

  Locations for storing the result: components of an RGB color (for VP\_COLOR) or a direction vector (for VP\_DIRECTION).

## DESCRIPTION

**vpGetLight** is used to get the properties of a light source. The arguments are exactly analogous to **vpSetLight** except that the final three arguments are pointers to locations for storing the lighting properties.

## ERRORS

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

- VPERROR\_LIMIT\_EXCEEDED

  The light number is invalid or exceeds an implementation limit.

- VPERROR\_BAD\_OPTION

  The *property* argument is invalid.

## SEE ALSO

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