Added zooming and scrolling, everything draws nicely now

This commit is contained in:
MitchellHansen
2017-03-31 22:14:14 -07:00
parent 2dfed7958a
commit ed651853f6
4 changed files with 53 additions and 31 deletions

View File

@@ -23,6 +23,7 @@
#include <SFML/Graphics.hpp>
#include <unordered_map>
#include <iostream>
#include "Vector4.hpp"
struct device {
@@ -47,7 +48,7 @@ public:
OpenCL(sf::Vector2i resolution);
~OpenCL();
bool init();
bool init(sf::Vector4f *range);
void run_kernel(std::string kernel_name);
@@ -95,9 +96,11 @@ private:
// Create a buffer with CL_MEM_READ_ONLY and CL_MEM_COPY_HOST_PTR
int create_buffer(std::string buffer_name, cl_uint size, void* data);
// Create a buffer with user defined data access flags
int create_buffer(std::string buffer_name, cl_uint size, void* data, cl_mem_flags flags);
// Store a cl_mem object in the buffer map <string:name, cl_mem:buffer>
int store_buffer(cl_mem buffer, std::string buffer_name);