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.
34 lines
428 B
C++
34 lines
428 B
C++
#pragma once
|
|
|
|
#include "Scene.h"
|
|
|
|
#include "MyBatch.h"
|
|
#include "MyShaderProgram.h"
|
|
|
|
#include "MyTriangle.h"
|
|
|
|
class MySimpleScene :
|
|
public Scene
|
|
{
|
|
public:
|
|
MySimpleScene();
|
|
~MySimpleScene();
|
|
|
|
void init() override;
|
|
|
|
void use() override;
|
|
|
|
void unuse() override;
|
|
|
|
void update(float delta_time, clock_t clock) override;
|
|
|
|
void render() override;
|
|
|
|
private:
|
|
MyShaderProgram m_shader_program;
|
|
|
|
GLuint m_vbo;
|
|
GLuint m_vao;
|
|
};
|
|
|