added MakeCurrent and SwapBuffers

git-svn-id: trunk@5290 -
This commit is contained in:
mattias 2004-03-10 22:55:39 +00:00
parent 0cc6b98039
commit ec1a73dded

View File

@ -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);