RenderKit / embree

Embree ray tracing kernels repository.
Apache License 2.0
2.32k stars 383 forks source link

access violation on rtcGetBufferData() #470

Open stefano-m5 opened 6 months ago

stefano-m5 commented 6 months ago

Hi, 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 with the following:

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

LPVOID pbuf = rtcGetBufferData(vertexBuffer);

and I am getting an access violation on rtcGetBufferData(). What am I doing wrong?