Package ch.bailu.gtk.gtk
Interface GLArea.OnResize
- Enclosing class:
- GLArea
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
onResize
(int width, int height) Emitted once when the widget is realized, and then each time the widget
is changed while realized.
-
Method Details
-
onResize
void onResize(int width, int height) Emitted once when the widget is realized, and then each time the widget
is changed while realized.
This is useful in order to keep GL state up to date with the widget size,
like for instance camera properties which may depend on the width/height
ratio.
The GL context for the area is guaranteed to be current when this signal
is emitted.
The default handler sets up the GL viewport.- Parameters:
width
- the width of the viewportheight
- the height of the viewport
-