quick save before the main.cpp refactor

This commit is contained in:
MitchellHansen
2017-09-23 13:05:50 -07:00
parent 0b42481020
commit 8c193acd40
8 changed files with 133 additions and 74 deletions

60
include/Application.h Normal file
View File

@@ -0,0 +1,60 @@
#pragma once
#ifdef linux
#include <CL/cl.h>
#include <CL/opencl.h>
#elif defined _WIN32
// Good lord, windows.h overwrote the std::min() max() definitions
#define NOMINMAX
#include <windows.h>
// As if hardware is ever going to move away from 1.2
#define CL_USE_DEPRECATED_OPENCL_1_2_APIS
#include <CL/cl.h>
#include <CL/opencl.h>
#elif defined TARGET_OS_MAC
#include <OpenGL/gl.h>
#include <OpenGL/OpenGL.h>
#include <OpenCL/opencl.h>
#include <OpenCL/cl_gl_ext.h>
#include <OpenCL/cl_ext.h>
#endif
#include "util.hpp"
#include <iostream>
#include <chrono>
#include <SFML/Graphics.hpp>
#include <SFML/Network.hpp>
#include "map/Old_Map.h"
#include "CLCaster.h"
#include "Vector4.hpp"
#include "Camera.h"
#include "Input.h"
#include "Pub_Sub.h"
#include "LightController.h"
#include "LightHandle.h"
#include "imgui/imgui-SFML.h"
#include "imgui/imgui.h"
#include "map/Map.h"
// Srsly people who macro error codes are the devil
#undef ERROR
#include "Logger.h"
class Application {
public:
const int WINDOW_X = 1536;
const int WINDOW_Y = 1024;
const int MAP_X = 256;
const int MAP_Y = 256;
const int MAP_Z = 256;
private:
static float elap_time();
};

View File

@@ -84,7 +84,7 @@ struct device_info {
struct PackedData;
class Hardware_Caster {
class CLCaster {
public:
@@ -148,8 +148,8 @@ public:
* as rendering of the computed cast.
*
*/
Hardware_Caster();
virtual ~Hardware_Caster();
CLCaster();
virtual ~CLCaster();
// Queries hardware, creates the command queue and context, and compiles kernel

View File

@@ -4,7 +4,7 @@
#include <numeric>
#include "util.hpp"
#include "Pub_Sub.h"
#include "Hardware_Caster.h"
#include "CLCaster.h"
#include "LightHandle.h"
@@ -48,12 +48,12 @@ struct PackedData {
};
class LightHandle;
class Hardware_Caster;
class CLCaster;
class LightController : public VrEventSubscriber {
public:
LightController(std::shared_ptr<Hardware_Caster> raycaster);
LightController(std::shared_ptr<CLCaster> raycaster);
~LightController();
// find a free light 'slot' and create