mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-06 17:38:15 +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);
|
procedure SetSharedControl(const AValue: TCustomOpenGLControl);
|
||||||
function IsOpenGLRenderAllowed: boolean;
|
function IsOpenGLRenderAllowed: boolean;
|
||||||
protected
|
protected
|
||||||
|
class procedure WSRegisterClass; override;
|
||||||
procedure WMPaint(var Message: TLMPaint); message LM_PAINT;
|
procedure WMPaint(var Message: TLMPaint); message LM_PAINT;
|
||||||
procedure WMSize(var Message: TLMSize); message LM_SIZE;
|
procedure WMSize(var Message: TLMSize); message LM_SIZE;
|
||||||
procedure UpdateFrameTimeDiff;
|
procedure UpdateFrameTimeDiff;
|
||||||
@ -484,6 +485,17 @@ begin
|
|||||||
(ocoRenderAtDesignTime in Options);
|
(ocoRenderAtDesignTime in Options);
|
||||||
end;
|
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);
|
procedure TCustomOpenGLControl.WMPaint(var Message: TLMPaint);
|
||||||
begin
|
begin
|
||||||
Include(FControlState, csCustomPaint);
|
Include(FControlState, csCustomPaint);
|
||||||
@ -749,8 +761,9 @@ begin
|
|||||||
Result := False;
|
Result := False;
|
||||||
if AWinControl=nil then ;
|
if AWinControl=nil then ;
|
||||||
end;
|
end;
|
||||||
|
{~bk
|
||||||
initialization
|
initialization
|
||||||
RegisterWSComponent(TCustomOpenGLControl,TWSOpenGLControl);
|
RegisterWSComponent(TCustomOpenGLControl,TWSOpenGLControl);
|
||||||
|
}
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
Loading…
Reference in New Issue
Block a user