diff Framework/OpenGL/WebAssemblyOpenGLContext.h @ 947:1091b2adeb5a toa2019081001

Fixed animation frame stopping when returning false + big work on the OpenGL objects to make them lost context-safe + debug code to forcefully tag a context as lost + debug macros
author Benjamin Golinvaux <bgo@osimis.io>
date Sat, 10 Aug 2019 13:07:31 +0200
parents 0aff28f15ea2
children a7351ad54960
line wrap: on
line diff
--- a/Framework/OpenGL/WebAssemblyOpenGLContext.h	Tue Aug 06 15:07:23 2019 +0200
+++ b/Framework/OpenGL/WebAssemblyOpenGLContext.h	Sat Aug 10 13:07:31 2019 +0200
@@ -39,6 +39,8 @@
 
 #include "IOpenGLContext.h"
 
+#include <Core/Enumerations.h>
+
 #include <boost/shared_ptr.hpp>
 
 namespace OrthancStone
@@ -54,13 +56,20 @@
     public:
       WebAssemblyOpenGLContext(const std::string& canvas);
 
-      virtual void MakeCurrent();
+      virtual bool IsContextLost() const ORTHANC_OVERRIDE;
+
+      virtual void SetLostContext() ORTHANC_OVERRIDE;
+      virtual void RestoreLostContext() ORTHANC_OVERRIDE;
 
-      virtual void SwapBuffer();
+      virtual void MakeCurrent() ORTHANC_OVERRIDE;
 
-      virtual unsigned int GetCanvasWidth() const;
+      virtual void SwapBuffer() ORTHANC_OVERRIDE;
+
+      virtual unsigned int GetCanvasWidth() const ORTHANC_OVERRIDE;
 
-      virtual unsigned int GetCanvasHeight() const;
+      virtual unsigned int GetCanvasHeight() const ORTHANC_OVERRIDE;
+
+      virtual void* DebugGetInternalContext() const ORTHANC_OVERRIDE;
 
       void UpdateSize();