2018-10-14 19:06:51 +00:00
|
|
|
#pragma once
|
|
|
|
|
2018-10-14 19:44:04 +00:00
|
|
|
#include "GLUtil.h"
|
|
|
|
#include "BuiltinPipeline.h"
|
2018-10-14 19:06:51 +00:00
|
|
|
#include "WithCamera.h"
|
|
|
|
#include "BasicShaderProgram.h"
|
|
|
|
#include "BasicBatch.h"
|
|
|
|
|
|
|
|
namespace charcoal
|
|
|
|
{
|
|
|
|
namespace builtin
|
|
|
|
{
|
|
|
|
namespace basic
|
|
|
|
{
|
2018-10-14 19:44:04 +00:00
|
|
|
class Pipeline : public builtin::Pipeline<ShaderProgram, Batch>, public WithCamera
|
2018-10-14 19:06:51 +00:00
|
|
|
{
|
2018-10-16 02:38:59 +00:00
|
|
|
protected:
|
2018-10-14 19:44:04 +00:00
|
|
|
void prepare_opengl() override
|
|
|
|
{
|
|
|
|
glEnable(GL_DEPTH_TEST);
|
|
|
|
glDepthFunc(GL_LESS);
|
|
|
|
}
|
|
|
|
|
|
|
|
void prepare_uniforms() override
|
|
|
|
{
|
|
|
|
glutil::uniform_matrix(0, get_camera()->get_world_to_view_matrix());
|
|
|
|
}
|
2018-10-14 19:06:51 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|