90bac19849
Finally got a 3D cube to be rendered. While doing it, fixed a bug in MeshFactory that caused it to allocate the incorrect amount of memory for each mesh.
33 lines
524 B
C++
33 lines
524 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 render() override;
|
|
|
|
private:
|
|
MySimpleShaderProgram m_shader_program;
|
|
MySimpleShaderProgram::Renderable m_shape;
|
|
MyBatch m_batch;
|
|
Camera3D m_camera;
|
|
};
|
|
|