VR-Forces 5.0.3 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtWaterOnScreenDrawable.h
Go to the documentation of this file.
1 /*****************************************************************************
2 * Copyright (c) 2021 MAK Technologies, Inc.
3 * All rights reserved.
4 *****************************************************************************/
5 
6 #pragma once
7 
11 
14 
16 
18 
19 namespace makVrv
20 {
21  class DtDe;
22  class DtGlProgram;
23  class DtGlTexture;
24 
28  {
30  : vrv_effectIntensity(1.0f)
31  , vrv_offset(0.0f)
32  , vrv_opacity(1.0f)
33  , vrv_aspectRatio(1.0f)
34  , vrv_fovy(1.57f)
35  {}
36 
38  float vrv_offset;
39  float vrv_opacity;
40 
42  float vrv_fovy;
43  };
44 
47 
49  template <>
50  inline const char* creatorTypeName<DtWaterOnScreenDrawable>(void) { return "DtWaterOnScreenDrawableCreator"; }
51 
54  {
55  public:
57  virtual ~DtWaterOnScreenDrawable();
58 
60  virtual void releaseGLObjects(osg::State* state) const;
61 
62  protected:
65 
68 
69  private:
71  DtWaterOnScreenDrawable() = delete;
72 
75 
77  DtWaterOnScreenDrawable& operator=(const DtWaterOnScreenDrawable&) = delete;
78 
79  public:
81  virtual void drawImplementation(osg::RenderInfo& renderInfo) const;
82 
89  //virtual void releaseGLObjects(osg::State* state = 0) const;
90 
92  virtual void setNormalMap(DtGlTexture* texture);
93 
95  virtual void setParameters(const DtWaterOnScreenParameters& params);
96 
97  protected:
99  virtual void createProgramIfNecessary(void) const;
100 
101  virtual void cleanupGpuMemory();
102  protected:
103 
105 
107 
109 
114 
116 
117  mutable int myMutableVrvFovLoc;
119  };
120 }
DtWaterOnScreenParameters myParams
Definition: DtWaterOnScreenDrawable.h:108
2 dimensional vector
float vrv_fovy
Definition: DtWaterOnScreenDrawable.h:42
A convenience class to represent an OpenGL Shader Program.
Definition: DtGlProgram.h:65
int myMutableVrvEffectIntensityLoc
locations of various uniforms for the shaders
Definition: DtWaterOnScreenDrawable.h:111
int myMutableVrvWaterNormalsLoc
Definition: DtWaterOnScreenDrawable.h:115
Variadic templated creator class for defining a DtVirtualBaseClass creator that is automatically regi...
Definition: DtVirtualBaseClassCreator.h:22
float vrv_effectIntensity
Definition: DtWaterOnScreenDrawable.h:37
int myMutableVrvFovLoc
Definition: DtWaterOnScreenDrawable.h:117
float vrv_offset
Definition: DtWaterOnScreenDrawable.h:38
Definition: DtPostProcessorDrawable.h:24
int myMutableVrvAspectRatioLoc
Definition: DtWaterOnScreenDrawable.h:118
#define DT_DLL_VRVPOSTPROCESSOR
Definition: vrvPostProcessor.h:19
DtGlTexture * myNormalMap
Definition: DtWaterOnScreenDrawable.h:106
class used to render water on screen effects during the post processor camera draw ...
Definition: DtWaterOnScreenDrawable.h:53
This file contains the declaration of the class DtPostProcessorDrawable which is used for rendering p...
DtWaterOnScreenParameters()
Definition: DtWaterOnScreenDrawable.h:29
Contains DLL export macros.
DtGlProgram * myMutableWaterOnScreenProgram
Definition: DtWaterOnScreenDrawable.h:104
float vrv_aspectRatio
Definition: DtWaterOnScreenDrawable.h:41
const char * creatorTypeName< DtWaterOnScreenDrawable >(void)
template specialization for the creator (pass the class being created to the creatorTypeName template...
Definition: DtWaterOnScreenDrawable.h:50
float vrv_opacity
Definition: DtWaterOnScreenDrawable.h:39
friend DtWaterOnScreenDrawableCreator
friended, to access constructor above
Definition: DtWaterOnScreenDrawable.h:67
The DtDe is the core component of any VR-Vantage application. It owns a DtRenderer, DtDeCommunicator, as well as a DtDisplay and other things.
Definition: DtDe.h:70
DtVirtualBaseClassCreator< DtWaterOnScreenDrawable > DtWaterOnScreenDrawableCreator
Definition: DtWaterOnScreenDrawable.h:45
int myMutableVrvOffsetLoc
Definition: DtWaterOnScreenDrawable.h:112
structure to exchange/communicate various parameters for the water on screen effect ...
Definition: DtWaterOnScreenDrawable.h:27
A helper classes for creating a RTT target, optionally including depth buffer.
Definition: DtGlTexture.h:20
int myMutableVrvOpacityLoc
Definition: DtWaterOnScreenDrawable.h:113

Document ID: Generated on Thu Jun 1 17:58:13 EDT 2023 from SVN revision 255404
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)