VR-Forces 4.1.1 Class Documentation
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], const double projection[16] );
32 
33  //Set the number of groups.
34  virtual void setGroupCount( unsigned int count );
35 
37  virtual void setBackgroundImageTextureUnit( unsigned int unit );
38 
39  // Sets the given attributes to the OpenGL context.
40  virtual void setVaryingAttributes( size_t stride,
41  const VaryingAttributeAddress& positionAddress,
42  const VaryingAttributeAddress& colorAddress,
43  const VaryingAttributeAddress& offsetAddress,
44  const VaryingAttributeAddress& uvAddress,
45  const VaryingAttributeAddress& rotAddress );
46 
48  virtual void unsetVaryingAttributes();
49 
50  protected:
51 
53  virtual void updateUniformLocations();
54 
56  virtual void updateUniforms();
57 
59  virtual void getShaderSource( const char*& vs,
60  const char*& fs, const char*& gs );
61 
62  protected:
63 
70 
71  unsigned int myUnit;
72  unsigned int myGroupCount;
73  double myCameraPos[3];
74  double myMatrix[16];
78 
79  };
80 
81 
85  {
86  public:
87 
88  DtProjected2DTexturedEffectCreator( bool textureIsAlpha )
89  : myTextureIsAlpha( textureIsAlpha )
90  {
91  }
92 
93  virtual DtEffect* create( CreateParameters* params = 0 )
94  {
95  return new DtProjected2DTexturedEffect( myTextureIsAlpha );
96  }
97 
98  protected:
99 
101 
102  };
103 
104 }

Document ID: Generated on Mon Apr 8 19:24:01 EDT 2013 from SVN revision 125877
Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)