From dc8600b0f278c86fcfc90fd008bd784529cfa7f5 Mon Sep 17 00:00:00 2001 From: dmitry Date: Fri, 26 Apr 2019 13:28:43 +0000 Subject: [PATCH] opengl: revert accidental changes to the example git-svn-id: trunk@61061 - --- components/opengl/example/mainunit.lfm | 16 ++----------- components/opengl/example/mainunit.pas | 24 +------------------ .../opengl/example/testopenglcontext1.lpi | 22 ++++++----------- 3 files changed, 10 insertions(+), 52 deletions(-) diff --git a/components/opengl/example/mainunit.lfm b/components/opengl/example/mainunit.lfm index 679671a30b..33b0e3adc7 100644 --- a/components/opengl/example/mainunit.lfm +++ b/components/opengl/example/mainunit.lfm @@ -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 diff --git a/components/opengl/example/mainunit.pas b/components/opengl/example/mainunit.pas index f4b9a67174..185bd18767 100644 --- a/components/opengl/example/mainunit.pas +++ b/components/opengl/example/mainunit.pas @@ -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. diff --git a/components/opengl/example/testopenglcontext1.lpi b/components/opengl/example/testopenglcontext1.lpi index 697c78bd13..6db09b21a6 100644 --- a/components/opengl/example/testopenglcontext1.lpi +++ b/components/opengl/example/testopenglcontext1.lpi @@ -1,14 +1,14 @@ - + - + @@ -16,19 +16,15 @@ + + + - + + - - - - - - - - @@ -48,7 +44,6 @@ - @@ -62,9 +57,6 @@ - - -