Commit dd6a295c authored by Philip A Levis's avatar Philip A Levis
Browse files

Merge branch 'simulator_prototype' into 'master'

Simulator prototype

See merge request !28
parents b872e2af b4c96fc9
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 50;
objects = {
/* Begin PBXBuildFile section */
09233978248EE68100EB0812 /* stb_image.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 09233977248EE68100EB0812 /* stb_image.cpp */; };
097C3423248ED243003FB6D4 /* libglfw.3.3.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 097C3422248ED243003FB6D4 /* libglfw.3.3.dylib */; };
09C2DB53248EC4C9000399D2 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 09C2DB52248EC4C9000399D2 /* main.cpp */; };
09C2DB5A248EC4EB000399D2 /* glad.c in Sources */ = {isa = PBXBuildFile; fileRef = 09C2DB59248EC4EB000399D2 /* glad.c */; };
09C2DB5E248EC8BF000399D2 /* libglfw.3.3.dylib in Embed Libraries */ = {isa = PBXBuildFile; fileRef = 09C2DB5C248EC8BF000399D2 /* libglfw.3.3.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
/* End PBXBuildFile section */
/* Begin PBXCopyFilesBuildPhase section */
09C2DB4D248EC4C9000399D2 /* CopyFiles */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = /usr/share/man/man1/;
dstSubfolderSpec = 0;
files = (
);
runOnlyForDeploymentPostprocessing = 1;
};
09C2DB5F248EC8BF000399D2 /* Embed Libraries */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 10;
files = (
09C2DB5E248EC8BF000399D2 /* libglfw.3.3.dylib in Embed Libraries */,
);
name = "Embed Libraries";
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
09233972248EE2A500EB0812 /* shaderClass.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = shaderClass.h; sourceTree = "<group>"; };
09233975248EE43900EB0812 /* stb_image.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = stb_image.h; sourceTree = "<group>"; };
09233977248EE68100EB0812 /* stb_image.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = stb_image.cpp; sourceTree = "<group>"; };
097C3422248ED243003FB6D4 /* libglfw.3.3.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libglfw.3.3.dylib; path = ../../../../usr/local/lib/libglfw.3.3.dylib; sourceTree = "<group>"; };
09C2DB4F248EC4C9000399D2 /* GraphicsLib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = GraphicsLib; sourceTree = BUILT_PRODUCTS_DIR; };
09C2DB52248EC4C9000399D2 /* main.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = main.cpp; sourceTree = "<group>"; };
09C2DB59248EC4EB000399D2 /* glad.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = glad.c; path = ../../../Downloads/glad/src/glad.c; sourceTree = "<group>"; };
09C2DB5C248EC8BF000399D2 /* libglfw.3.3.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libglfw.3.3.dylib; path = ../../libglfw.3.3.dylib; sourceTree = "<group>"; };
09E0CE93248EEB2C00F29579 /* shader.vert */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.glsl; path = shader.vert; sourceTree = "<group>"; };
09E0CE94248EEB4000F29579 /* shader.frag */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.glsl; path = shader.frag; sourceTree = "<group>"; };
09E0CE96248F04A700F29579 /* awesomeface.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = awesomeface.png; path = Textures/awesomeface.png; sourceTree = "<group>"; };
09E0CE97248F04AB00F29579 /* container.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; name = container.jpg; path = Textures/container.jpg; sourceTree = "<group>"; };
09E0CE98248F0B1300F29579 /* cameraClass.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cameraClass.h; sourceTree = "<group>"; };
09E0CE99248F298E00F29579 /* glad.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = glad.c; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
09C2DB4C248EC4C9000399D2 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
097C3423248ED243003FB6D4 /* libglfw.3.3.dylib in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
09C2DB46248EC4C9000399D2 = {
isa = PBXGroup;
children = (
09C2DB51248EC4C9000399D2 /* GraphicsLib */,
09C2DB50248EC4C9000399D2 /* Products */,
09C2DB5B248EC8BF000399D2 /* Frameworks */,
);
sourceTree = "<group>";
};
09C2DB50248EC4C9000399D2 /* Products */ = {
isa = PBXGroup;
children = (
09C2DB4F248EC4C9000399D2 /* GraphicsLib */,
);
name = Products;
sourceTree = "<group>";
};
09C2DB51248EC4C9000399D2 /* GraphicsLib */ = {
isa = PBXGroup;
children = (
09233977248EE68100EB0812 /* stb_image.cpp */,
09233975248EE43900EB0812 /* stb_image.h */,
09E0CE93248EEB2C00F29579 /* shader.vert */,
09E0CE94248EEB4000F29579 /* shader.frag */,
09233972248EE2A500EB0812 /* shaderClass.h */,
09E0CE98248F0B1300F29579 /* cameraClass.h */,
09C2DB59248EC4EB000399D2 /* glad.c */,
09E0CE99248F298E00F29579 /* glad.c */,
09E0CE96248F04A700F29579 /* awesomeface.png */,
09E0CE97248F04AB00F29579 /* container.jpg */,
09C2DB52248EC4C9000399D2 /* main.cpp */,
);
path = GraphicsLib;
sourceTree = "<group>";
};
09C2DB5B248EC8BF000399D2 /* Frameworks */ = {
isa = PBXGroup;
children = (
097C3422248ED243003FB6D4 /* libglfw.3.3.dylib */,
09C2DB5C248EC8BF000399D2 /* libglfw.3.3.dylib */,
);
name = Frameworks;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
09C2DB4E248EC4C9000399D2 /* GraphicsLib */ = {
isa = PBXNativeTarget;
buildConfigurationList = 09C2DB56248EC4C9000399D2 /* Build configuration list for PBXNativeTarget "GraphicsLib" */;
buildPhases = (
09C2DB4B248EC4C9000399D2 /* Sources */,
09C2DB4C248EC4C9000399D2 /* Frameworks */,
09C2DB4D248EC4C9000399D2 /* CopyFiles */,
09C2DB5F248EC8BF000399D2 /* Embed Libraries */,
);
buildRules = (
);
dependencies = (
);
name = GraphicsLib;
productName = GraphicsLib;
productReference = 09C2DB4F248EC4C9000399D2 /* GraphicsLib */;
productType = "com.apple.product-type.tool";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
09C2DB47248EC4C9000399D2 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 1110;
ORGANIZATIONNAME = "Samsara Durvasula";
TargetAttributes = {
09C2DB4E248EC4C9000399D2 = {
CreatedOnToolsVersion = 11.1;
};
};
};
buildConfigurationList = 09C2DB4A248EC4C9000399D2 /* Build configuration list for PBXProject "GraphicsLib" */;
compatibilityVersion = "Xcode 9.3";
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = 09C2DB46248EC4C9000399D2;
productRefGroup = 09C2DB50248EC4C9000399D2 /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
09C2DB4E248EC4C9000399D2 /* GraphicsLib */,
);
};
/* End PBXProject section */
/* Begin PBXSourcesBuildPhase section */
09C2DB4B248EC4C9000399D2 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
09233978248EE68100EB0812 /* stb_image.cpp in Sources */,
09C2DB53248EC4C9000399D2 /* main.cpp in Sources */,
09C2DB5A248EC4EB000399D2 /* glad.c in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin XCBuildConfiguration section */
09C2DB54248EC4C9000399D2 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.14;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
};
name = Debug;
};
09C2DB55248EC4C9000399D2 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.14;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
SDKROOT = macosx;
};
name = Release;
};
09C2DB57248EC4C9000399D2 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_STYLE = Automatic;
HEADER_SEARCH_PATHS = /usr/local/include;
"LIBRARY_SEARCH_PATHS[arch=*]" = /usr/local/lib;
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Debug;
};
09C2DB58248EC4C9000399D2 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_STYLE = Automatic;
HEADER_SEARCH_PATHS = /usr/local/include;
"LIBRARY_SEARCH_PATHS[arch=*]" = /usr/local/lib;
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
09C2DB4A248EC4C9000399D2 /* Build configuration list for PBXProject "GraphicsLib" */ = {
isa = XCConfigurationList;
buildConfigurations = (
09C2DB54248EC4C9000399D2 /* Debug */,
09C2DB55248EC4C9000399D2 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
09C2DB56248EC4C9000399D2 /* Build configuration list for PBXNativeTarget "GraphicsLib" */ = {
isa = XCConfigurationList;
buildConfigurations = (
09C2DB57248EC4C9000399D2 /* Debug */,
09C2DB58248EC4C9000399D2 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 09C2DB47248EC4C9000399D2 /* Project object */;
}
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:GraphicsLib.xcodeproj">
</FileRef>
</Workspace>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SchemeUserState</key>
<dict>
<key>GraphicsLib.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
</dict>
</dict>
</dict>
</plist>
/* Camera implementation taken from https://learnopengl.com/Getting-started/Camera */
#ifndef CAMERA_H
#define CAMERA_H
#include <glad/glad.h>
#include <glm/glm//glm.hpp>
#include <glm/glm/gtc/matrix_transform.hpp>
#include <vector>
// Defines several possible options for camera movement. Used as abstraction to stay away from window-system specific input methods
enum Camera_Movement {
FORWARD,
BACKWARD,
LEFT,
RIGHT
};
// Default camera values
const float YAW = -90.0f;
const float PITCH = 0.0f;
const float SPEED = 2.5f;
const float SENSITIVITY = 0.1f;
const float ZOOM = 45.0f;
// An abstract camera class that processes input and calculates the corresponding Euler Angles, Vectors and Matrices for use in OpenGL
class Camera
{
public:
// camera Attributes
glm::vec3 Position;
glm::vec3 Front;
glm::vec3 Up;
glm::vec3 Right;
glm::vec3 WorldUp;
// euler Angles
float Yaw;
float Pitch;
// camera options
float MovementSpeed;
float MouseSensitivity;
float Zoom;
// constructor with vectors
Camera(glm::vec3 position = glm::vec3(0.0f, 0.0f, 0.0f), glm::vec3 up = glm::vec3(0.0f, 1.0f, 0.0f), float yaw = YAW, float pitch = PITCH) : Front(glm::vec3(0.0f, 0.0f, -1.0f)), MovementSpeed(SPEED), MouseSensitivity(SENSITIVITY), Zoom(ZOOM)
{
Position = position;
WorldUp = up;
Yaw = yaw;
Pitch = pitch;
updateCameraVectors();
}
// constructor with scalar values
Camera(float posX, float posY, float posZ, float upX, float upY, float upZ, float yaw, float pitch) : Front(glm::vec3(0.0f, 0.0f, -1.0f)), MovementSpeed(SPEED), MouseSensitivity(SENSITIVITY), Zoom(ZOOM)
{
Position = glm::vec3(posX, posY, posZ);
WorldUp = glm::vec3(upX, upY, upZ);
Yaw = yaw;
Pitch = pitch;
updateCameraVectors();
}
// returns the view matrix calculated using Euler Angles and the LookAt Matrix
glm::mat4 GetViewMatrix()
{
return glm::lookAt(Position, Position + Front, Up);
}
// processes input received from any keyboard-like input system. Accepts input parameter in the form of camera defined ENUM (to abstract it from windowing systems)
void ProcessKeyboard(Camera_Movement direction, float deltaTime)
{
float velocity = MovementSpeed * deltaTime;
if (direction == FORWARD)
Position += Front * velocity;
if (direction == BACKWARD)
Position -= Front * velocity;
if (direction == LEFT)
Position -= Right * velocity;
if (direction == RIGHT)
Position += Right * velocity;
}
// processes input received from a mouse input system. Expects the offset value in both the x and y direction.
void ProcessMouseMovement(float xoffset, float yoffset, GLboolean constrainPitch = true)
{
xoffset *= MouseSensitivity;
yoffset *= MouseSensitivity;
Yaw += xoffset;
Pitch += yoffset;
// make sure that when pitch is out of bounds, screen doesn't get flipped
if (constrainPitch)
{
if (Pitch > 89.0f)
Pitch = 89.0f;
if (Pitch < -89.0f)
Pitch = -89.0f;
}
// update Front, Right and Up Vectors using the updated Euler angles
updateCameraVectors();
}
// processes input received from a mouse scroll-wheel event. Only requires input on the vertical wheel-axis
void ProcessMouseScroll(float yoffset)
{
Zoom -= (float)yoffset;
if (Zoom < 1.0f)
Zoom = 1.0f;
if (Zoom > 45.0f)
Zoom = 45.0f;
}
private:
// calculates the front vector from the Camera's (updated) Euler Angles
void updateCameraVectors()
{
// calculate the new Front vector
glm::vec3 front;
front.x = cos(glm::radians(Yaw)) * cos(glm::radians(Pitch));
front.y = sin(glm::radians(Pitch));
front.z = sin(glm::radians(Yaw)) * cos(glm::radians(Pitch));
Front = glm::normalize(front);
// also re-calculate the Right and Up vector
Right = glm::normalize(glm::cross(Front, WorldUp)); // normalize the vectors, because their length gets closer to 0 the more you look up or down which results in slower movement.
Up = glm::normalize(glm::cross(Right, Front));
}
};
#endif
This diff is collapsed.
/*
Slightly adapted main loop adapted from https://learnopengl.com/Lighting/Materials
Spawns a pre-defined number of "flier" objects and renders them with a sinusoidal
color loop.
*/
#include <glad/glad.h>
#include <GLFW/glfw3.h>
#include "stb_image.h"
#include "shaderClass.h"
#include "cameraClass.h"
#include "modelClass.h"
#include <glm/glm/glm.hpp>
#include <glm/glm/gtc/matrix_transform.hpp>
#include <glm/glm/gtc/type_ptr.hpp>
#include <fstream>
#include <nlohmann/json.hpp>
#include <sys/socket.h>
#include <arpa/inet.h>
void framebuffer_size_callback(GLFWwindow* window, int width, int height);
void mouse_callback(GLFWwindow* window, double xpos, double ypos);
void scroll_callback(GLFWwindow* window, double xoffset, double yoffset);
void processInput(GLFWwindow *window);
// Specify output window width and height.
const unsigned int SCR_WIDTH = 800;
const unsigned int SCR_HEIGHT = 600;
// Position camera within scene.
Camera camera(glm::vec3(0.0f, 0.0f, 3.0f));
float lastX = SCR_WIDTH / 2.0f;
float lastY = SCR_HEIGHT / 2.0f;
bool firstMouse = true;
// Used for render loop.
float deltaTime = 0.0f;
float lastFrame = 0.0f;
// Positions a cube light at a specific position within the scene.
glm::vec3 lightPos(1.2f, 1.0f, 2.0f);
struct FlierFace {
std::string face_name;
float x_loc;
float y_loc;