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:
juha 2020-07-23 19:45:33 +00:00
parent b45ee007da
commit 4b779ac15b

View File

@ -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.