-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathShadowMappingMain.h
51 lines (42 loc) · 1.62 KB
/
ShadowMappingMain.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
44
45
46
47
48
49
50
51
//// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
//// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
//// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
//// PARTICULAR PURPOSE.
////
//// Copyright (c) Microsoft Corporation. All rights reserved
#pragma once
#include "StepTimer.h"
#include "DeviceResources.h"
#include "ShadowSceneRenderer.h"
// Renders Direct2D and 3D content on the screen.
namespace ShadowMapping
{
class ShadowMapSampleMain : public DX::IDeviceNotify
{
public:
ShadowMapSampleMain(const std::shared_ptr<DX::DeviceResources>& deviceResources);
~ShadowMapSampleMain();
void UpdateForWindowSizeChange();
void Update();
bool Render();
// Property pass-through methods.
//void SetFiltering(bool useLinear);
//bool GetFiltering();
//void SetShadowSize(float size);
//float GetShadowSize();
//bool GetD3D9ShadowsSupported();
// Methods for saving/loading the internal state of the app.
//void SaveInternalState(Windows::Foundation::Collections::IPropertySet^ state);
//void LoadInternalState(Windows::Foundation::Collections::IPropertySet^ state);
// IDeviceNotify
virtual void OnDeviceLost();
virtual void OnDeviceRestored();
private:
// Cached pointer to device resources.
std::shared_ptr<DX::DeviceResources> m_deviceResources;
// Sample renderer class.
std::unique_ptr<ShadowSceneRenderer> m_shadowSceneRenderer;
// Rendering loop timer.
DX::StepTimer m_timer;
};
}