VR-Forces 4.5 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DtProjected2DTexturedEffect.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * Copyright (c) 2011 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  DtProjected2DTexturedEffect( bool textureIsAlpha );
25 
27  virtual ~DtProjected2DTexturedEffect();
28 
30  virtual void setCamera( bool geocentric, float geocentricAlpha,
31  const double position[3]
32  , const double positionMatrix[16]
33  , const double projectionMatrix[16]);
34 
35 
36  //Set the number of groups.
37  virtual void setGroupCount( unsigned int count );
38 
40  virtual void setBackgroundImageTextureUnit( unsigned int unit );
41 
42  // Sets the given attributes to the OpenGL context.
43  virtual void setVertexAttribPointers( size_t stride,
44  const VertexAttribPtrInfo& positionAddress,
45  const VertexAttribPtrInfo& colorAddress,
46  const VertexAttribPtrInfo& uvAddress,
47  const VertexAttribPtrInfo& offsetAddress,
48  const VertexAttribPtrInfo& rotAddress );
49 
51  virtual void unsetVertexAttribPointers();
52 
53  protected:
54 
56  virtual void updateUniformLocations();
57 
59  virtual void updateUniforms();
60 
62  virtual void initializeShaderSource( void );
63 
64  protected:
65 
73 
74  unsigned int myUnit;
75  unsigned int myGroupCount;
76  double myCameraPos[3];
77  double myPositionMatrix[16];
78  double myProjectionMatrix[16];
82 
83  void updateGroupCountAndTextureUniforms();
84  void updateOtherUniforms();
85  };
86 
87 
91  {
92  public:
93 
94  DtProjected2DTexturedEffectCreator( bool textureIsAlpha )
95  : myTextureIsAlpha( textureIsAlpha )
96  {
97  }
98 
99  virtual DtEffect* create( CreateParameters* params = 0 )
100  {
101  return new DtProjected2DTexturedEffect( myTextureIsAlpha );
102  }
103 
104  protected:
105 
107 
108  };
109 
110 }

Document ID: Generated on Thu Mar 23 18:54:12 EDT 2017 from SVN revision 174804
Copyright © 2005-2017 VT MÄK. All Rights Reserved (www.mak.com)