#include <GLWidgetSentry.h>
Public Member Functions | |
GLWidgetSentry (GtkWidget *w) | |
~GLWidgetSentry () | |
Private Attributes | |
GtkWidget * | _widget |
Sentry class that calls glwidget_make_current() on construction and glwidget_swap_buffers() on destruction at the end of a scope. This avoids the need to manually call these functions and use branches to make sure they are executed.
Definition at line 11 of file GLWidgetSentry.h.
gtkutil::GLWidgetSentry::GLWidgetSentry | ( | GtkWidget * | w | ) | [inline] |
Constructor calls glwidget_make_current().
Definition at line 13 of file GLWidgetSentry.h.
References _widget, glwidget_make_current(), glwidget_swap_buffers(), and ~GLWidgetSentry().
gtkutil::GLWidgetSentry::~GLWidgetSentry | ( | ) | [inline] |
Definition at line 21 of file GLWidgetSentry.h.
Referenced by GLWidgetSentry().
GtkWidget* gtkutil::GLWidgetSentry::_widget [private] |
Definition at line 7 of file GLWidgetSentry.h.
Referenced by GLWidgetSentry().