mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-05-30 19:22:42 +02:00
OpenGlContext: Register WS class, needed for new optimized TLCLComponent.NewInstance. Issue #37407, patch from BrunoK.
git-svn-id: trunk@63636 -
This commit is contained in:
parent
b45ee007da
commit
4b779ac15b
@ -180,6 +180,7 @@ type
|
||||
procedure SetSharedControl(const AValue: TCustomOpenGLControl);
|
||||
function IsOpenGLRenderAllowed: boolean;
|
||||
protected
|
||||
class procedure WSRegisterClass; override;
|
||||
procedure WMPaint(var Message: TLMPaint); message LM_PAINT;
|
||||
procedure WMSize(var Message: TLMSize); message LM_SIZE;
|
||||
procedure UpdateFrameTimeDiff;
|
||||
@ -484,6 +485,17 @@ begin
|
||||
(ocoRenderAtDesignTime in Options);
|
||||
end;
|
||||
|
||||
class procedure TCustomOpenGLControl.WSRegisterClass;
|
||||
const
|
||||
Registered : Boolean = False;
|
||||
begin
|
||||
if Registered then
|
||||
Exit;
|
||||
inherited WSRegisterClass;
|
||||
RegisterWSComponent(TCustomOpenGLControl,TWSOpenGLControl);
|
||||
Registered := True;
|
||||
end;
|
||||
|
||||
procedure TCustomOpenGLControl.WMPaint(var Message: TLMPaint);
|
||||
begin
|
||||
Include(FControlState, csCustomPaint);
|
||||
@ -749,8 +761,9 @@ begin
|
||||
Result := False;
|
||||
if AWinControl=nil then ;
|
||||
end;
|
||||
|
||||
{~bk
|
||||
initialization
|
||||
RegisterWSComponent(TCustomOpenGLControl,TWSOpenGLControl);
|
||||
}
|
||||
|
||||
end.
|
||||
|
Loading…
Reference in New Issue
Block a user