Basic Image AlgorithmS Library  2.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
OutputUnderwater.hh
1 #ifndef OUTPUT_UNDERWATER_HH_
2 #define OUTPUT_UNDERWATER_HH_
3 
4 #include <bias_config.h>
5 
6 #ifndef BIAS_HAVE_OPENGL
7 # error You need BIAS with USE_OpenGL Please recompile BIAS.
8 #endif // BUILD_GLviewer
9 
10 #include <Gui/biasgl.h>
11 #include <Base/Debug/Debug.hh>
12 
13 #include <OpenGLFramework/Base/glfRenderTarget.hh>
14 #include <GLviewer/OutputAttachments/GLProjectionOutputAttachment.hh>
15 
16 namespace BIAS {
17 
18  /**
19  * @brief exemplary output attachment, creating a underwater effect
20  * @ingroup g_glviewer
21  * @author fkellner
22  */
23  class BIASGLviewer_EXPORT OutputUnderwater : public GLProjectionOutputAttachment {
24  public:
25  // standards
28 
29  // pass zNear and zFar
30  void UpdateParams(double zNear,double zFar,std::vector<int> &waterQuality);
31 
32  protected:
33  /// creates strings with shader code and calls InitShader(vertex, fragment) from superclass
34  int InitShader_();
35  /// standard draw from superclass does not suffice to get zNear and zFar,
36  /// so we need to implement this here
37  int Draw_();
38 
39  float zNear_,zFar_,waterQualityR_, waterQualityG_, waterQualityB_;
40  float waterColorR_, waterColorG_, waterColorB_;
41  float alphaR_, alphaG_, alphaB_;
42  };
43 
44 }
45 #endif
46 
exemplary output attachment, creating a underwater effect
Class for extra rendering pass in GLProjection (for now only used in glutGLviewer) ...
Interface for render targets.