diff options
author | chai <chaifix@163.com> | 2019-08-14 22:50:43 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2019-08-14 22:50:43 +0800 |
commit | 15740faf9fe9fe4be08965098bbf2947e096aeeb (patch) | |
tree | a730ec236656cc8cab5b13f088adfaed6bb218fb /Runtime/GfxDevice/threaded/ThreadedWindow.h |
Diffstat (limited to 'Runtime/GfxDevice/threaded/ThreadedWindow.h')
-rw-r--r-- | Runtime/GfxDevice/threaded/ThreadedWindow.h | 36 |
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 |