The new rendering method now works on the full compat case.

Added a kernel to help test opencl data passing
renamed the kernels, buffers, etc.
This commit is contained in:
MitchellHansen
2016-11-04 03:28:23 -07:00
parent 5528e03c69
commit d1bd4ce667
13 changed files with 267 additions and 685 deletions

View File

@@ -24,10 +24,12 @@ public:
virtual void assign_map(Old_Map *map) = 0;
virtual void assign_camera(Camera *camera) = 0;
virtual void create_viewport(int width, int height, float v_fov, float h_fov) = 0;
virtual void assign_light(std::string light_id, Light light) = 0;
virtual void assign_lights(std::vector<Light> lights) = 0;
virtual void validate() = 0;
// draw will abstract the gl sharing and software rendering
// methods of retrieving the screen buffer
virtual void compute() = 0;
virtual void draw(sf::RenderWindow* window) = 0;
protected:
@@ -35,11 +37,11 @@ protected:
sf::Sprite viewport_sprite;
sf::Texture viewport_texture;
Old_Map * map;
Camera *camera;
std::map<std::string, Light> light_map;
sf::Uint8 *viewport_image;
sf::Vector4f *viewport_matrix;
Old_Map * map = nullptr;
Camera *camera = nullptr;
std::vector<Light> lights;
sf::Uint8 *viewport_image = nullptr;
sf::Vector4f *viewport_matrix = nullptr;
int error = 0;