Working on lights, I'm conceeding and just using a fixed array. I think it will be faster in the long run, as I won't have to rebind the lights when I add/remove one. Also wrestling with really lame compiler erros with these templated pointers
This commit is contained in:
@@ -36,6 +36,8 @@ struct device {
|
||||
cl_uint comp_units;
|
||||
};
|
||||
|
||||
struct PackedData;
|
||||
|
||||
class Hardware_Caster : public RayCaster
|
||||
{
|
||||
public:
|
||||
@@ -50,7 +52,7 @@ public:
|
||||
// Both will create the view matrix, view res buffer
|
||||
void create_viewport(int width, int height, float v_fov, float h_fov) override;
|
||||
|
||||
void assign_lights(std::vector<char> *data) override;
|
||||
void assign_lights(std::vector<PackedData> *data) override;
|
||||
void assign_map(Old_Map *map) override;
|
||||
void assign_camera(Camera *camera) override;
|
||||
void validate() override;
|
||||
|
||||
@@ -4,7 +4,8 @@
|
||||
#include <Map.h>
|
||||
#include "Old_Map.h"
|
||||
#include "Camera.h"
|
||||
#include "LightController.h"
|
||||
|
||||
struct PackedData;
|
||||
|
||||
class RayCaster {
|
||||
public:
|
||||
@@ -24,7 +25,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<char> *data) = 0;
|
||||
virtual void assign_lights(std::vector<PackedData> *data) = 0;
|
||||
virtual void validate() = 0;
|
||||
|
||||
// draw will abstract the gl sharing and software rendering
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
#include "RayCaster.h"
|
||||
#pragma once
|
||||
#include "raycaster/RayCaster.h"
|
||||
#include <thread>
|
||||
|
||||
struct PackedData;
|
||||
|
||||
class Software_Caster : public RayCaster
|
||||
{
|
||||
public:
|
||||
@@ -15,7 +18,7 @@ public:
|
||||
// Both will create the view matrix, view res buffer
|
||||
void create_viewport(int width, int height, float v_fov, float h_fov) override;
|
||||
|
||||
void assign_lights(std::vector<char> *data) override;
|
||||
void assign_lights(std::vector<PackedData> *data) override;
|
||||
void assign_map(Old_Map *map) override;
|
||||
void assign_camera(Camera *camera) override;
|
||||
void validate() override;
|
||||
|
||||
Reference in New Issue
Block a user