Finally converted the camera lens to a proper frustrum, no more fish eye
This commit is contained in:
@@ -41,9 +41,10 @@ class CLCaster;
|
||||
class Application {
|
||||
|
||||
public:
|
||||
static const int WINDOW_X = 1600;
|
||||
static const int WINDOW_Y = 900;
|
||||
|
||||
static const int WINDOW_X = 1366;
|
||||
static const int WINDOW_Y = 768;
|
||||
// static const int WINDOW_X = 1920;
|
||||
// static const int WINDOW_Y = 1080;
|
||||
static const int MAP_X;
|
||||
static const int MAP_Y;
|
||||
static const int MAP_Z;
|
||||
|
||||
@@ -113,11 +113,13 @@ public:
|
||||
// Creates a texture to send to the GPU via height and width
|
||||
// Creates a viewport vector array via vertical and horizontal fov
|
||||
bool create_viewport(int width, int height, float v_fov, float h_fov) ;
|
||||
|
||||
bool release_viewport();
|
||||
|
||||
// Light controllers own the copy of the PackedData array.
|
||||
// We receive a pointer to the array and USE_HOST_POINTER to map the memory to the GPU
|
||||
bool assign_lights(std::vector<PackedData> *data) ;
|
||||
|
||||
// TODO: Double maps??
|
||||
// We take a ptr to the map and create the map, and map_dimensions buffer for the GPU
|
||||
bool assign_map(std::shared_ptr<Map> map);
|
||||
bool release_map();
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#include <SFML/Graphics/Texture.hpp>
|
||||
#include <algorithm>
|
||||
#include <tuple>
|
||||
#include "Vector4.hpp"
|
||||
|
||||
const double PI = 3.141592653589793238463;
|
||||
const float PI_F = 3.14159265358979f;
|
||||
@@ -108,7 +109,6 @@ inline sf::Vector3f Normalize(sf::Vector3f in) {
|
||||
return r;
|
||||
}
|
||||
|
||||
|
||||
inline float DotProduct(sf::Vector3f a, sf::Vector3f b){
|
||||
return a.x * b.x + a.y * b.y + a.z * b.z;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user