50 #include <ACG/GL/acg_glew.hh> 52 #include "PostProcessorGrayPlugin.hh" 54 #include <ACG/GL/ScreenQuad.hh> 58 PostProcessorGrayscalePlugin::PostProcessorGrayscalePlugin() :
63 PostProcessorGrayscalePlugin::~PostProcessorGrayscalePlugin()
69 QString PostProcessorGrayscalePlugin::postProcessorName() {
70 return QString(
"Grayscale");
73 QString PostProcessorGrayscalePlugin::checkOpenGL() {
75 return QString(
"Insufficient OpenGL Version! OpenGL 3.0 or higher required");
81 void PostProcessorGrayscalePlugin::postProcess(
ACG::GLState* _glstate,
const std::vector<const PostProcessorInput*>& _input,
const PostProcessorOutput& _output) {
94 _input[0]->bindColorTex(0);
109 ACG::Vec2f texcoordOffset(1.0f /
float(_input[0]->width), 1.0f /
float(_input[0]->height));
123 #if QT_VERSION < 0x050000
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)
GLSL::Program * shader_
shader
void use()
Enables the program object for using.
bool openGLVersion(const int _major, const int _minor)
void setUniform(const char *_name, GLint _value)
Set int uniform to specified value.
void disable()
Resets to standard rendering pipeline.