Developer Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
dof.hh
1 /*===========================================================================*\
2 * *
3 * OpenFlipper *
4 * Copyright (C) 2001-2011 by Computer Graphics Group, RWTH Aachen *
5 * www.openflipper.org *
6 * *
7 *--------------------------------------------------------------------------- *
8 * This file is part of OpenFlipper. *
9 * *
10 * OpenFlipper is free software: you can redistribute it and/or modify *
11 * it under the terms of the GNU Lesser General Public License as *
12 * published by the Free Software Foundation, either version 3 of *
13 * the License, or (at your option) any later version with the *
14 * following exceptions: *
15 * *
16 * If other files instantiate templates or use macros *
17 * or inline functions from this file, or you compile this file and *
18 * link it with other files to produce an executable, this file does *
19 * not by itself cause the resulting executable to be covered by the *
20 * GNU Lesser General Public License. This exception does not however *
21 * invalidate any other reasons why the executable file might be *
22 * covered by the GNU Lesser General Public License. *
23 * *
24 * OpenFlipper is distributed in the hope that it will be useful, *
25 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
26 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
27 * GNU Lesser General Public License for more details. *
28 * *
29 * You should have received a copy of the GNU LesserGeneral Public *
30 * License along with OpenFlipper. If not, *
31 * see <http://www.gnu.org/licenses/>. *
32 * *
33 \*===========================================================================*/
34 
35 /*===========================================================================*\
36 * *
37 * $Revision: 17080 $ *
38 * $LastChangedBy: moeller $ *
39 * $Date: 2013-07-19 12:58:31 +0200 (Fri, 19 Jul 2013) $ *
40 * *
41 \*===========================================================================*/
42 
43 
44 #include <QObject>
45 
48 
49 #include <ACG/GL/globjects.hh>
50 #include <ACG/ShaderUtils/GLSLShader.hh>
51 #include "sat.hh"
52 
53 
55 {
56  Q_OBJECT
57  Q_INTERFACES(BaseInterface)
58  Q_INTERFACES(PostProcessorInterface)
59 
60 #if QT_VERSION >= 0x050000
61  Q_PLUGIN_METADATA(IID "org.OpenFlipper.Plugins.Plugin-PostProcessorDoF")
62 #endif
63 
64 public:
67 
68 public :
69  QString name() { return (QString("Depth of Field Postprocessor Plugin")); };
70  QString description( ) { return (QString(tr("Approximate depth of field via SAT"))); };
71 
72 
73  public slots:
74  QString version() { return QString("1.0"); };
75 
76  private slots:
77 
78  void postProcess(ACG::GLState* _glstate, const std::vector<const PostProcessorInput*>& _input, const PostProcessorOutput& _output);
79 
80  QString postProcessorName() {return QString("Depth of Field");}
81 
82  QString checkOpenGL();
83 
84 private:
85 
86  ACG::TextureBuffer testBuffer_;
87  ACG::TextureBuffer testBufferOut_;
88 
89  ACG::Texture2D testImg2D_;
90  ACG::Texture2D testImg2DOut_;
91 
92  ACG::Texture2D scene32F_;
93  ACG::Texture2D sat32F_;
94 
95 
96  SATPlan* plan2D_;
97 
98  // prefixsum of individual blocksums
99  ACG::TextureBuffer blockSums_;
100 };
101 
QString name()
Return a name for the plugin.
Definition: dof.hh:69
Definition: sat.hh:151
Interface to add global image post processor functions from within plugins.
Interface class from which all plugins have to be created.
QString description()
Return a description of what the plugin is doing.
Definition: dof.hh:70