WORKING! Awesome! It now casts fully inside the gpu,

context is then switched to gl and then rendered via sfml.
It has no loop, no controls, and the aspect ratio is off,
but holy hell it works!
This commit is contained in:
2016-09-01 22:45:48 -07:00
parent c565d0facc
commit cf607382a9
5 changed files with 172 additions and 17 deletions

View File

@@ -39,7 +39,7 @@ public:
int compile_kernel(std::string kernel_source, bool is_path, std::string kernel_name);
int set_kernel_arg(std::string kernel_name, int index, std::string buffer_name);
int store_buffer(cl_mem, std::string buffer_name);
int run_kernel(std::string kernel_name);
int run_kernel(std::string kernel_name, const int work_size);
bool assert(int error_code, std::string function_name);

View File

@@ -34,6 +34,12 @@ public:
char *list;
sf::Vector3i dimensions;
void setVoxel(sf::Vector3i position, int val){
list[position.x + dimensions.x * (position.y + dimensions.z * position.z)] = val;
};
void moveLight(sf::Vector2f in);
sf::Vector3f global_light;