GlobeEngine
TextureExampleEngine.h
Go to the documentation of this file.
1 
9 #ifndef GlobeEngine_TextureExampleEngine_h
10 #define GlobeEngine_TextureExampleEngine_h
11 
12 #include <math.h>
13 #include <ctime>
14 #include <iostream>
15 #include <stdio.h>
16 #include <vector>
17 #include "OpenGL_Includes.h"
18 #include "Engine.h"
19 #include "Shader.h"
20 #include "FlightCamera.h"
21 #include "Common.h"
22 #include "CoordinateSystem.h"
23 #include "SceneStateSet.h"
24 #include "DrawableComponent.h"
25 #include "Cube.h"
26 #include "DebugLogger.h"
27 #include "Timer.h"
28 #include "MemoryState.h"
29 #include "DebugMap.h"
31 #include "Plane.h"
32 
33 namespace geTextureExample {
35  {
36  public:
39 
40  void clear();
41  void destroy();
42  void create();
43 
44  // overrides from ge::Engine
45  void initializeScene(std::string _projectsrcPath=0);
46  void drawScene();
47  void resize(int _w, int _h);
48  void update();
49 
51  void setDebugMapsEnabled(bool _in);
52 
53  std::shared_ptr<ge::Cube> getCube();
54  std::shared_ptr<ge::Plane> getPlane();
55 
56  private:
57  std::shared_ptr<ge::Shader> programForUtilities;
58  std::shared_ptr<ge::Shader> programForDebug;
59  std::shared_ptr<ge::Shader> programForCube;
60  std::shared_ptr<ge::Shader> programForPlanes;
61  ge::SceneStateSet sceneStates[1];
62 
63  std::shared_ptr<ge::Plane> mapPlaneWithNormal;
64  std::shared_ptr<ge::Texture2Drgba> planeTex;
65  std::shared_ptr<ge::Texture2Drgba> planeNormalTex;
66  std::shared_ptr<ge::Image> planeTexImage;
67 
68  std::shared_ptr<ge::Cube> cubeWithNormals;
69  std::shared_ptr<ge::Texture2Drgba> cubeTex;
70  std::shared_ptr<ge::Texture2Drgba> cubeNormalTex;
71  std::shared_ptr<ge::Texture2Drgba> cubeDisparityTex;
72 
73  float rot;
74 
75  // Debugger functionality
76  geUtil::DebugLogger openglDebugLogger;
77  ge::Timer openglTimer;
78  geUtil::MemoryState openglMemory;
79  geUtil::DebugMap debugmaps[2];
80 
81  TextureExampleComposition uiComposition;
82 
83  ge::FrameBufferObject earthBuffer;
84 
85  bool debugMapsEnabled;
86 
87  int screenWidth;
88  int screenHeight;
89  };
90 }
91 #endif
void drawScene()
Definition: TextureExampleEngine.cpp:170
void updateFramebufferStandardID()
Definition: TextureExampleEngine.cpp:232
Definition: MemoryState.h:16
void create()
Definition: TextureExampleEngine.cpp:34
Definition: TextureExampleComposition.h:16
Definition: DebugMap.h:18
Definition: DebugLogger.h:22
void clear()
Definition: TextureExampleEngine.cpp:19
Definition: TextureExampleComposition.h:14
Definition: FrameBufferObject.h:20
Definition: TextureExampleEngine.h:34
~TextureExampleEngine()
Definition: TextureExampleEngine.cpp:15
void setDebugMapsEnabled(bool _in)
Definition: TextureExampleEngine.cpp:240
void resize(int _w, int _h)
Definition: TextureExampleEngine.cpp:219
Definition: Engine.h:20
void initializeScene(std::string _projectsrcPath=0)
Definition: TextureExampleEngine.cpp:39
void destroy()
Definition: TextureExampleEngine.cpp:29
Definition: SceneStateSet.h:41
TextureExampleEngine()
Definition: TextureExampleEngine.cpp:10
std::shared_ptr< ge::Plane > getPlane()
Definition: TextureExampleEngine.cpp:248
std::shared_ptr< ge::Cube > getCube()
Definition: TextureExampleEngine.cpp:244
void update()
Definition: TextureExampleEngine.cpp:153
Definition: Timer.h:17