From 15740faf9fe9fe4be08965098bbf2947e096aeeb Mon Sep 17 00:00:00 2001 From: chai Date: Wed, 14 Aug 2019 22:50:43 +0800 Subject: +Unity Runtime code --- Runtime/GfxDevice/opengl/GLWindow.h | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 Runtime/GfxDevice/opengl/GLWindow.h (limited to 'Runtime/GfxDevice/opengl/GLWindow.h') diff --git a/Runtime/GfxDevice/opengl/GLWindow.h b/Runtime/GfxDevice/opengl/GLWindow.h new file mode 100644 index 0000000..53f79b9 --- /dev/null +++ b/Runtime/GfxDevice/opengl/GLWindow.h @@ -0,0 +1,29 @@ +#ifndef GLWINDOW_H +#define GLWINDOW_H + +#include "UnityGL.h" +#include "Runtime/GfxDevice/GfxDeviceWindow.h" +#include "GLContext.h" + +class GLWindow : public GfxDeviceWindow +{ +private: + GraphicsContextHandle m_GLContext; + int cc; +public: + GLWindow (NativeWindow window, int width, int height, DepthBufferFormat depthFormat, int antiAlias); + ~GLWindow(); + + bool Reshape( int width, int height, DepthBufferFormat depthFormat, int antiAlias ); + + bool BeginRendering(); + bool EndRendering( bool presentContent ); + +public: + static GLWindow* Current(); + + +}; + + +#endif -- cgit v1.1-26-g67d0