diff options
Diffstat (limited to 'Runtime/GfxDevice/GfxDeviceWindow.cpp')
-rw-r--r-- | Runtime/GfxDevice/GfxDeviceWindow.cpp | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/Runtime/GfxDevice/GfxDeviceWindow.cpp b/Runtime/GfxDevice/GfxDeviceWindow.cpp new file mode 100644 index 0000000..c6e4933 --- /dev/null +++ b/Runtime/GfxDevice/GfxDeviceWindow.cpp @@ -0,0 +1,55 @@ +#include "UnityPrefix.h" +#include "GfxDeviceWindow.h" + + +GfxDeviceWindow::GfxDeviceWindow (NativeWindow window, int width, int height, DepthBufferFormat depthFormat, int antiAlias) + : m_Window (window) + , m_Width (0) + , m_Height (0) + , m_InvalidState (true) + , m_CanUseBlitOptimization (false) +{ + //Reshape (width, height, depthFormat, antiAlias); +} + +GfxDeviceWindow::~GfxDeviceWindow () +{ +} + +bool GfxDeviceWindow::Reshape (int width, int height, DepthBufferFormat depthFormat, int antiAlias) +{ + m_InvalidState = false; + + AssertIf (!m_Window); + + m_Width = width; + m_Height = height; + + if (m_Width <= 0 || m_Height <= 0) + { + m_InvalidState = true; + } + + return !m_InvalidState; +} + + +bool GfxDeviceWindow::BeginRendering () +{ + if (m_InvalidState) + { + return false; + } + + return true; +} + +bool GfxDeviceWindow::EndRendering (bool presentContent) +{ + if (m_InvalidState) + { + return false; + } + + return true; +} |