using boost::shared_ptr;
using boost::optional;
+
+static void
+check_gl_error (char const * last)
+{
+ GLenum const e = glGetError ();
+ if (e != GL_NO_ERROR) {
+ throw GLError (last, e);
+ }
+}
+
+
GLVideoView::GLVideoView (FilmViewer* viewer, wxWindow *parent)
: VideoView (viewer)
, _have_storage (false)
#endif
glGenTextures (1, &_id);
+ check_gl_error ("glGenTextures");
glBindTexture (GL_TEXTURE_2D, _id);
+ check_gl_error ("glBindTexture");
glPixelStorei (GL_UNPACK_ALIGNMENT, 1);
+ check_gl_error ("glPixelStorei");
}
GLVideoView::~GLVideoView ()
}
}
-static void
-check_gl_error (char const * last)
-{
- GLenum const e = glGetError ();
- if (e != GL_NO_ERROR) {
- throw GLError (last, e);
- }
-}
void
GLVideoView::update ()
}
glFlush();
+ check_gl_error ("glFlush");
boost::mutex::scoped_lock lm (_canvas_mutex);
_canvas->SwapBuffers();