# HG changeset patch # User John Tsiombikas # Date 1281328731 -3600 # Node ID 4b1604f9798abf82fb6499b4e246cdf41968a91e # Parent 074a64b9d6bdefab1214534926ffbf74b71d6d79 debugging... diff -r 074a64b9d6bd -r 4b1604f9798a rt.cl --- a/rt.cl Mon Aug 09 05:03:17 2010 +0100 +++ b/rt.cl Mon Aug 09 05:38:51 2010 +0100 @@ -35,7 +35,6 @@ struct Ray { float4 origin, dir; - float energy, pad[3]; }; struct SurfPoint { @@ -79,6 +78,12 @@ { int idx = get_global_id(0); + if(!idx) { + for(int i=0; inum_faces; i++) { + outfaces[i] = faces[i]; + } + } + struct Scene scn; scn.ambient = rinf->ambient; scn.faces = faces; diff -r 074a64b9d6bd -r 4b1604f9798a src/clray.cc --- a/src/clray.cc Mon Aug 09 05:03:17 2010 +0100 +++ b/src/clray.cc Mon Aug 09 05:38:51 2010 +0100 @@ -53,7 +53,7 @@ return false; } - glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE); + glutInitDisplayMode(GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE); glutCreateWindow("OpenCL Raytracer"); xsz = glutGet(GLUT_WINDOW_WIDTH); diff -r 074a64b9d6bd -r 4b1604f9798a src/rt.cc --- a/src/rt.cc Mon Aug 09 05:03:17 2010 +0100 +++ b/src/rt.cc Mon Aug 09 05:38:51 2010 +0100 @@ -31,7 +31,6 @@ struct Ray { float origin[4], dir[4]; - float energy; }; struct Light { @@ -259,7 +258,7 @@ py *= 100.0; pz *= 100.0; - Ray ray = {{0, 0, 0, 1}, {px, py, -pz, 1}, 1.0}; + Ray ray = {{0, 0, 0, 1}, {px, py, -pz, 1}}; return ray; }