I have a raytrace software and would like to implement a part of it with OpenCL.
In order to do this I must pass the entire scene information to OpenCL...
My problem is that it is a complex 'structure/class' hierarchy that use a lot of pointers.
And I don't know an efficient way to pass this scene information to OpenCL.
By example :
Lights * lights;
InstanceList * instanceList;
Instance * instance;
Geometry * geometry;
Instance * next;
int GeometryType; // 0 = sphere, 1 = cylinder, 2 = Triangle mesh
Sphere * sphere;
Cylinder * cylinder;
TriangleMesh * triangleMesh;
So, with this (simplified) version of the scene, how can I pass this information to openCl and use it ?
Thanks for your help