#include <windows.h>
#include <GL/gl.h>
+#include <GL/wglext.h>
#include "glcontext.h"
#include "window_private.h"
+using namespace std;
+
namespace Msp {
namespace Graphics {
delete priv;
}
+void GLContext::set_swap_interval(unsigned i)
+{
+ PFNWGLSWAPINTERVALEXTPROC func = reinterpret_cast<PFNWGLSWAPINTERVALEXTPROC>(wglGetProcAddress("wglSwapIntervalEXT"));
+ if(!func)
+ throw runtime_error("wglSwapIntervalEXT not found");
+ func(i);
+}
+
void GLContext::swap_buffers()
{
HDC dc = GetDC(window.get_private().window);
ReleaseDC(window.get_private().window, dc);
}
-void GLContext::window_resized(unsigned w, unsigned h)
-{
- glViewport(0, 0, w, h);
-}
+void GLContext::window_resized(unsigned, unsigned)
+{ }
} // namespace Graphics
} // namespace Msp