function Lock(out Surface: TPixelSurface): Boolean; overload; inline;
---------------------------------------------------------------------------------------------------------------------
Code:
procedure TForm1.CacheTexture(const ATexture: TCustomLockableTexture);
var
LSurface: TPixelSurface;
begin
if not ATexture.Lock(LSurface) then //The code is optimized off the mobile platform TPixelSurface is a TObject?
begin
ShowMessage('lock failed');
Exit;
end else
ShowMessage('lock success');
//
try
if LSurface = nil then
ShowMessage('surface is null');
finally
ATexture.Unlock;
end;
end;
----------print----------
--surface is null
--lock success
Bookmarks