vpGetLight(3)
π vpGetLight β get lighting properties π‘
okay so bestie, welcome to vpGetLight(3) from the Library Functions Manual π this is the VolPack girlie whose whole job is spilling the tea on your light sources. you want to know what a light's color is? what direction it's pointing? she's got you. no cap.
β¨ 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;
like yes she takes six args, she's a little extra, but she's worth it π«Ά
π¦ ARGUMENTS π¦
vpcβ the VolPack context you got fromvpCreateContext. your main character, your home base, your everything πlight_numβ a constant that picks which light source we're talking about:VP_LIGHT0,VP_LIGHT1, ...,VP_LIGHT5. so six lights, six icons, pick your fave β¨propertyβ a constant naming exactly one lighting property you wanna read:VP_COLORorVP_DIRECTION. that's the vibe check right there πn0_ptr,n1_ptr,n2_ptrβ the spots where the answer gets dropped off π they hold either the components of an RGB color (when it'sVP_COLOR) or a direction vector (when it'sVP_DIRECTION). so it's three numbers either way, just depends which question you asked π
π DESCRIPTION π
vpGetLight is how you get the properties of a light source. it's literally the read-only twin of vpSetLight β the arguments are exactly analogous, the only plot twist being that those final three arguments are pointers to locations for storing the lighting properties instead of values you're setting. same shape, opposite direction, iconic behavior honestly π
π ERRORS π
the normal return value is VP_OK. everything's fine, the light is light-ing, we love that for her π
but bestie, sometimes it goes wrong, and these are the possible error return values:
VPERROR_LIMIT_EXCEEDEDβ the light number is invalid or it exceeds an implementation limit. like you asked for a light that does not exist, or the implementation said "girl, no" πVPERROR_BAD_OPTIONβ thepropertyargument is invalid. you passed something that isn't a real property and she's not entertaining it π
fr fr, check yourlight_numand yourpropertybefore you come crying to the error codes, iykyk π
π§ SEE ALSO π§
VolPack(3), vpCreateContext(3), vpSetLight(3)
go read vpSetLight(3) next if you wanna be the one setting the lights instead of just snooping on them, and vpCreateContext(3) if you somehow don't have a context yet (bestie. get a context.) πΈ
and that's the whole page, periodt π this was VolPack, version vibes from the VolPack library, dated VolPack β mwah, stay lit bestie, literally π₯π
π¦ where this page comes from
- fedora 43: volpack 1.0c7-35.fc43 Β· BSD-3-Clause
- fedora 43: volpack 1.0c7-35.fc43 Β· BSD-3-Clause
- fedora 44: volpack 1.0c7-36.fc44 Β· BSD-3-Clause
- fedora 44: volpack 1.0c7-36.fc44 Β· BSD-3-Clause
- Copyright (c) 1995-2008, Stanford University
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms