-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.h
43 lines (35 loc) · 1.52 KB
/
App.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
/**
\file App.h
The G3D 10.00 default starter app is configured for OpenGL 4.1 and
relatively recent GPUs.
*/
#pragma once
#include <G3D/G3D.h>
/** \brief Application framework. */
class App : public GApp {
protected:
/** Called from onInit */
void makeGUI();
Array<shared_ptr<Surface>> m_surfaceArray;
Array<shared_ptr<Light>> m_LightArray;
public:
App(const GApp::Settings& settings = GApp::Settings());
shared_ptr<Image3> m_currentImage;
shared_ptr<Texture> m_result;
virtual void onInit() override;
virtual void onAI() override;
virtual void onNetwork() override;
virtual void onSimulation(RealTime rdt, SimTime sdt, SimTime idt) override;
virtual void onPose(Array<shared_ptr<Surface> >& posed3D, Array<shared_ptr<Surface2D> >& posed2D) override;
void onRender();
// You can override onGraphics if you want more control over the rendering loop.
// virtual void onGraphics(RenderDevice* rd, Array<shared_ptr<Surface> >& surface, Array<shared_ptr<Surface2D> >& surface2D) override;
virtual void onGraphics3D(RenderDevice* rd, Array<shared_ptr<Surface> >& surface3D) override;
virtual void onGraphics2D(RenderDevice* rd, Array<shared_ptr<Surface2D> >& surface2D) override;
virtual void onAfterLoadScene(const Any& any, const String& sceneName) override;
virtual bool onEvent(const GEvent& e) override;
virtual void onUserInput(UserInput* ui) override;
virtual void onCleanup() override;
String myName;
int raysPerPixel;
};