40617c8953
to specify the batch pipeline specified at StackOverflow See https://stackoverflow.com/questions/8923174/opengl-vao-best-practices#8923298
30 lines
595 B
C++
30 lines
595 B
C++
#pragma once
|
|
|
|
#include "stdafx.h"
|
|
|
|
#include <time.h>
|
|
|
|
class Scene
|
|
{
|
|
public:
|
|
virtual ~Scene() { };
|
|
|
|
// Called when the scene is ready to be initialized
|
|
virtual void init() = 0;
|
|
|
|
// Called when the scene is going to be used
|
|
// Should allocate all graphics memory.
|
|
virtual void use() = 0;
|
|
|
|
// Called when the scene is no longer going to be used
|
|
// Should release all graphics memory
|
|
virtual void unuse() = 0;
|
|
|
|
// Called when the frame is being updated
|
|
virtual void update(float delta_time, clock_t clock) = 0;
|
|
|
|
// Called when the frame is being rendered
|
|
virtual void render() = 0;
|
|
};
|
|
|