clray

diff src/rt.cc @ 41:057b8575a1c1

- changed the membuffer into an imagebuffer for the non-GL/CL-interop case - fixed the segfault
author John Tsiombikas <nuclear@member.fsf.org>
date Fri, 27 Aug 2010 20:39:55 +0100
parents 1bcbb53b3505
children f9eec11e5acc
line diff
     1.1 --- a/src/rt.cc	Fri Aug 27 19:00:14 2010 +0100
     1.2 +++ b/src/rt.cc	Fri Aug 27 20:39:55 2010 +0100
     1.3 @@ -94,7 +94,11 @@
     1.4  	// XXX now we can actually destroy the original kdtree and keep only the GPU version
     1.5  
     1.6  	/* setup argument buffers */
     1.7 +#ifdef CLGL_INTEROP
     1.8  	prog->set_arg_texture(KARG_FRAMEBUFFER, ARG_WR, tex);
     1.9 +#else
    1.10 +	prog->set_arg_image(KARG_FRAMEBUFFER, ARG_WR, xsz, ysz);
    1.11 +#endif
    1.12  	prog->set_arg_buffer(KARG_RENDER_INFO, ARG_RD, sizeof rinf, &rinf);
    1.13  	prog->set_arg_buffer(KARG_FACES, ARG_RD, rinf.num_faces * sizeof(Face), faces);
    1.14  	prog->set_arg_buffer(KARG_MATLIB, ARG_RD, scn->get_num_materials() * sizeof(Material), scn->get_materials());