diff options
author | Paul Rouget <me@paulrouget.com> | 2019-06-22 00:05:35 +0200 |
---|---|---|
committer | Paul Rouget <me@paulrouget.com> | 2019-07-03 21:35:43 +0200 |
commit | acde7e04cb1c0b172313d8b7819c5e27f37152d2 (patch) | |
tree | e653d523b15923b9d0040b1d203aeaf0cd5447ac /support/hololens/OpenGLESPage.xaml.h | |
parent | 5beac079f63531e6b4d7fd3184d542405b33b111 (diff) | |
download | servo-acde7e04cb1c0b172313d8b7819c5e27f37152d2.tar.gz servo-acde7e04cb1c0b172313d8b7819c5e27f37152d2.zip |
Hololens port
Diffstat (limited to 'support/hololens/OpenGLESPage.xaml.h')
-rw-r--r-- | support/hololens/OpenGLESPage.xaml.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/support/hololens/OpenGLESPage.xaml.h b/support/hololens/OpenGLESPage.xaml.h new file mode 100644 index 00000000000..ab2c8c2fd80 --- /dev/null +++ b/support/hololens/OpenGLESPage.xaml.h @@ -0,0 +1,37 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ + +#pragma once + +#include "OpenGLES.h" +#include "OpenGLESPage.g.h" +#include "Servo.h" + +namespace hlservo { +public +ref class OpenGLESPage sealed { +public: + OpenGLESPage(); + virtual ~OpenGLESPage(); + + internal : OpenGLESPage(OpenGLES* openGLES); + +private: + void OnPageLoaded(Platform::Object ^ sender, Windows::UI::Xaml::RoutedEventArgs ^ e); + void OnVisibilityChanged(Windows::UI::Core::CoreWindow ^ sender, + Windows::UI::Core::VisibilityChangedEventArgs ^ args); + void CreateRenderSurface(); + void DestroyRenderSurface(); + void RecoverFromLostDevice(); + void StartRenderLoop(); + void StopRenderLoop(); + + OpenGLES* mOpenGLES; + + EGLSurface mRenderSurface; + Concurrency::critical_section mRenderSurfaceCriticalSection; + Windows::Foundation::IAsyncAction ^ mRenderLoopWorker; + Servo* mServo; +}; +} |