vpEnable(3)

πŸ’– vpEnable β€” the enable/disable girlie of the VolPack library (3)

okay so bestie, welcome to vpEnable(3), a page from the Library Functions Manual ✨ this is the little function that flips boolean options on and off in your rendering context, and honestly? she's simple, she's iconic, she ate πŸ’…


✨ NAME ✨

vpEnable β€” enable or disable options πŸŽ€


🌸 SYNOPSIS 🌸

#include <volpack.h>

vpResult
vpEnable(vpc, option, value)
    vpContext *vpc;
    int option;
    int value;

πŸ¦‹ ARGUMENTS πŸ¦‹

  • vpc β€” the VolPack context, and like… she comes from vpCreateContext. no context, no vibes 🫢
  • option β€” a constant that says which option we're adjusting. pick your fighter ✨
  • value β€” the new value for that option, and it's a boolean bestie: 0 or 1. that's the whole range, no in-between πŸ‘‘

πŸ’œ DESCRIPTION πŸ’œ

So vpEnable is the function you call to enable or disable boolean options inside a rendering context. The rules are so simple they're basically a vibe check:

  • if the value option is 0, the option is disabled 😭
  • otherwise, it is enabled πŸŽ‰

And here's the full roster of options available, no gatekeeping, periodt:

  • VP_LIGHT0, VP_LIGHT1, VP_LIGHT2, VP_LIGHT3, VP_LIGHT4, VP_LIGHT5 β€” enable the corresponding light source (peep vpSetLight(3) for the deets ✨). Default: VP_LIGHT0 is enabled, and all the others are disabled. only the first one got the invite πŸ’€
  • VP_LIGHT_BOTH_SIDES β€” enable two-sided lighting (again, vpSetLight(3) is your girl). Default: disabled
  • VP_REVERSE_SURFACE_SIDES β€” reverses the definition of interior and exterior surfaces (check 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 (say hi to vpClassifyVolume(3) for me πŸ’–). Default: enabled β€” yes queen, these three come pre-slaying πŸ‘‘
  • 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 β€” that's the "we ate and left no crumbs" outcome 🫢

The following error return value is possible:

  • VPERROR_BAD_VALUE β€” the option argument is invalid. yeah… you gave her something she doesn't recognise and she's not being subtle about it πŸ’€

πŸ‘‘ SEE ALSO πŸ‘‘

VolPack(3), vpCreateContext(3)


ngl bestie, if you're flipping options and something feels off, double check that option constant first. VPERROR_BAD_VALUE is literally the only dramatic thing about this function πŸ™ˆ

and that's the page fr fr 🌈 stay boolean, stay blessed πŸŽ€ this has been vpEnable(3) from the VolPack library β€” mwah, catch you in the next manpage πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from