2014-08-28 17:53:24 +04:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "pch.h"
|
2016-04-29 16:07:46 +03:00
|
|
|
|
2014-08-28 17:53:24 +04:00
|
|
|
#include "CubeRenderer.h"
|
|
|
|
|
2016-05-16 17:34:04 +03:00
|
|
|
ref class Direct3DApp1 sealed
|
|
|
|
: public Windows::ApplicationModel::Core::IFrameworkView
|
2014-08-28 17:53:24 +04:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
Direct3DApp1();
|
|
|
|
|
|
|
|
// IFrameworkView Methods.
|
2016-05-16 17:34:04 +03: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 17:53:24 +04:00
|
|
|
virtual void Run();
|
|
|
|
virtual void Uninitialize();
|
|
|
|
|
|
|
|
protected:
|
|
|
|
// Event Handlers.
|
2016-05-16 17:34:04 +03: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 17:53:24 +04:00
|
|
|
|
|
|
|
private:
|
2016-05-16 17:34:04 +03:00
|
|
|
CubeRenderer ^ m_renderer;
|
2014-08-28 17:53:24 +04:00
|
|
|
bool m_windowClosed;
|
|
|
|
bool m_windowVisible;
|
|
|
|
};
|
|
|
|
|
2016-05-16 17:34:04 +03:00
|
|
|
ref class Direct3DApplicationSource sealed
|
|
|
|
: Windows::ApplicationModel::Core::IFrameworkViewSource
|
2014-08-28 17:53:24 +04:00
|
|
|
{
|
|
|
|
public:
|
2016-05-16 17:34:04 +03:00
|
|
|
virtual Windows::ApplicationModel::Core::IFrameworkView ^ CreateView();
|
2014-08-28 17:53:24 +04:00
|
|
|
};
|