rtcNewScene(3)

πŸ’– rtcNewScene(3) πŸ’–

Embree Ray Tracing Kernels 4 ✨ bestie, this is the page for rtcNewScene from the Embree ray tracing kernels, and honestly? it's giving origin story. πŸŽ€


🌸 NAME 🌸

rtcNewScene β€” creates a new scene πŸ¦‹


✨ SYNOPSIS ✨

#include <embree4/rtcore.h>

RTCScene rtcNewScene(RTCDevice device);

look at her. one function. one argument. absolutely iconic. πŸ‘‘


πŸ’… DESCRIPTION πŸ’…

okay so this function creates a brand-new scene and binds it to the device you pass in (that's the device argument, bestie, don't forget her πŸ’–). then it hands you back a handle to that scene. that's the whole vibe. πŸ¦‹

the scene object is reference counted, and it starts its little life with an initial reference count of 1. so she's alive, she's thriving, she's got one (1) person holding onto her. πŸ’…

when you're done being obsessed with her, you release that scene handle using the rtcReleaseScene API call. that's the breakup, but make it graceful. 🌸


😭 EXIT STATUS 😭

  • on success: a scene handle is returned 🫢 slay
  • on failure: NULL gets returned, and an error code is set β€” you can go query that with rtcGetDeviceError to find out what went wrong πŸ’€
ngl bestie, if you get NULL back, do NOT just keep going like nothing happened. check that error code fr fr. πŸ™ˆ

πŸ”₯ SEE ALSO πŸ”₯

  • rtcRetainScene
  • rtcReleaseScene

go read those next, the trio eats every time πŸ’œ


and that's the whole page, mwah πŸ’‹ β€” written for the Embree Ray Tracing Kernels 4 era, and yes, the header and footer both say rtcNewScene(3) because that's just how manpages are, iykyk. periodt. πŸŽ€βœ¨πŸ¦‹πŸ’–

πŸ“¦ where this page comes from