Browse Source

Upgrade to v.2.5

glscene 1 year ago
parent
commit
905cc82ba2

+ 18 - 32
Examples/AdvDemos/Earth/fEarthD.dfm

@@ -1,17 +1,13 @@
 object FormEarth: TFormEarth
 object FormEarth: TFormEarth
   Left = 412
   Left = 412
   Top = 123
   Top = 123
-  Margins.Left = 5
-  Margins.Top = 5
-  Margins.Right = 5
-  Margins.Bottom = 5
   Caption = 'Earth'
   Caption = 'Earth'
-  ClientHeight = 994
-  ClientWidth = 1356
+  ClientHeight = 568
+  ClientWidth = 775
   Color = clBtnFace
   Color = clBtnFace
   Font.Charset = DEFAULT_CHARSET
   Font.Charset = DEFAULT_CHARSET
   Font.Color = clWindowText
   Font.Color = clWindowText
-  Font.Height = -19
+  Font.Height = -11
   Font.Name = 'MS Sans Serif'
   Font.Name = 'MS Sans Serif'
   Font.Style = []
   Font.Style = []
   KeyPreview = True
   KeyPreview = True
@@ -20,21 +16,16 @@ object FormEarth: TFormEarth
   OnCreate = FormCreate
   OnCreate = FormCreate
   OnKeyPress = FormKeyPress
   OnKeyPress = FormKeyPress
   OnMouseWheel = FormMouseWheel
   OnMouseWheel = FormMouseWheel
-  PixelsPerInch = 168
-  TextHeight = 24
+  TextHeight = 13
   object GLSceneViewer: TGLSceneViewer
   object GLSceneViewer: TGLSceneViewer
-    Left = 226
+    Left = 129
     Top = 0
     Top = 0
-    Width = 1130
-    Height = 994
-    Margins.Left = 5
-    Margins.Top = 5
-    Margins.Right = 5
-    Margins.Bottom = 5
+    Width = 646
+    Height = 568
     Camera = Camera
     Camera = Camera
     BeforeRender = GLSceneViewerBeforeRender
     BeforeRender = GLSceneViewerBeforeRender
     Buffer.BackgroundColor = clBlack
     Buffer.BackgroundColor = clBlack
-    FieldOfView = 161.711547851562500000
+    FieldOfView = 148.535995483398400000
     PenAsTouch = False
     PenAsTouch = False
     Align = alClient
     Align = alClient
     OnDblClick = GLSceneViewerDblClick
     OnDblClick = GLSceneViewerDblClick
@@ -45,26 +36,19 @@ object FormEarth: TFormEarth
   object PanelLeft: TPanel
   object PanelLeft: TPanel
     Left = 0
     Left = 0
     Top = 0
     Top = 0
-    Width = 226
-    Height = 994
-    Margins.Left = 5
-    Margins.Top = 5
-    Margins.Right = 5
-    Margins.Bottom = 5
+    Width = 129
+    Height = 568
     Align = alLeft
     Align = alLeft
     TabOrder = 1
     TabOrder = 1
+    ExplicitHeight = 543
     object tvPlanets: TTreeView
     object tvPlanets: TTreeView
       Left = 1
       Left = 1
       Top = 1
       Top = 1
-      Width = 224
-      Height = 992
-      Margins.Left = 5
-      Margins.Top = 5
-      Margins.Right = 5
-      Margins.Bottom = 5
+      Width = 127
+      Height = 566
       Align = alClient
       Align = alClient
       Images = VirtPlanetSymbols
       Images = VirtPlanetSymbols
-      Indent = 33
+      Indent = 21
       TabOrder = 0
       TabOrder = 0
       OnClick = tvPlanetsClick
       OnClick = tvPlanetsClick
       Items.NodeData = {
       Items.NodeData = {
@@ -99,6 +83,7 @@ object FormEarth: TFormEarth
         0000090000000900000012000000FFFFFFFF0000000000000000000100000001
         0000090000000900000012000000FFFFFFFF0000000000000000000100000001
         0550006C00750074006F0000002B0000000A0000000A00000013000000FFFFFF
         0550006C00750074006F0000002B0000000A0000000A00000013000000FFFFFF
         FF00000000000000000000000000010621046800610072006F006E00}
         FF00000000000000000000000000010621046800610072006F006E00}
+      ExplicitHeight = 541
     end
     end
   end
   end
   object GLScene: TGLScene
   object GLScene: TGLScene
@@ -107,6 +92,7 @@ object FormEarth: TFormEarth
     Top = 30
     Top = 30
     object SkyDome: TGLSkyDome
     object SkyDome: TGLSkyDome
       Up.Coordinates = {0000803F000000000000000000000000}
       Up.Coordinates = {0000803F000000000000000000000000}
+      OnProgress = SkyDomeProgress
       Bands = <
       Bands = <
         item
         item
           StartColor.Color = {0000803F0000803F0000803F0000803F}
           StartColor.Color = {0000803F0000803F0000803F0000803F}
@@ -64900,8 +64886,8 @@ object FormEarth: TFormEarth
         Name = 'Planetoid'
         Name = 'Planetoid'
       end>
       end>
     ImageCollection = PlanetSymbols
     ImageCollection = PlanetSymbols
-    Width = 32
-    Height = 32
+    Width = 18
+    Height = 18
     Left = 510
     Left = 510
     Top = 260
     Top = 260
   end
   end

+ 2 - 0
Examples/AdvDemos/Earth/fEarthD.pas

@@ -123,6 +123,8 @@ type
     procedure miConstBoundariesClick(Sender: TObject);
     procedure miConstBoundariesClick(Sender: TObject);
     procedure Hide1Click(Sender: TObject);
     procedure Hide1Click(Sender: TObject);
     procedure Show1Click(Sender: TObject);
     procedure Show1Click(Sender: TObject);
+    procedure SkyDomeProgress(Sender: TObject; const DeltaTime,
+      NewTime: Double);
   public
   public
     ConstellationsAlpha: Single;
     ConstellationsAlpha: Single;
     TimeMultiplier: Single;
     TimeMultiplier: Single;

+ 3 - 7
Examples/AdvDemos/GLSViewer/Source/fGLSViewer.dfm

@@ -152,8 +152,8 @@ object FormGLSViewer: TFormGLSViewer
         Text = 'Model'
         Text = 'Model'
         Width = 40
         Width = 40
       end>
       end>
-    ExplicitTop = 459
-    ExplicitWidth = 699
+    ExplicitTop = 658
+    ExplicitWidth = 1072
   end
   end
   object snViewer: TGLSceneViewer
   object snViewer: TGLSceneViewer
     Left = 273
     Left = 273
@@ -181,7 +181,6 @@ object FormGLSViewer: TFormGLSViewer
     Height = 29
     Height = 29
     Align = alTop
     Align = alTop
     TabOrder = 2
     TabOrder = 2
-    ExplicitWidth = 699
     object atbTools: TActionToolBar
     object atbTools: TActionToolBar
       Left = 357
       Left = 357
       Top = 2
       Top = 2
@@ -264,7 +263,6 @@ object FormGLSViewer: TFormGLSViewer
     Font.Name = 'MS Sans Serif'
     Font.Name = 'MS Sans Serif'
     Font.Style = []
     Font.Style = []
     Spacing = 0
     Spacing = 0
-    ExplicitWidth = 699
   end
   end
   object PanelLeft: TPanel
   object PanelLeft: TPanel
     Left = 0
     Left = 0
@@ -273,6 +271,7 @@ object FormGLSViewer: TFormGLSViewer
     Height = 627
     Height = 627
     Align = alLeft
     Align = alLeft
     TabOrder = 4
     TabOrder = 4
+    ExplicitHeight = 602
     object tvScene: TTreeView
     object tvScene: TTreeView
       Left = 1
       Left = 1
       Top = 1
       Top = 1
@@ -481,9 +480,6 @@ object FormGLSViewer: TFormGLSViewer
         6D0070007500740069006E0067000000410000005E0000005E000000FFFFFFFF
         6D0070007500740069006E0067000000410000005E0000005E000000FFFFFFFF
         FFFFFFFF0000000000000000000000000001114300550044004100470065006E
         FFFFFFFF0000000000000000000000000001114300550044004100470065006E
         006500720061007400650064004D00650073006800}
         006500720061007400650064004D00650073006800}
-      ExplicitLeft = -4
-      ExplicitTop = 3
-      ExplicitWidth = 151
     end
     end
   end
   end
   object Scene: TGLScene
   object Scene: TGLScene

+ 2 - 31
Examples/AdvDemos/GLSViewer/Source/fGLSViewer.pas

@@ -1088,13 +1088,12 @@ end;
 procedure TFormGLSViewer.acPointsExecute(Sender: TObject);
 procedure TFormGLSViewer.acPointsExecute(Sender: TObject);
 var
 var
   I: Integer;
   I: Integer;
-  Color: TVector3f;
+  Color: TVector4f;
   NumPoints: Integer;
   NumPoints: Integer;
   X, Y, Z: Single;
   X, Y, Z: Single;
 
 
 begin
 begin
   NumPoints := 10000;
   NumPoints := 10000;
-  Points := TGLPoints(dcWorld.AddNewChild(TGLPoints));
   Points.Size := 5.0;
   Points.Size := 5.0;
   Points.Style := psSmooth;
   Points.Style := psSmooth;
   for I := 0 to NumPoints - 1 do
   for I := 0 to NumPoints - 1 do
@@ -1108,38 +1107,10 @@ begin
     Color.X := Random();
     Color.X := Random();
     Color.Y := Random();
     Color.Y := Random();
     Color.Z := Random();
     Color.Z := Random();
-    Points.Colors.AddPoint(Color);
+    Points.Colors.AddPoint(Color.X, Color.Y, 0);
   end;
   end;
-//  dcWorld.Remove(GLPoints, False);
 end;
 end;
 
 
-(*
-procedure TMainForm.acDeletePoints(Sender: TObject);
-var
-  I: Integer;
-  Color: TVector3f;
-  NumPoints: Integer;
-  X, Y, Z: Single;
-
-begin
-  NumPoints := 10000;
-  Points := TGLPoints(dcWorld.AddNewChild(TGLPoints));
-  for I := 0 to NumPoints - 1 do
-  begin
-    Color.X := Random();
-    Color.Y := Random();
-    Color.Z := Random();
-
-    X := Random(100) - 50;
-    Y := Random(100) - 50;
-    Z := Random(100) - 50;
-
-    Points.Positions.Add(X * 0.05, Y * 0.05, Z * 0.05);
-    // Fill array of GLPoints
-  end;
-end;
-*)
-
 procedure TFormGLSViewer.acFileExitExecute(Sender: TObject);
 procedure TFormGLSViewer.acFileExitExecute(Sender: TObject);
 begin
 begin
   Close;
   Close;

+ 2 - 1
Examples/Demos/rendering/SkyBox/fSkyBoxC.cpp

@@ -10,6 +10,8 @@
 #pragma link "GLS.Cadencer"
 #pragma link "GLS.Cadencer"
 #pragma link "GLS.Coordinates"
 #pragma link "GLS.Coordinates"
 
 
+#pragma link "GLScene.Utils"
+
 #pragma link "GLS.LensFlare"
 #pragma link "GLS.LensFlare"
 #pragma link "GLS.Material"
 #pragma link "GLS.Material"
 #pragma link "GLS.Navigator"
 #pragma link "GLS.Navigator"
@@ -18,7 +20,6 @@
 #pragma link "GLS.SimpleNavigation"
 #pragma link "GLS.SimpleNavigation"
 #pragma link "GLS.SkyDome"
 #pragma link "GLS.SkyDome"
 #pragma link "GLS.SceneViewer"
 #pragma link "GLS.SceneViewer"
-#pragma link "GLScene.Utils"
 #pragma resource "*.dfm"
 #pragma resource "*.dfm"
 TFormSkybox *FormSkybox;
 TFormSkybox *FormSkybox;
 
 

+ 7 - 16
Examples/Demos/rendering/SkyBox/fSkyBoxC.dfm

@@ -1,36 +1,27 @@
 object FormSkybox: TFormSkybox
 object FormSkybox: TFormSkybox
   Left = 0
   Left = 0
   Top = 0
   Top = 0
-  Margins.Left = 5
-  Margins.Top = 5
-  Margins.Right = 5
-  Margins.Bottom = 5
   Caption = 'Sky Box'
   Caption = 'Sky Box'
-  ClientHeight = 821
-  ClientWidth = 1208
+  ClientHeight = 469
+  ClientWidth = 690
   Color = clBtnFace
   Color = clBtnFace
   Font.Charset = DEFAULT_CHARSET
   Font.Charset = DEFAULT_CHARSET
   Font.Color = clWindowText
   Font.Color = clWindowText
-  Font.Height = -19
+  Font.Height = -11
   Font.Name = 'Tahoma'
   Font.Name = 'Tahoma'
   Font.Style = []
   Font.Style = []
   Position = poScreenCenter
   Position = poScreenCenter
   OnCreate = FormCreate
   OnCreate = FormCreate
-  PixelsPerInch = 168
-  TextHeight = 23
+  TextHeight = 13
   object GLSceneViewer1: TGLSceneViewer
   object GLSceneViewer1: TGLSceneViewer
     Left = 0
     Left = 0
     Top = 0
     Top = 0
-    Width = 1208
-    Height = 821
-    Margins.Left = 5
-    Margins.Top = 5
-    Margins.Right = 5
-    Margins.Bottom = 5
+    Width = 690
+    Height = 469
     Camera = GLCamera1
     Camera = GLCamera1
     Buffer.BackgroundColor = 7168
     Buffer.BackgroundColor = 7168
     Buffer.AmbientColor.Color = {0000803F0000803F0000803F0000803F}
     Buffer.AmbientColor.Color = {0000803F0000803F0000803F0000803F}
-    FieldOfView = 168.869094848632800000
+    FieldOfView = 160.639801025390600000
     PenAsTouch = False
     PenAsTouch = False
     Align = alClient
     Align = alClient
     TabOrder = 0
     TabOrder = 0

+ 4 - 2
Examples/Demos/rendering/SkyBox/fSkyBoxC.h

@@ -7,6 +7,10 @@
 #include <Vcl.Controls.hpp>
 #include <Vcl.Controls.hpp>
 #include <Vcl.StdCtrls.hpp>
 #include <Vcl.StdCtrls.hpp>
 #include <Vcl.Forms.hpp>
 #include <Vcl.Forms.hpp>
+
+#include "GLScene.Utils.hpp"
+#include "GLScene.Keyboard.hpp"
+
 #include "GLS.BaseClasses.hpp"
 #include "GLS.BaseClasses.hpp"
 #include "GLS.Cadencer.hpp"
 #include "GLS.Cadencer.hpp"
 #include "GLS.Coordinates.hpp"
 #include "GLS.Coordinates.hpp"
@@ -19,10 +23,8 @@
 #include "GLS.SimpleNavigation.hpp"
 #include "GLS.SimpleNavigation.hpp"
 #include "GLS.SkyDome.hpp"
 #include "GLS.SkyDome.hpp"
 #include "GLS.SceneViewer.hpp"
 #include "GLS.SceneViewer.hpp"
-#include "GLScene.Keyboard.hpp"
 #include "JPeg.hpp"
 #include "JPeg.hpp"
 #include "GLS.FileJPEG.hpp"
 #include "GLS.FileJPEG.hpp"
-#include "GLScene.Utils.hpp"
 
 
 //---------------------------------------------------------------------------
 //---------------------------------------------------------------------------
 class TFormSkybox : public TForm
 class TFormSkybox : public TForm

+ 7 - 16
Examples/Demos/rendering/SkyBox/fSkyBoxD.dfm

@@ -1,37 +1,28 @@
 object FormSkybox: TFormSkybox
 object FormSkybox: TFormSkybox
   Left = 176
   Left = 176
   Top = 73
   Top = 73
-  Margins.Left = 5
-  Margins.Top = 5
-  Margins.Right = 5
-  Margins.Bottom = 5
   Caption = 'Sky Box'
   Caption = 'Sky Box'
-  ClientHeight = 1010
-  ClientWidth = 1558
+  ClientHeight = 577
+  ClientWidth = 890
   Color = clBtnFace
   Color = clBtnFace
   Font.Charset = DEFAULT_CHARSET
   Font.Charset = DEFAULT_CHARSET
   Font.Color = clWindowText
   Font.Color = clWindowText
-  Font.Height = -19
+  Font.Height = -11
   Font.Name = 'MS Sans Serif'
   Font.Name = 'MS Sans Serif'
   Font.Style = []
   Font.Style = []
   Position = poScreenCenter
   Position = poScreenCenter
   Visible = True
   Visible = True
   OnCreate = FormCreate
   OnCreate = FormCreate
-  PixelsPerInch = 168
-  TextHeight = 24
+  TextHeight = 13
   object GLSceneViewer1: TGLSceneViewer
   object GLSceneViewer1: TGLSceneViewer
     Left = 0
     Left = 0
     Top = 0
     Top = 0
-    Width = 1558
-    Height = 1010
-    Margins.Left = 5
-    Margins.Top = 5
-    Margins.Right = 5
-    Margins.Bottom = 5
+    Width = 890
+    Height = 577
     Camera = GLCamera1
     Camera = GLCamera1
     Buffer.BackgroundColor = 7168
     Buffer.BackgroundColor = 7168
     Buffer.AmbientColor.Color = {0000803F0000803F0000803F0000803F}
     Buffer.AmbientColor.Color = {0000803F0000803F0000803F0000803F}
-    FieldOfView = 170.942352294921900000
+    FieldOfView = 164.212738037109400000
     PenAsTouch = False
     PenAsTouch = False
     Align = alClient
     Align = alClient
     TabOrder = 0
     TabOrder = 0

+ 2 - 1
Examples/Demos/rendering/SkyBox/fSkyBoxD.pas

@@ -16,6 +16,7 @@ uses
 
 
   GLS.Scene,
   GLS.Scene,
   GLScene.VectorTypes,
   GLScene.VectorTypes,
+  GLScene.Keyboard,
   GLS.Texture,
   GLS.Texture,
   GLS.SkyDome,
   GLS.SkyDome,
 
 
@@ -68,7 +69,7 @@ type
 var
 var
   FormSkybox: TFormSkybox;
   FormSkybox: TFormSkybox;
 
 
-implementation
+implementation  //-------------------------------------------------------------
 
 
 {$R *.dfm}
 {$R *.dfm}
 
 

BIN
Help/GLSysHelp/HTML/GLSysHelp.chm


BIN
Help/GXSysHelp/HTML/GXSysHelp.chm