GlobeEngine
CoreExampleEngine.h
Go to the documentation of this file.
1 
9 #ifndef GlobeEngine_CoreExampleEngine_h
10 #define GlobeEngine_CoreExampleEngine_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 "Common.h"
20 #include "DebugLogger.h"
21 #include "Timer.h"
22 #include "MemoryState.h"
23 #include "DebugMap.h"
24 #include "CoreExampleComposition.h"
25 
26 // forward declares
27 namespace ge {
28  class Cube;
29  class Plane;
30  class Sphere;
31  class Cone;
32  class Shader;
33  class CoordinateSystem;
34 }
35 
36 namespace geCoreExample {
38  {
39  public:
42 
43  void clear();
44  void destroy();
45  void create();
46 
47  // overrides from ge::Engine
48  void initializeScene(std::string _projectsrcPath=0);
49  void drawScene();
50  void resize(int _w, int _h);
51  void update();
52 
54  private:
55  std::shared_ptr<ge::Shader> programForUtilities;
56  std::shared_ptr<ge::Shader> programForCubes;
57  std::shared_ptr<ge::Shader> programForPlanes;
58  std::shared_ptr<ge::Shader> programForSpheres;
59  std::shared_ptr<ge::Shader> programForDebug;
60  std::shared_ptr<ge::Shader> programForCones;
61 
62  // CoordinateCross
63  std::shared_ptr<ge::CoordinateSystem> coordinateSystem;
64  // Basic scene state
65  ge::SceneStateSet sceneStates[1];
66 
67  std::shared_ptr<ge::Cube> cube;
68  std::shared_ptr<ge::Plane> plane;
69  std::shared_ptr<ge::Sphere> sphere;
70  std::shared_ptr<ge::Cone> cone;
71 
72  float rotationAmount;
73 
74  // Debugger functionality
75  geUtil::DebugLogger openglDebugLogger;
76  ge::Timer openglTimer;
77  geUtil::MemoryState openglMemory;
78  geUtil::DebugMap debugmap;
79 
80  CoreExampleComposition uiComposition;
81  ge::FrameBufferObject gBuffer;
82 
83  int screenWidth;
84  int screenHeight;
85 
86  std::shared_ptr<ge::Texture2Drgba> spheretex;
87  };
88 }
89 #endif
Definition: MemoryState.h:16
void clear()
Definition: CoreExampleEngine.cpp:21
Definition: DebugMap.h:18
Definition: DebugLogger.h:22
Definition: FrameBufferObject.h:20
void update()
Definition: CoreExampleEngine.cpp:173
void drawScene()
Definition: CoreExampleEngine.cpp:190
~CoreExampleEngine()
Definition: CoreExampleEngine.cpp:16
Definition: CoreExampleComposition.h:15
void destroy()
Definition: CoreExampleEngine.cpp:32
Definition: Engine.h:20
Definition: CoreExampleEngine.h:37
void resize(int _w, int _h)
Definition: CoreExampleEngine.cpp:240
CoreExampleEngine()
Definition: CoreExampleEngine.cpp:11
void updateFramebufferStandardID()
Definition: CoreExampleEngine.cpp:256
void create()
Definition: CoreExampleEngine.cpp:37
Definition: AvalancheTrainingSimulationEngine.h:28
Definition: CoreExampleComposition.h:13
Definition: SceneStateSet.h:41
void initializeScene(std::string _projectsrcPath=0)
Definition: CoreExampleEngine.cpp:42
Definition: Timer.h:17