Added a function which creates VS filters that match the directory structure.

This commit is contained in:
MitchellHansen
2017-02-08 01:29:30 -08:00
parent 3571bdcd61
commit eb54125a64
6 changed files with 1445 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
#include "RayCaster.h"
#include <thread>
class Software_Caster : public RayCaster
{
public:
Software_Caster();
virtual ~Software_Caster();
int init() override;
// In interop mode, this will create a GL texture that we share
// Otherwise, it will create the pixel buffer and pass that in as an image, retrieving it each draw
// 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_map(Old_Map *map) override;
void assign_camera(Camera *camera) override;
void validate() override;
// draw will abstract the gl sharing and software rendering
// methods of retrieving the screen buffer
void compute() override;
void draw(sf::RenderWindow* window) override;
private:
void cast_viewport();
void cast_thread(int start_id, int end_id);
void cast_ray(int id);
void blit_pixel(sf::Color color, sf::Vector2i position, sf::Vector3i mask);
sf::Color global_light(sf::Color in, sf::Vector3i mask);
};