--- /dev/null
+/* $Id$
+
+This file is part of gldbg
+Copyright © 2011 Mikko Rasa, Mikkosoft Productions
+Distributed under the GPL
+*/
+
+#include "functions.h"
+#include "grabber.h"
+
+namespace {
+
+template<void (Grabber::*next_frame)()>
+void glXSwapBuffers(void *user_data, Display *, GLXDrawable)
+{
+ (reinterpret_cast<Grabber *>(user_data)->*next_frame)();
+}
+
+}
+
+unsigned short Grabber::break_funcs[] =
+{
+ FUNC_GLXSWAPBUFFERS,
+ FUNC_GLEND,
+ FUNC_GLDRAWARRAYS,
+ FUNC_GLDRAWELEMENTS,
+ FUNC_GLDRAWRANGEELEMENTS,
+ 0
+};
+
+void Grabber::flavor_init()
+{
+ decoder->glXSwapBuffers = glXSwapBuffers<&Grabber::next_frame>;
+}