charcoal/OpenGLEngine/MyApplication.h
elipzer a933c19fa9 Got the scene to render.
Need to re-make the builtin version. The problem, again, was caused
by vtables. Need to find a way to make interfaces without virtual
methods to remove the need for vtables. Found a good stackoverflow
article on this.

https://stackoverflow.com/questions/44317289/c-interface-without-virtual-functions

The Positioned, Normaled, Textured, etc. Interfaces should be
re-made using this format.
2018-09-13 13:35:30 -04:00

40 lines
748 B
C++

#pragma once
#include "Application.h"
#include "MyBasicScene.h"
#include "MySimple2DScene.h"
#include "MySimple3DScene.h"
#include "MySimpleCubeScene.h"
#include "BasicScene.h"
using namespace charcoal;
class MyApplication :
public Application
{
public:
MyApplication(int width = -1, int height = -1);
protected:
void init() override;
void update(float delta_time, clock_t clock) override;
void prerender() override;
void render() override;
void close() override;
private:
void swap_scene(Scene* scene);
Scene* m_p_current_scene = nullptr;
MyBasicScene m_basic_scene;
MySimple2DScene m_simple_2d_scene;
MySimple3DScene m_simple_3d_scene;
MySimpleCubeScene m_simple_cube_scene;
builtin::BasicScene m_builtin_basic_scene;
};