summaryrefslogtreecommitdiff
path: root/Runtime/GfxDevice/threaded/ThreadedWindow.h
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2019-08-14 22:50:43 +0800
committerchai <chaifix@163.com>2019-08-14 22:50:43 +0800
commit15740faf9fe9fe4be08965098bbf2947e096aeeb (patch)
treea730ec236656cc8cab5b13f088adfaed6bb218fb /Runtime/GfxDevice/threaded/ThreadedWindow.h
+Unity Runtime codeHEADmaster
Diffstat (limited to 'Runtime/GfxDevice/threaded/ThreadedWindow.h')
-rw-r--r--Runtime/GfxDevice/threaded/ThreadedWindow.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/Runtime/GfxDevice/threaded/ThreadedWindow.h b/Runtime/GfxDevice/threaded/ThreadedWindow.h
new file mode 100644
index 0000000..60489f4
--- /dev/null
+++ b/Runtime/GfxDevice/threaded/ThreadedWindow.h
@@ -0,0 +1,36 @@
+#ifndef THREADEDWINDOW_H
+#define THREADEDWINDOW_H
+
+#if UNITY_WIN && UNITY_EDITOR
+
+#include "Runtime/GfxDevice/GfxDeviceWindow.h"
+#include "ThreadedDeviceStates.h"
+
+class ThreadedWindow : public GfxDeviceWindow
+{
+public:
+ ThreadedWindow( HWND window, int width, int height, DepthBufferFormat depthFormat, int antiAlias );
+ ~ThreadedWindow();
+
+ bool Reshape( int width, int height, DepthBufferFormat depthFormat, int antiAlias );
+
+ bool BeginRendering();
+ bool EndRendering( bool presentContent );
+ void SetAsActiveWindow();
+
+ static int GetCurrentFSAALevel() { return ms_CurrentFSAALevel; }
+
+private:
+ void OnActivateWindow();
+
+ friend class GfxDeviceClient;
+ friend class GfxDeviceWorker;
+
+ ClientDeviceWindow* m_ClientWindow;
+ int m_FSAALevel;
+ bool m_Reshaped;
+ static int ms_CurrentFSAALevel;
+};
+
+#endif
+#endif