clray
changeset 18:4b1604f9798a
debugging...
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Mon, 09 Aug 2010 05:38:51 +0100 |
parents | 074a64b9d6bd |
children | 8baea9b66b50 |
files | rt.cl src/clray.cc src/rt.cc |
diffstat | 3 files changed, 8 insertions(+), 4 deletions(-) [+] |
line diff
1.1 --- a/rt.cl Mon Aug 09 05:03:17 2010 +0100 1.2 +++ b/rt.cl Mon Aug 09 05:38:51 2010 +0100 1.3 @@ -35,7 +35,6 @@ 1.4 1.5 struct Ray { 1.6 float4 origin, dir; 1.7 - float energy, pad[3]; 1.8 }; 1.9 1.10 struct SurfPoint { 1.11 @@ -79,6 +78,12 @@ 1.12 { 1.13 int idx = get_global_id(0); 1.14 1.15 + if(!idx) { 1.16 + for(int i=0; i<rinf->num_faces; i++) { 1.17 + outfaces[i] = faces[i]; 1.18 + } 1.19 + } 1.20 + 1.21 struct Scene scn; 1.22 scn.ambient = rinf->ambient; 1.23 scn.faces = faces;
2.1 --- a/src/clray.cc Mon Aug 09 05:03:17 2010 +0100 2.2 +++ b/src/clray.cc Mon Aug 09 05:38:51 2010 +0100 2.3 @@ -53,7 +53,7 @@ 2.4 return false; 2.5 } 2.6 2.7 - glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE); 2.8 + glutInitDisplayMode(GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE); 2.9 glutCreateWindow("OpenCL Raytracer"); 2.10 2.11 xsz = glutGet(GLUT_WINDOW_WIDTH);
3.1 --- a/src/rt.cc Mon Aug 09 05:03:17 2010 +0100 3.2 +++ b/src/rt.cc Mon Aug 09 05:38:51 2010 +0100 3.3 @@ -31,7 +31,6 @@ 3.4 3.5 struct Ray { 3.6 float origin[4], dir[4]; 3.7 - float energy; 3.8 }; 3.9 3.10 struct Light { 3.11 @@ -259,7 +258,7 @@ 3.12 py *= 100.0; 3.13 pz *= 100.0; 3.14 3.15 - Ray ray = {{0, 0, 0, 1}, {px, py, -pz, 1}, 1.0}; 3.16 + Ray ray = {{0, 0, 0, 1}, {px, py, -pz, 1}}; 3.17 return ray; 3.18 } 3.19