twiig

opencl function problems

Discussion created by twiig on Feb 23, 2010
Latest reply on Feb 24, 2010 by twiig

So, I have a chunk of code that generates a ray for ray tracing purposes, but when I move the ray creation to its own function, it no longer works.  Literally, I can move the exact same chunk of code to a function that returns the created ray, and it no longer works.

Any ideas?

ie, //works fine <create ray code>; <use ray code>; //doesnt work Ray CreateRay() { <create ray code>; return ray; } ... Ray ray = CreateRay(); <use ray code>

Outcomes