First off, I guess HI! My registration e-mail isn't arrived yet, so I'm posting as guest.
Anyways, I'm having a compilation problem. I'm using the Lazarus install that comes with GLScene and Quark pre-installed, and began putting together the example spinning cube program on page 7 of
Skinhat's GLScene tutorial. It all compiles and runs fine (The cube is rendered when the program is run) at every stage up until adding the event for progress (OnProgress). Basically, I add that event through the Object Inspector, using the code given in the tutorial:
GLCube1.TurnAngle := GLCube1.TurnAngle + deltaTime * 100;
Then try the final compile/run. However, I get the error
Identifier not found "GLCube1"
I have checked about a dozen times that this is the exact same name used for the cube in the "Name" property. It is definitely the same... ideas? :?
Source below:
unit Cubespin;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, GLScene,
GLWin32Viewer, GLCadencer, EditBtn, GLThorFX;
type
{ TForm1 }
TForm1 = class(TForm)
GLCadencer1: TGLCadencer;
GLCamera1: TGLCamera;
GLLightSource1: TGLLightSource;
GLScene1: TGLScene;
GLSceneViewer1: TGLSceneViewer;
procedure GLCadencer1Progress(Sender: TObject; const deltaTime,
newTime: Double);
procedure GLCube1Progress(Sender: TObject; const deltaTime, newTime: Double
);
procedure GLThorFXManager1CalcPoint(Sender: TObject; PointNo: integer;
var x: single; var y: single; var z: single);
private
{ private declarations }
public
{ public declarations }
end;
var
Form1: TForm1;
implementation
{ TForm1 }
procedure TForm1.GLCadencer1Progress(Sender: TObject; const deltaTime,
newTime: Double);
begin
end;
procedure TForm1.GLCube1Progress(Sender: TObject; const deltaTime,
newTime: Double);
begin
GLCube1.TurnAngle := GLCube1.TurnAngle + deltaTime * 100;
end;
procedure TForm1.GLThorFXManager1CalcPoint(Sender: TObject; PointNo: integer;
var x: single; var y: single; var z: single);
begin
end;
initialization
{$I cubespin.lrs}
end.
Oh, I already tried putting "GLCube1: TGLCube;" into the "Type" section (which to be honest was just a stab in the dark). It just tells me "Identifier not found "TGLCube"... which is even more strange, as it doesn't seem to have any problem with "GLCube1" at that point... :x [/url]