#include "MyObjectOrientedScene.h" #include "DrawMode.h" #include "MeshFactory.h" MyObjectOrientedScene::MyObjectOrientedScene() : m_shape(MeshFactory::gen( DrawMode::DRAW_TRIANGLES, MyShaderProgram::VertexType(-0.5f, 0.4f, 0.0f), MyShaderProgram::VertexType(0.5f, 0.4f, 0.0f), MyShaderProgram::VertexType(-0.8f, -0.4f, 0.0f), MyShaderProgram::VertexType(0.8f, -0.4f, 0.0f) ), DrawMode::DRAW_TRIANGLES), m_batch(&m_shape, 1, 1) { } MyObjectOrientedScene::~MyObjectOrientedScene() { } void MyObjectOrientedScene::init() { m_batch.init(); } void MyObjectOrientedScene::use() { glEnable(GL_DEPTH_TEST); glDepthFunc(GL_LESS); } void MyObjectOrientedScene::unuse() { } void MyObjectOrientedScene::update(float delta_time, clock_t clock) { } void MyObjectOrientedScene::render() { glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); m_shader_program.use(); m_batch.render(); }