a8c4b05d2f
This commit gets creates the ObjectOriented scene and gets it working. The current test program swaps a triangle from small to large with the 1 and 2 keys on the keyboard. (1 for small and 2 for large). The small triangle is rendered by the simple scene and the large one is rendered by the object oriented one.
43 lines
674 B
C++
43 lines
674 B
C++
#pragma once
|
|
|
|
#include "stdafx.h"
|
|
|
|
#include "vec2.h"
|
|
|
|
#include "GLFWInputManager.h"
|
|
#include "FPS.h"
|
|
|
|
using namespace egm;
|
|
|
|
// TODO: Close without rendering next frame.
|
|
|
|
class Application
|
|
{
|
|
public:
|
|
Application();
|
|
virtual ~Application();
|
|
|
|
int run();
|
|
|
|
protected:
|
|
// Called on initialization of the application (called by base_init)
|
|
virtual void init() = 0;
|
|
|
|
virtual void update(float delta_time, clock_t clock) = 0;
|
|
|
|
virtual void render() = 0;
|
|
|
|
// Called on closing of the application (called before base_close)
|
|
virtual void close();
|
|
|
|
GLFWwindow* m_p_window;
|
|
|
|
GLFWInputManager m_glfw_input_manager;
|
|
|
|
FPS m_fps;
|
|
private:
|
|
void base_init();
|
|
void base_close();
|
|
};
|
|
|