Embree 4: access violation on rtcGetBufferData()

27 views Asked by At

I am new to embree and I am trying to code my first test program on VS plain C with embree 4.3 on windows. I am defining a simple geometry buffer with the following:

RTCBuffer vertexBuffer = rtcSetNewGeometryBuffer(mesh, RTC_BUFFER_TYPE_VERTEX, 0, RTC_FORMAT_FLOAT3, sizeof(float) * 3 ,3 * pointn);

LPVOID pbuf = rtcGetBufferData(vertexBuffer);

On the debugger, vertexBuffer is not NULL, and appears to be a valid pointer to the structure. However, I am getting an access violation on rtcGetBufferData().

What am I doing wrong?

0

There are 0 answers