#include <uglpane.hpp>
Public Member Functions | |
UGlpane (const UArgs &arglist=UArgs::none) | |
virtual void | makeCurrent () |
makes this widget the current widget for OpenGL (GL will use its GLContext). | |
virtual void | swapBuffers () |
swaps the screen content with the off-screen buffer. | |
void | setAutoBufferSwap (bool state) |
specifies if swapBuffers() is called automatically after paintGL(). | |
Protected Member Functions | |
virtual void | initGL (UEvent &) |
called once before the first call of paintGL() or resizeGL(). | |
virtual void | resizeGL (UEvent &, int w, int h) |
called when the widget is resized. | |
virtual void | paintGL (UEvent &) |
called when the widget is repainted. | |
virtual void | initGLImpl (UEvent &) |
Impl: init the widget and calls initGL(). | |
virtual void | resizeGLImpl (UEvent &) |
Impl: calls makeCurrent() then resizeGL(). | |
virtual void | paintGLImpl (UEvent &) |
Impl: calls makeCurrent() then paintGL() and swapBuffers() (when applicable). | |
GLXContext | getGLContext () |
Notes:
virtual void ubit::UGlpane::initGL | ( | UEvent & | ) | [protected, virtual] |
called once before the first call of paintGL() or resizeGL().
Note: makeCurrent() is automatically called before initGL()
virtual void ubit::UGlpane::makeCurrent | ( | ) | [virtual] |
makes this widget the current widget for OpenGL (GL will use its GLContext).
there is generally no need to call makeCurrent() explictely because this is done automatically before initGL(), resizeGL() and paintGL()
virtual void ubit::UGlpane::paintGL | ( | UEvent & | ) | [protected, virtual] |
called when the widget is repainted.
Notes:
virtual void ubit::UGlpane::resizeGL | ( | UEvent & | , | |
int | w, | |||
int | h | |||
) | [protected, virtual] |
called when the widget is resized.
Note: makeCurrent() is automatically called before resizeGL()
virtual void ubit::UGlpane::swapBuffers | ( | ) | [virtual] |
swaps the screen content with the off-screen buffer.
this function only works in double buffer mode (this is the default, see UConf). There is generally no need to call swapBuffers() explictely because this is done automatically after paintGL(). Use setAutoBufferSwap() to change this behavior if you need to call swapBuffers() explicitely.