vpSetDebug(3)

πŸ’– vpSetDebug(3) β€” Library Functions Manual πŸ’–

okay bestie, welcome to the VolPack corner of the man pages, where we're talking about vpSetDebug β€” the lil' function that turns your library's debugging options on and off. ✨


🌸 NAME 🌸

vpSetDebug β€” enable/disable debugging options


πŸŽ€ SYNOPSIS πŸŽ€

#include <volpack.h>

vpResult
vpSetDebug(vpc, flag, value)
    vpContext *vpc;
    int flag;
    int value;

πŸ¦‹ ARGUMENTS πŸ¦‹

  • vpc β€” the VolPack context, the one you got from vpCreateContext. your main character, basically.
  • flag β€” a constant that says which debugging option we're adjusting. pick your fighter.
  • value β€” the new value for that option. it's a boolean situation: 0 or 1.

✨ DESCRIPTION ✨

so like, vpSetDebug is the function you call when you wanna enable or disable a debugging option inside a rendering context. what do these debugging options even do? they make messages print out while the code is running. πŸ’…

and ngl, those messages are probably useless unless you have a genuinely good understanding of the source code. iykyk. so if you pass 0 as the value option, the option gets disabled; anything else and it's enabled. periodt.

here's the whole roster of available options, no cap, every single one:

  • 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
🚨 okay important one bestie: the VolPack library has to be compiled with the -DDEBUG compiler option for this function to do literally anything. no -DDEBUG, no effect. it's giving "the vibes were off the whole time." 😭

πŸ’€ ERRORS πŸ’€

the normal return value is VP_OK. slay. the following error return value is possible though:

  • VPERROR_BAD_OPTION β€” the flag argument is invalid. (invalid flag? not on this watch. πŸ™ˆ)

🌈 SEE ALSO 🌈

VolPack(3), vpCreateContext(3)


and that's the whole page, bestie β€” this one comes to you from the VolPack crew, and yeah it's filed under vpSetDebug(3) because of course it is. go forth and debug responsibly πŸ«ΆπŸ’œ

πŸ“¦ where this page comes from