eo/include/engine.hpp

45 lines
963 B
C++

#ifndef ENGINE_HPP
#define ENGINE_HPP
#include <iostream>
#include <bx/file.h>
#include <bx/bx.h>
#include <bgfx/bgfx.h>
#include <GLFW/glfw3.h>
#include <engine/object.hpp>
#define CAMERA_WIDTH 50.0f
#define CAMERA_NEAR 0.01f
#define CAMERA_FAR 100.0f
class Engine {
public:
Engine(void);
int Init(void);
void Start(void);
int Update(void);
void Shutdown(void);
static void GlfwErrorCallback(int error, const char *s);
void Instantiate(EngineObject* obj);
unsigned int GetInput(void);
GLFWwindow* main_window;
int main_view;
private:
int width;
int height;
std::string title;
bgfx::ProgramHandle program;
bgfx::UniformHandle u_position;
bgfx::UniformHandle u_rotation;
bgfx::UniformHandle u_scale;
bgfx::UniformHandle u_texture_color;
std::vector<EngineObject*> objs;
};
#endif