GLContext::WasLost - Determines if we lost the context due to a TDR or another outstanding event.

This commit is contained in:
Dr. Chat
2015-12-20 21:13:51 -06:00
parent 0c60cc5f48
commit 30eda6909f
3 changed files with 66 additions and 18 deletions

View File

@@ -45,6 +45,12 @@ class GraphicsContext {
virtual bool MakeCurrent() = 0;
virtual void ClearCurrent() = 0;
// Returns true if the OS took away our context because we caused a TDR or
// some other outstanding error. When this happens, this context, as well as
// any other shared contexts are junk.
// This context must be made current in order for this call to work properly.
virtual bool WasLost() { return false; }
virtual void BeginSwap() = 0;
virtual void EndSwap() = 0;