Created
July 19, 2014 18:20
-
-
Save Balletie/70349e75995c1a420b1d to your computer and use it in GitHub Desktop.
Voorbeeld render calls
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void RenderSession::render() { | |
unsigned int size = _scene->_cam->size(); | |
device_mem ray_dirs = _device->malloc(size * sizeof(cl_float4), READ_WRITE); | |
// Arguments: float4* output, cl_camera cam | |
void* argvalues[2] = { ray_dirs.ptr(), _scene->_cam.gpu_type() }; | |
size_t* arg_sizes; | |
// Blocking call! | |
_device->enqueue_kernel_range(KERNEL_PRODUCE_RAY, 2, arg_values, arg_sizes, 1, size); | |
// etc... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment