*
**************************************************************************/
-#include "glimports.hpp"
+#include "glproc.hpp"
#include "glws.hpp"
void swapBuffers(void) {
SwapBuffers(hDC);
+
+ // Drain message queue to prevent window from being considered
+ // non-responsive
+ MSG msg;
+ while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) {
+ TranslateMessage(&msg);
+ DispatchMessage(&msg);
+ }
}
};
void
init(void) {
+ /*
+ * OpenGL library must be loaded by the time we call GDI.
+ */
+ __libGlHandle = LoadLibraryA("OPENGL32");
}
void
}
Visual *
-createVisual(bool doubleBuffer) {
+createVisual(bool doubleBuffer, Profile profile) {
+ if (profile != PROFILE_COMPAT) {
+ return NULL;
+ }
+
Visual *visual = new Visual();
visual->doubleBuffer = doubleBuffer;