diff --git a/components/gtk/gtkglarea/gtkglareacontrol.pas b/components/gtk/gtkglarea/gtkglareacontrol.pas index d0b96f59b0..e9ffc5e3d1 100644 --- a/components/gtk/gtkglarea/gtkglareacontrol.pas +++ b/components/gtk/gtkglarea/gtkglareacontrol.pas @@ -45,6 +45,8 @@ type Procedure Paint; virtual; procedure DoOnResize; override; procedure DoOnPaint; virtual; + procedure SwapBuffers; virtual; + procedure MakeCurrent; virtual; public property Widget: PGtkGLArea read GetWidget; property OnPaint: TNotifyEvent read FOnPaint write FOnPaint; @@ -149,6 +151,16 @@ begin if Assigned(OnPaint) then OnPaint(Self); end; +procedure TCustomGTKGLAreaControl.SwapBuffers; +begin + gtk_gl_area_swap_buffers(Widget); +end; + +procedure TCustomGTKGLAreaControl.MakeCurrent; +begin + gtk_gl_area_make_current(Widget); +end; + procedure TCustomGTKGLAreaControl.WMPaint(var Message: TLMPaint); begin Include(FControlState, csCustomPaint);