44 #include <ACG/GL/acg_glew.hh> 46 #include "PostProcessorGrayPlugin.hh" 48 #include <ACG/GL/ScreenQuad.hh> 52 PostProcessorGrayscalePlugin::PostProcessorGrayscalePlugin() :
57 PostProcessorGrayscalePlugin::~PostProcessorGrayscalePlugin()
63 QString PostProcessorGrayscalePlugin::postProcessorName() {
64 return QString(
"Grayscale");
67 QString PostProcessorGrayscalePlugin::checkOpenGL() {
69 return QString(
"Insufficient OpenGL Version! OpenGL 3.0 or higher required");
75 void PostProcessorGrayscalePlugin::postProcess(
ACG::GLState* _glstate,
const std::vector<const PostProcessorInput*>& _input,
const PostProcessorOutput& _output) {
88 _input[0]->bindColorTex(0);
103 ACG::Vec2f texcoordOffset(1.0f /
float(_input[0]->width), 1.0f /
float(_input[0]->height));
void disable()
Resets to standard rendering pipeline.
static void draw(GLSL::Program *_prog=0)
Draw the screen quad.
GLSL::PtrProgram loadProgram(const char *vertexShaderFile, const char *tessControlShaderFile, const char *tessEvaluationShaderFile, const char *geometryShaderFile, const char *fragmentShaderFile, const GLSL::StringList *macros, bool verbose)
void setUniform(const char *_name, GLint _value)
Set int uniform to specified value.
GLSL::Program * shader_
shader
void use()
Enables the program object for using.
bool openGLVersion(const int _major, const int _minor, bool _verbose)