charcoal/charcoal-builtin/TexturedPipeline.h
2022-08-01 19:07:37 -05:00

33 lines
678 B
C++

#pragma once
#include "GLUtil.h"
#include "BuiltinPipeline.h"
#include "WithCamera.h"
#include "TexturedShaderProgram.h"
#include "TexturedBatch.h"
namespace charcoal
{
namespace builtin
{
namespace textured
{
class Pipeline : public builtin::Pipeline<ShaderProgram, Batch>, public WithCamera
{
protected:
void prepare_opengl() override
{
glEnable(GL_DEPTH_TEST);
glDepthFunc(GL_LESS);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glEnable(GL_BLEND);
}
void prepare_uniforms() override
{
glutil::uniform_matrix(0, get_camera()->get_world_to_view_matrix());
}
};
}
}
}