vpGetLight(3)
π‘ vpGetLight β get lighting properties π‘
okay bestie, welcome to the vpGetLight(3) page, living in the Library Functions Manual section of your fave little graphics library π she's the chill, read-only sibling of vpSetLight, and she's here to spill the tea on what your lights are actually doing.
β¨ 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β your VolPack context, the one you got fromvpCreateContext. the main character, honestly.light_numβ a constant that picks out one specific light source:VP_LIGHT0,VP_LIGHT1, ..., all the way up toVP_LIGHT5. yes bestie, six whole lights, we're rich πpropertyβ a constant naming one lighting property: eitherVP_COLORorVP_DIRECTION. pick one, she's not doing combos.n0_ptr,n1_ptr,n2_ptrβ the spots where the result gets stashed: the components of an RGB color (when it'sVP_COLOR) or a direction vector (when it'sVP_DIRECTION). so like, three doubles, and you're passing pointers to where they live.
πΈ DESCRIPTION πΈ
vpGetLight is literally just here to get the properties of a light source. that's it. that's the job. iconic behavior.
the arguments are exactly analogous to vpSetLight β same shape, same vibes β except the last three arguments aren't values you're setting, they're pointers to locations for storing the lighting properties. so instead of handing her the tea, you're handing her an empty mug and she fills it. π
π ERRORS π
the normal return value is VP_OK. like, that's the dream. but these error return values are possible, and we must respect them:
VPERROR_LIMIT_EXCEEDEDβ the light number is invalid, or it exceeds an implementation limit. you asked for a light that does not exist, bestie. πVPERROR_BAD_OPTIONβ thepropertyargument is invalid. not a real property, no cap.
lowkey always check your return value. she's not gonna text you back about it. π
π SEE ALSO π
and that's the whole page, periodt. this lil gem comes to you courtesy of VolPack β go get your lighting info, bestie, and may all your return values be VP_OK. πβ¨π¦
π¦ where this page comes from
- debian bookworm: libvolpack1-dev 1.0b3-9 Β· BSD-3-Clause
- debian trixie: libvolpack1-dev 1.0b3-10 Β· BSD-3-Clause
- ubuntu jammy: libvolpack1-dev 1.0b3-9 Β· BSD-3-Clause
- ubuntu noble: libvolpack1-dev 1.0b3-9.1 Β· BSD-3-Clause
- ubuntu questing: libvolpack1-dev 1.0b3-11
- ubuntu resolute: libvolpack1-dev 1.0b3-11build1 Β· BSD-3-Clause
- ubuntu stonking: libvolpack1-dev 1.0b3-11build1 Β· BSD-3-Clause
- Copyright (c) 1994 The Board of Trustees of The Leland Stanford
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms