mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-10 14:36:09 +02:00
added MakeCurrent and SwapBuffers
git-svn-id: trunk@5290 -
This commit is contained in:
parent
0cc6b98039
commit
ec1a73dded
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user