mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-13 09:29:10 +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 Paint; virtual;
|
||||||
procedure DoOnResize; override;
|
procedure DoOnResize; override;
|
||||||
procedure DoOnPaint; virtual;
|
procedure DoOnPaint; virtual;
|
||||||
|
procedure SwapBuffers; virtual;
|
||||||
|
procedure MakeCurrent; virtual;
|
||||||
public
|
public
|
||||||
property Widget: PGtkGLArea read GetWidget;
|
property Widget: PGtkGLArea read GetWidget;
|
||||||
property OnPaint: TNotifyEvent read FOnPaint write FOnPaint;
|
property OnPaint: TNotifyEvent read FOnPaint write FOnPaint;
|
||||||
@ -149,6 +151,16 @@ begin
|
|||||||
if Assigned(OnPaint) then OnPaint(Self);
|
if Assigned(OnPaint) then OnPaint(Self);
|
||||||
end;
|
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);
|
procedure TCustomGTKGLAreaControl.WMPaint(var Message: TLMPaint);
|
||||||
begin
|
begin
|
||||||
Include(FControlState, csCustomPaint);
|
Include(FControlState, csCustomPaint);
|
||||||
|
Loading…
Reference in New Issue
Block a user