VR-Forces 5.0.2 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtProjected2DFlatEffect.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * Copyright (c) 2017 MAK Technologies, Inc.
3  * All rights reserved.
4  *****************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvGraphics/Dt2DEffect.h>
13 
14 namespace makVrv
15 {
16 
20  {
21  public:
22 
24  DtProjected2DFlatEffect(const std::string& dataPath);
25 
27  virtual ~DtProjected2DFlatEffect();
28 
30  virtual void setCamera( bool geocentric, float occluded,
31  const double position[3]
32  , const double positionMatrix[16]
33  , const double projectionMatrix[16]);
34 
35  //Set the number of groups.
36  virtual void setGroupCount( unsigned int count );
37 
38  // Sets the given attributes to the OpenGL context.
39  virtual void setVertexAttribPointers( size_t stride,
40  const VertexAttribPtrInfo& positionAddress,
41  const VertexAttribPtrInfo& colorAddress,
42  const VertexAttribPtrInfo& offsetAddress,
43  const VertexAttribPtrInfo& rotationAddress );
44 
46  virtual void unsetVertexAttribPointers();
47 
48  protected:
49 
51  virtual void updateUniformLocations();
52 
54  virtual void updateUniforms();
55 
57  virtual void initializeShaderSource( void );
58 
59  protected:
60 
67 
68  unsigned int myUnit;
69  unsigned int myGroupCount;
70  double myCameraPos[3];
71  double myMatrix[16];
72  double myProjectionMatrix[16];
75 
76  void updateOtherUniforms(void);
77  };
78 
79 
83  {
84  public:
85 
86  virtual DtEffect* create(const std::string& dataPath, CreateParameters* params = 0)
87  {
88  return new DtProjected2DFlatEffect(dataPath);
89  }
90 
91  };
92 
93 }
int myUniform_Sphere
Definition: DtProjected2DFlatEffect.h:65
Contains the makVrv::Dt2DEffect class declaration.
Abstract creator class for registering effects with a effects manager.
Definition: DtEffect.h:94
bool myGeocentricFlag
Definition: DtProjected2DFlatEffect.h:73
int myUniform_OccludedAlpha
Definition: DtProjected2DFlatEffect.h:66
A creator class for the Projected 2D flag quad effect.
Definition: DtProjected2DFlatEffect.h:82
virtual DtEffect * create(const std::string &dataPath, CreateParameters *params=0)
Definition: DtProjected2DFlatEffect.h:86
float myGeocentricAlpha
Definition: DtProjected2DFlatEffect.h:74
int myUniform_CameraPos
Definition: DtProjected2DFlatEffect.h:61
#define DT_DLL_VRVGRAPHICS
Contains DLL export macros.
Definition: vrvGraphics.h:19
int myUniform_CameraMat
Definition: DtProjected2DFlatEffect.h:62
int myUniform_ProjectionMat
Definition: DtProjected2DFlatEffect.h:63
Definition: DtEffect.h:23
The base class for a programmable pipeline render effect.
Definition: DtEffect.h:19
The 2D effect is an abstract interface for effects used to render in 2D.
Definition: Dt2DEffect.h:19
An effect for rendering 2D flat colored quads.
Definition: DtProjected2DFlatEffect.h:19
unsigned int myUnit
Definition: DtProjected2DFlatEffect.h:68
unsigned int myGroupCount
Definition: DtProjected2DFlatEffect.h:69
int myUniform_GroupCount
Definition: DtProjected2DFlatEffect.h:64

Document ID: Generated on Sun Dec 4 20:22:03 EST 2022 from SVN revision 249613
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)