delete priv;
}
+void GLContext::set_swap_interval(unsigned)
+{
+ // TODO
+}
+
void GLContext::swap_buffers()
{
flush_gl_buffer(priv->context);
delete priv;
}
+void GLContext::set_swap_interval(unsigned)
+{
+ // TODO
+}
+
void GLContext::swap_buffers()
{
eglSwapBuffers(priv->display, priv->surface);
GLContext::~GLContext()
{ }
+void GLContext::set_swap_interval(unsigned)
+{ }
+
void GLContext::swap_buffers()
{ }
public:
~GLContext();
+ void set_swap_interval(unsigned);
+
void swap_buffers();
private:
void window_resized(unsigned, unsigned);
delete priv;
}
+void GLContext::set_swap_interval(unsigned i)
+{
+ const GLubyte *name = reinterpret_cast<const GLubyte *>("glXSwapIntervalEXT");
+ PFNGLXSWAPINTERVALEXTPROC func = reinterpret_cast<PFNGLXSWAPINTERVALEXTPROC>(glXGetProcAddress(name));
+ if(!func)
+ throw runtime_error("glXSwapIntervalEXT not found");
+ func(display.get_private().display, priv->subwnd, i);
+}
+
void GLContext::swap_buffers()
{
glXSwapBuffers(display.get_private().display, priv->subwnd);
#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);