40617c8953
to specify the batch pipeline specified at StackOverflow See https://stackoverflow.com/questions/8923174/opengl-vao-best-practices#8923298
36 lines
456 B
C++
36 lines
456 B
C++
#include "MySimpleScene.h"
|
|
|
|
MySimpleScene::MySimpleScene()
|
|
{
|
|
}
|
|
|
|
|
|
MySimpleScene::~MySimpleScene()
|
|
{
|
|
}
|
|
|
|
void MySimpleScene::init()
|
|
{
|
|
m_shader_program.init();
|
|
m_triangle.init();
|
|
}
|
|
|
|
void MySimpleScene::use()
|
|
{
|
|
}
|
|
|
|
void MySimpleScene::unuse()
|
|
{
|
|
}
|
|
|
|
void MySimpleScene::update(float delta_time, clock_t clock)
|
|
{
|
|
}
|
|
|
|
void MySimpleScene::render()
|
|
{
|
|
m_shader_program.use();
|
|
glBindBuffer(GL_ARRAY_BUFFER, m_triangle.get_vbo());
|
|
glDrawArrays(GL_TRIANGLES, 0, 3);
|
|
}
|