3205680062
Also added a required prerender function to scene and application. This function is intended to be used as a way to prepare the scene to be rendered in its current state. For that reason, the delta time and the current clock tick are not passed to it.
35 lines
553 B
C++
35 lines
553 B
C++
#pragma once
|
|
|
|
#include "Scene.h"
|
|
|
|
#include "Camera3D.h"
|
|
|
|
#include "MyBatch.h"
|
|
#include "MySimpleShaderProgram.h"
|
|
|
|
class MySimpleCubeScene : public Scene
|
|
{
|
|
public:
|
|
MySimpleCubeScene(Application& application);
|
|
~MySimpleCubeScene();
|
|
|
|
void init() override;
|
|
|
|
void use() override;
|
|
|
|
void unuse() override;
|
|
|
|
void update(float delta_time, clock_t clock) override;
|
|
|
|
void prerender() override;
|
|
|
|
void render() override;
|
|
|
|
private:
|
|
MySimpleShaderProgram m_shader_program;
|
|
MySimpleShaderProgram::Renderable m_shape;
|
|
MyBatch m_batch;
|
|
Camera3D m_camera;
|
|
};
|
|
|