Fixed the way lights were linked to opencl, did some tweaking of the phong lighting.

This commit is contained in:
MitchellHansen
2017-01-15 13:17:33 -08:00
parent 7d7ed5367c
commit 129e475b15
11 changed files with 218 additions and 131 deletions

View File

@@ -24,7 +24,7 @@ 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_lights(std::vector<Light> lights) = 0;
virtual void assign_lights(std::vector<Light> *lights) = 0;
virtual void validate() = 0;
// draw will abstract the gl sharing and software rendering
@@ -39,7 +39,7 @@ protected:
Old_Map * map = nullptr;
Camera *camera = nullptr;
std::vector<Light> lights;
std::vector<Light> *lights;
int light_count = 0;
sf::Uint8 *viewport_image = nullptr;
sf::Vector4f *viewport_matrix = nullptr;