-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathwin-appMain.h
35 lines (29 loc) · 866 Bytes
/
win-appMain.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
#pragma once
#include "StepTimer.h"
#include "DeviceResources.h"
#include "Sample3DSceneRenderer.h"
#include "SampleFpsTextRenderer.h"
// Renders Direct2D and 3D content on the screen.
namespace win_app
{
class win_appMain : public DX::IDeviceNotify
{
public:
win_appMain(const std::shared_ptr<DX::DeviceResources>& deviceResources);
~win_appMain();
void CreateWindowSizeDependentResources();
void Update();
bool Render();
// IDeviceNotify
virtual void OnDeviceLost();
virtual void OnDeviceRestored();
private:
// Cached pointer to device resources.
std::shared_ptr<DX::DeviceResources> m_deviceResources;
// TODO: Replace with your own content renderers.
std::unique_ptr<Sample3DSceneRenderer> m_sceneRenderer;
std::unique_ptr<SampleFpsTextRenderer> m_fpsTextRenderer;
// Rendering loop timer.
DX::StepTimer m_timer;
};
}