All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
UniqueTextureRenderable.h
1 // Copyright eeGeo Ltd (2012-2014), All Rights Reserved
2 
3 #pragma once
4 
5 #include "WorldMeshRenderable.h"
6 #include "LayerIds.h"
7 #include "IdTypes.h"
8 #include "Rendering.h"
9 #include "VectorMathDecl.h"
10 #include "Graphics.h"
11 #include "GLHelpers.h"
12 #include "IAsyncTexture.h"
13 
14 namespace Eegeo
15 {
16  namespace Rendering
17  {
18  namespace Renderables
19  {
21  {
22  public:
24  LayerIds::Values layerId,
25  Materials::IMaterial* material,
26  const VertexLayouts::VertexBinding& vertexBinding,
27  Rendering::Mesh* pMesh,
29  Eegeo::dv3 ecefPosition)
30  : WorldMeshRenderable(layerId, material, vertexBinding, pMesh, ecefPosition)
31  , m_pTexture(pTexture)
32  {
33 
34  }
35 
37  {
38  if (m_pTexture != NULL)
39  {
40  m_pTexture->DecrementReferenceCount();
41  }
42  }
43 
44  const TTextureId GetTextureId() const { return (m_pTexture == NULL) ? 0 : m_pTexture->GetTextureInfo().textureId; }
45 
46  protected:
48  };
49  }
50  }
51 }