GPUOpen-LibrariesAndSDKs / RadeonRays_SDK

Radeon Rays is ray intersection acceleration library for hardware and software multiplatforms using CPU and GPU
MIT License
1.07k stars 192 forks source link

Tutorials (CornellBox and CornellBoxShadow) use wrong number of vertices #181

Open norsetto opened 6 years ago

norsetto commented 6 years ago

In the CreateMesh call, nvert is passed as:

int nvert = objshape.mesh.positions.size()

but objshape.mesh.position is a std::vector\<float> not a std::vector\<float3> so this should really be:

int nvert = objshape.mesh.positions.size() / 3

manhnt9 commented 6 years ago

It's just the naming convention is wrong, API needs objshape.mesh.positions.size() to work. Changing nvert to something else would be better.