GlobeEngine
SunExampleEngine.h
Go to the documentation of this file.
1 
9 #ifndef GlobeEngine_SunExampleEngine_h
10 #define GlobeEngine_SunExampleEngine_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"
30 #include "Sun.h"
31 #include "SunExampleComposition.h"
32 
33 namespace geSunExample {
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  private:
52  std::shared_ptr<ge::Shader> programForUtilities;
53  std::shared_ptr<ge::Shader> programForCubes;
54  std::shared_ptr<ge::Shader> programForSpheres;
55  std::shared_ptr<ge::Shader> programForSuns;
56  std::shared_ptr<ge::Shader> programForDebug;
57 
58  // CoordinateCross
59  //ge::CoordinateSystem coordinateSystem;
60  // Basic scene state
61  ge::SceneStateSet sceneStates[1];
62 
63  std::shared_ptr<ge::Cube> cube;
64  std::shared_ptr<ge::Sphere> sphere;
66 
67  float rot;
68  float rotOverlay;
69 
70  // Debugger functionality
71  geUtil::DebugLogger openglDebugLogger;
72  ge::Timer openglTimer;
73  geUtil::MemoryState openglMemory;
74  geUtil::DebugMap debugmaps[2];
75 
76  SunExampleComposition uiComposition;
77  GaussianBlurComposition gaussianBlurPass;
78  GaussianBlurComposition gaussianBlurPassVertical;
79 
80  ge::FrameBufferObject sunBuffer;
81  ge::FrameBufferObject scatteringBuffer;
82 
83  ge::FrameBufferObject opaqueObjectsBuffer;
84 
85  int screenWidth;
86  int screenHeight;
87  };
88 }
89 #endif
void update()
Definition: SunExampleEngine.cpp:189
void create()
Definition: SunExampleEngine.cpp:31
Definition: MemoryState.h:16
Definition: SunExampleEngine.h:34
void clear()
Definition: SunExampleEngine.cpp:15
Definition: DebugMap.h:18
SunExampleEngine()
Definition: SunExampleEngine.cpp:6
void drawScene()
Definition: SunExampleEngine.cpp:205
Definition: DebugLogger.h:22
Definition: FrameBufferObject.h:20
Definition: SunExampleComposition.h:13
void resize(int _w, int _h)
Definition: SunExampleEngine.cpp:280
void updateFramebufferStandardID()
Definition: SunExampleEngine.cpp:299
~SunExampleEngine()
Definition: SunExampleEngine.cpp:11
Definition: Engine.h:20
Definition: Sun.h:16
Definition: SunExampleComposition.h:15
Definition: SceneStateSet.h:41
Definition: SunExampleComposition.h:36
void initializeScene(std::string _projectsrcPath=0)
Definition: SunExampleEngine.cpp:36
void destroy()
Definition: SunExampleEngine.cpp:26
Definition: Timer.h:17