VR-Forces Development_Version 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], 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 initializeShaderSource( void );
60 
61  protected:
62 
69 
70  unsigned int myUnit;
71  unsigned int myGroupCount;
72  double myCameraPos[3];
73  double myMatrix[16];
77 
78  };
79 
80 
84  {
85  public:
86 
87  DtProjected2DTexturedEffectCreator( bool textureIsAlpha )
88  : myTextureIsAlpha( textureIsAlpha )
89  {
90  }
91 
92  virtual DtEffect* create( CreateParameters* params = 0 )
93  {
94  return new DtProjected2DTexturedEffect( myTextureIsAlpha );
95  }
96 
97  protected:
98 
100 
101  };
102 
103 }

Document ID: Generated on Tue Mar 8 22:13:38 EST 2016 from SVN revision 162938
Copyright © 2005-2015 VT MÄK. All Rights Reserved (www.mak.com)