mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-07 01:57:57 +02:00
opengl: revert accidental changes to the example
git-svn-id: trunk@61061 -
This commit is contained in:
parent
e653d0cc68
commit
dc8600b0f2
@ -1,22 +1,10 @@
|
||||
object Form1: TForm1
|
||||
Left = 302
|
||||
Left = 419
|
||||
Height = 300
|
||||
Top = 181
|
||||
Top = 287
|
||||
Width = 400
|
||||
HorzScrollBar.Page = 399
|
||||
VertScrollBar.Page = 299
|
||||
Caption = 'Form1'
|
||||
ClientHeight = 300
|
||||
ClientWidth = 400
|
||||
OnCreate = FormCreate
|
||||
LCLVersion = '2.1.0.0'
|
||||
object Panel1: TPanel
|
||||
Left = 97
|
||||
Height = 50
|
||||
Top = 49
|
||||
Width = 170
|
||||
Caption = 'Panel1'
|
||||
TabOrder = 0
|
||||
OnMouseMove = Panel1MouseMove
|
||||
end
|
||||
end
|
||||
|
@ -15,32 +15,25 @@ interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, LCLProc, LResources, Forms, Controls, Graphics, Dialogs,
|
||||
ExtCtrls, OpenGLContext, GL, GLU, CocoaInt
|
||||
,CocoaWSCommon, CocoaPrivate;
|
||||
OpenGLContext, GL, GLU;
|
||||
|
||||
type
|
||||
|
||||
{ TForm1 }
|
||||
|
||||
TForm1 = class(TForm)
|
||||
Panel1: TPanel;
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure OpenGLControl1Paint(Sender: TObject);
|
||||
procedure OpenGLControl1Resize(Sender: TObject);
|
||||
procedure OnAppIdle(Sender: TObject; var Done: Boolean);
|
||||
procedure Panel1MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer
|
||||
);
|
||||
private
|
||||
public
|
||||
cube_rotationx: GLFloat;
|
||||
cube_rotationy: GLFloat;
|
||||
cube_rotationz: GLFloat;
|
||||
OpenGLControl1: TOpenGLControl;
|
||||
procedure OpenGLMouseMove(Sender: TObject; Shift: TShiftState;
|
||||
X, Y: Integer);
|
||||
end;
|
||||
|
||||
|
||||
var
|
||||
Form1: TForm1;
|
||||
|
||||
@ -59,24 +52,16 @@ begin
|
||||
Parent:=Self;
|
||||
OnPaint:=@OpenGLControl1Paint;
|
||||
OnResize:=@OpenGLControl1Resize;
|
||||
OnMouseMove:=@OpenGLMouseMove;
|
||||
AutoResizeViewport:=true;
|
||||
end;
|
||||
|
||||
Application.AddOnIdleHandler(@OnAppIdle);
|
||||
end;
|
||||
|
||||
procedure TForm1.OpenGLMouseMove(Sender: TObject; Shift: TShiftState;
|
||||
X, Y: Integer);
|
||||
begin
|
||||
Caption:=Format('%d %d',[x,y]);
|
||||
end;
|
||||
|
||||
procedure TForm1.OpenGLControl1Paint(Sender: TObject);
|
||||
var
|
||||
Speed: Double;
|
||||
begin
|
||||
writeln('paint');
|
||||
glClearColor(1.0, 1.0, 1.0, 1.0);
|
||||
glClear(GL_COLOR_BUFFER_BIT or GL_DEPTH_BUFFER_BIT);
|
||||
glEnable(GL_DEPTH_TEST);
|
||||
@ -154,15 +139,8 @@ procedure TForm1.OnAppIdle(Sender: TObject; var Done: Boolean);
|
||||
begin
|
||||
Done:=false;
|
||||
//DebugLn(['TForm1.OnAppIdle ']);
|
||||
//OpenGLControl1.Paint;
|
||||
OpenGLControl1.Invalidate;
|
||||
end;
|
||||
|
||||
procedure TForm1.Panel1MouseMove(Sender: TObject; Shift: TShiftState; X,
|
||||
Y: Integer);
|
||||
begin
|
||||
Caption:=Format('panel: %d %d',[x,y]);
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
|
@ -1,14 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<CONFIG>
|
||||
<ProjectOptions>
|
||||
<Version Value="12"/>
|
||||
<Version Value="9"/>
|
||||
<PathDelim Value="\"/>
|
||||
<General>
|
||||
<Flags>
|
||||
<LRSInOutputDirectory Value="False"/>
|
||||
<CompatibilityMode Value="True"/>
|
||||
</Flags>
|
||||
<SessionStorage Value="InProjectDir"/>
|
||||
<MainUnit Value="0"/>
|
||||
<ResourceType Value="res"/>
|
||||
</General>
|
||||
<BuildModes Count="1">
|
||||
@ -16,19 +16,15 @@
|
||||
</BuildModes>
|
||||
<PublishOptions>
|
||||
<Version Value="2"/>
|
||||
<IgnoreBinaries Value="False"/>
|
||||
<IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
|
||||
<ExcludeFileFilter Value="*.(bak|ppu|ppw|o|so);*~;backup"/>
|
||||
</PublishOptions>
|
||||
<RunParams>
|
||||
<local>
|
||||
<LaunchingApplication PathPlusParams="\usr\X11R6\bin\xterm -T 'Lazarus Run Output' -e $(LazarusDir)\tools\runwait.sh $(TargetCmdLine)"/>
|
||||
<FormatVersion Value="1"/>
|
||||
<LaunchingApplication PathPlusParams="\usr\X11R6\bin\xterm -T 'Lazarus Run Output' -e $(LazarusDir)\tools\runwait.sh $(TargetCmdLine)"/>
|
||||
</local>
|
||||
<FormatVersion Value="2"/>
|
||||
<Modes Count="1">
|
||||
<Mode0 Name="default">
|
||||
<local>
|
||||
<LaunchingApplication PathPlusParams="\usr\X11R6\bin\xterm -T 'Lazarus Run Output' -e $(LazarusDir)\tools\runwait.sh $(TargetCmdLine)"/>
|
||||
</local>
|
||||
</Mode0>
|
||||
</Modes>
|
||||
</RunParams>
|
||||
<RequiredPackages Count="2">
|
||||
<Item1>
|
||||
@ -48,7 +44,6 @@
|
||||
<Filename Value="mainunit.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<ComponentName Value="Form1"/>
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<UnitName Value="MainUnit"/>
|
||||
</Unit1>
|
||||
@ -62,9 +57,6 @@
|
||||
</SyntaxOptions>
|
||||
</Parsing>
|
||||
<Linking>
|
||||
<Debugging>
|
||||
<DebugInfoType Value="dsDwarf2"/>
|
||||
</Debugging>
|
||||
<Options>
|
||||
<Win32>
|
||||
<GraphicApplication Value="True"/>
|
||||
|
Loading…
Reference in New Issue
Block a user