#ifndef ENGINE_HPP #define ENGINE_HPP #include #include #include #include #include #include #define CAMERA_WIDTH 50.0f #define CAMERA_NEAR 0.01f #define CAMERA_FAR 100.0f class Engine { public: Engine(void); int Init(void); int Update(void); void Shutdown(void); static void GlfwErrorCallback(int error, const char *s); void Instantiate(EngineObject* obj); GLFWwindow* main_window; int main_view; int keyboard_slots[GLFW_KEY_LAST]; int cursor_slots[GLFW_MOUSE_BUTTON_LAST+1]; int cursor_xpos; int cursor_ypos; static void keyboard_callback(GLFWwindow *window, int key, int scancode, int action, int mods); static void cursor_callback(GLFWwindow *window, double x, double y); static void cursor_button_callback(GLFWwindow *window, int button, int action, int mods); private: int width; int height; std::string title; bgfx::ProgramHandle program; bgfx::UniformHandle u_position; bgfx::UniformHandle u_rotation; bgfx::UniformHandle u_scale; std::vector objs; }; #endif