2014-08-28 13:53:24 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "pch.h"
|
2016-04-29 13:07:46 +00:00
|
|
|
|
2014-08-28 13:53:24 +00:00
|
|
|
#include "CubeRenderer.h"
|
|
|
|
|
2016-05-16 14:34:04 +00:00
|
|
|
ref class Direct3DApp1 sealed
|
|
|
|
: public Windows::ApplicationModel::Core::IFrameworkView
|
2014-08-28 13:53:24 +00:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
Direct3DApp1();
|
|
|
|
|
|
|
|
// IFrameworkView Methods.
|
2016-05-16 14:34:04 +00:00
|
|
|
virtual void Initialize(
|
|
|
|
Windows::ApplicationModel::Core::CoreApplicationView ^ applicationView);
|
|
|
|
virtual void SetWindow(Windows::UI::Core::CoreWindow ^ window);
|
|
|
|
virtual void Load(Platform::String ^ entryPoint);
|
2014-08-28 13:53:24 +00:00
|
|
|
virtual void Run();
|
|
|
|
virtual void Uninitialize();
|
|
|
|
|
|
|
|
protected:
|
|
|
|
// Event Handlers.
|
2016-05-16 14:34:04 +00:00
|
|
|
void OnWindowSizeChanged(Windows::UI::Core::CoreWindow ^ sender,
|
|
|
|
Windows::UI::Core::WindowSizeChangedEventArgs ^
|
|
|
|
args);
|
|
|
|
void OnLogicalDpiChanged(Platform::Object ^ sender);
|
|
|
|
void OnActivated(Windows::ApplicationModel::Core::CoreApplicationView ^
|
|
|
|
applicationView,
|
|
|
|
Windows::ApplicationModel::Activation::IActivatedEventArgs ^
|
|
|
|
args);
|
|
|
|
void OnSuspending(Platform::Object ^ sender,
|
|
|
|
Windows::ApplicationModel::SuspendingEventArgs ^ args);
|
|
|
|
void OnResuming(Platform::Object ^ sender, Platform::Object ^ args);
|
|
|
|
void OnWindowClosed(Windows::UI::Core::CoreWindow ^ sender,
|
|
|
|
Windows::UI::Core::CoreWindowEventArgs ^ args);
|
|
|
|
void OnVisibilityChanged(Windows::UI::Core::CoreWindow ^ sender,
|
|
|
|
Windows::UI::Core::VisibilityChangedEventArgs ^
|
|
|
|
args);
|
|
|
|
void OnPointerPressed(Windows::UI::Core::CoreWindow ^ sender,
|
|
|
|
Windows::UI::Core::PointerEventArgs ^ args);
|
|
|
|
void OnPointerMoved(Windows::UI::Core::CoreWindow ^ sender,
|
|
|
|
Windows::UI::Core::PointerEventArgs ^ args);
|
2014-08-28 13:53:24 +00:00
|
|
|
|
|
|
|
private:
|
2016-05-16 14:34:04 +00:00
|
|
|
CubeRenderer ^ m_renderer;
|
2014-08-28 13:53:24 +00:00
|
|
|
bool m_windowClosed;
|
|
|
|
bool m_windowVisible;
|
|
|
|
};
|
|
|
|
|
2016-05-16 14:34:04 +00:00
|
|
|
ref class Direct3DApplicationSource sealed
|
|
|
|
: Windows::ApplicationModel::Core::IFrameworkViewSource
|
2014-08-28 13:53:24 +00:00
|
|
|
{
|
|
|
|
public:
|
2016-05-16 14:34:04 +00:00
|
|
|
virtual Windows::ApplicationModel::Core::IFrameworkView ^ CreateView();
|
2014-08-28 13:53:24 +00:00
|
|
|
};
|