aboutsummaryrefslogtreecommitdiffstats
path: root/support/hololens/OpenGLESPage.xaml.h
diff options
context:
space:
mode:
authorPaul Rouget <me@paulrouget.com>2019-06-22 00:05:35 +0200
committerPaul Rouget <me@paulrouget.com>2019-07-03 21:35:43 +0200
commitacde7e04cb1c0b172313d8b7819c5e27f37152d2 (patch)
treee653d523b15923b9d0040b1d203aeaf0cd5447ac /support/hololens/OpenGLESPage.xaml.h
parent5beac079f63531e6b4d7fd3184d542405b33b111 (diff)
downloadservo-acde7e04cb1c0b172313d8b7819c5e27f37152d2.tar.gz
servo-acde7e04cb1c0b172313d8b7819c5e27f37152d2.zip
Hololens port
Diffstat (limited to 'support/hololens/OpenGLESPage.xaml.h')
-rw-r--r--support/hololens/OpenGLESPage.xaml.h37
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;
+};
+}