50 #include <ACG/GL/acg_glew.hh>
52 #include "PostProcessorSobelPlugin.hh"
54 #include <ACG/GL/ScreenQuad.hh>
58 PostProcessorSobelPlugin::PostProcessorSobelPlugin() :
63 PostProcessorSobelPlugin::~PostProcessorSobelPlugin()
69 QString PostProcessorSobelPlugin::postProcessorName() {
70 return QString(
"Sobel");
73 void PostProcessorSobelPlugin::postProcess(
ACG::GLState* _glstate,
const std::vector<const PostProcessorInput*>& _input,
const PostProcessorOutput& _output) {
85 _input[0]->bindColorTex(0);
100 ACG::Vec2f texcoordOffset(1.0f /
float(_input[0]->width), 1.0f /
float(_input[0]->height));
114 #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)
void use()
Enables the program object for using.
void setUniform(const char *_name, GLint _value)
Set int uniform to specified value.
GLSL::Program * shader_
shader
void disable()
Resets to standard rendering pipeline.