added relative camera controls, now handles like an actual fly cam.

This commit is contained in:
MitchellHansen
2016-09-22 21:48:38 -07:00
parent 92aee8c4ca
commit e13280bb07
7 changed files with 185 additions and 35 deletions

View File

@@ -59,7 +59,9 @@ int CL_Wrapper::acquire_platform_and_device(){
// falling back to the cpu with the fastest clock if we weren't able to find one
device current_best_device;
current_best_device.type = -1; // Set this to -1 so the first run always selects a new device
current_best_device.type = 0; // Set this to 0 so the first run always selects a new device
current_best_device.clock_frequency = 0;
current_best_device.comp_units = 0;
for (auto kvp: plt_ids){
@@ -86,7 +88,7 @@ int CL_Wrapper::acquire_platform_and_device(){
platform_id = current_best_device.platform;
device_id = current_best_device.id;
return 0;
return 1;
};
int CL_Wrapper::create_shared_context() {
@@ -272,7 +274,6 @@ int CL_Wrapper::store_buffer(cl_mem buffer, std::string buffer_name){
int CL_Wrapper::run_kernel(std::string kernel_name, const int work_size){
const int WORKER_SIZE = 10;
size_t global_work_size[1] = { static_cast<size_t>(work_size) };
cl_kernel kernel = kernel_map.at(kernel_name);