RTCSETGEOMETRYVERTEXATTRIBUTECOUNT(3)

πŸ’– rtcSetGeometryVertexAttributeCount β€” bestie edition πŸ’–

okay so you're in the Embree Ray Tracing Kernels 4 docs, welcome, pull up a chair 🫢

🌸 NAME 🌸

rtcSetGeometryVertexAttributeCount β€” sets the number of vertex attributes of the geometry ✨


πŸŽ€ SYNOPSIS πŸŽ€

#include <embree4/rtcore.h>

void rtcSetGeometryVertexAttributeCount(
  RTCGeometry geometry,
  unsigned int vertexAttributeCount
);

πŸ’… DESCRIPTION πŸ’…

so the rtcSetGeometryVertexAttributeCount function sets the number of slots (that's the vertexAttributeCount parameter, bestie, keep up πŸ’–) for vertex attribute buffers β€” aka RTC_BUFFER_TYPE_VERTEX_ATTRIBUTE β€” that can be used for the geometry you passed in (the geometry parameter).

like, it's literally just telling Embree "hey, this geometry gets this many vertex attribute buffer slots", no cap. πŸ‘‘

🚨 but here's the vibe check: this function is supported only for these geometry types, so don't try it on anything else: - triangle meshes (RTC_GEOMETRY_TYPE_TRIANGLE) πŸ”Ί - quad meshes (RTC_GEOMETRY_TYPE_QUAD) πŸ”· - curves (RTC_GEOMETRY_TYPE_CURVE) πŸŒ€ - points (RTC_GEOMETRY_TYPE_POINT) ✨ - subdivision geometries (RTC_GEOMETRY_TYPE_SUBDIVISION) 🧚

😭 EXIT STATUS 😭

if it fails, an error code gets set, and you can go query it with rtcGetDeviceError. not me checking the error code every single time… πŸ’€ (you should too tho, fr fr)


🌈 SEE ALSO 🌈

  • rtcNewGeometry
  • RTCBufferType

that's the whole page, you ate that πŸ’… this was the rtcSetGeo...eStepCount(3) page from the Embree Ray Tracing Kernels 4 manual periodt, go build something iconic βœ¨πŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from