Android OpenGL improvement

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2161 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
sekelsenmat 2011-11-25 16:13:20 +00:00
parent 7b9f4459cf
commit 1dd3ca859b
4 changed files with 25 additions and 1 deletions

View File

@ -40,12 +40,19 @@
<PackageName Value="LCL"/> <PackageName Value="LCL"/>
</Item1> </Item1>
</RequiredPackages> </RequiredPackages>
<Units Count="1"> <Units Count="2">
<Unit0> <Unit0>
<Filename Value="androidlcltest.lpr"/> <Filename Value="androidlcltest.lpr"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<UnitName Value="androidlcltest"/> <UnitName Value="androidlcltest"/>
</Unit0> </Unit0>
<Unit1>
<Filename Value="mainform.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="Form1"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="mainform"/>
</Unit1>
</Units> </Units>
</ProjectOptions> </ProjectOptions>
<CompilerOptions> <CompilerOptions>

View File

@ -9,11 +9,15 @@ uses
android_native_app_glue, android_native_app_glue,
{$endif} {$endif}
Interfaces, Interfaces,
Forms,
mainform; mainform;
exports //android_main name 'android_main', exports //android_main name 'android_main',
ANativeActivity_onCreate name 'ANativeActivity_onCreate'; ANativeActivity_onCreate name 'ANativeActivity_onCreate';
begin begin
Application.Initialize;
Application.CreateForm(TForm1, Form1);
Application.Run;
end. end.

View File

@ -4,5 +4,6 @@ object Form1: TForm1
Top = 186 Top = 186
Width = 320 Width = 320
Caption = 'Form1' Caption = 'Form1'
OnPaint = FormPaint
LCLVersion = '0.9.31' LCLVersion = '0.9.31'
end end

View File

@ -8,7 +8,11 @@ uses
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs; Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs;
type type
{ TForm1 }
TForm1 = class(TForm) TForm1 = class(TForm)
procedure FormPaint(Sender: TObject);
private private
{ private declarations } { private declarations }
public public
@ -22,5 +26,13 @@ implementation
{$R *.lfm} {$R *.lfm}
{ TForm1 }
procedure TForm1.FormPaint(Sender: TObject);
begin
Canvas.Brush.Color := clRed;
Canvas.Rectangle(10, 10, 100, 100);
end;
end. end.