}
-static thread_specific Context *
+Context::~Context()
+{
+ //assert(this != getCurrentContext());
+ if (this != getCurrentContext()) {
+ delete wsContext;
+ }
+}
+
+
+static OS_THREAD_SPECIFIC_PTR(Context)
currentContextPtr;
return false;
}
- if (currentContext) {
- currentContext->drawable = NULL;
- }
currentContextPtr = context;
if (drawable && context) {
return;
}
+ width = std::max(width, currentDrawable->width);
+ height = std::max(height, currentDrawable->height);
+
// Check for bound framebuffer last, as this may have a performance impact.
GLint draw_framebuffer = 0;
glGetIntegerv(GL_DRAW_FRAMEBUFFER_BINDING, &draw_framebuffer);