diff options
Diffstat (limited to 'src/wx/gl_video_view.cc')
| -rw-r--r-- | src/wx/gl_video_view.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/wx/gl_video_view.cc b/src/wx/gl_video_view.cc index 39532ab79..90a4dfd5c 100644 --- a/src/wx/gl_video_view.cc +++ b/src/wx/gl_video_view.cc @@ -32,6 +32,7 @@ #else #include <GL/glu.h> #include <GL/glext.h> +#include <GL/glxext.h> #endif using std::cout; @@ -46,6 +47,12 @@ GLVideoView::GLVideoView (FilmViewer* viewer, wxWindow *parent) _canvas->Bind (wxEVT_PAINT, boost::bind(&GLVideoView::paint, this)); _canvas->Bind (wxEVT_SIZE, boost::bind(boost::ref(Sized))); + if (_canvas->IsExtensionSupported("GLX_EXT_swap_control")) { + /* Enable vsync */ + Display* dpy = wxGetX11Display(); + glXSwapIntervalEXT (dpy, DefaultScreen(dpy), 1); + } + glGenTextures (1, &_id); glBindTexture (GL_TEXTURE_2D, _id); glPixelStorei (GL_UNPACK_ALIGNMENT, 1); |
