Swapping.

This commit is contained in:
Ben Vanik
2014-12-24 22:35:03 -08:00
parent fa0dfa4dce
commit f438ae1bfd
11 changed files with 380 additions and 127 deletions

View File

@@ -43,6 +43,16 @@ class GLContext {
WGLEWContext wglew_context_;
};
struct GLContextLock {
GLContextLock(GLContext* context) : context_(context) {
context_->MakeCurrent();
}
~GLContextLock() { context_->ClearCurrent(); }
private:
GLContext* context_;
};
} // namespace gl4
} // namespace gpu
} // namespace xe