Recent

Author Topic: [GLScene] Crash when setting camera UP direction  (Read 4344 times)

mrBrown

  • New Member
  • *
  • Posts: 15
[GLScene] Crash when setting camera UP direction
« on: July 08, 2009, 09:49:50 am »
I'm creating a 3D viewer in Lazarus using GL-scene.

If I want to view my object from the Y-axis with the Z-axis pointing upwards I use the following code (simplefied)

Code: [Select]
  GLCamera1.BeginUpdate;

  GLCamera1.Position.Y := GLCamera1.TargetObject.Position.Y - 10;
  GLCamera1.Position.X := GLCamera1.TargetObject.Position.X; //solves the problem + 0.001;
  GLCamera1.Position.Z := GLCamera1.TargetObject.Position.Z;

  GLCamera1.Up.Z := 1;
  GLCamera1.Up.X := 0;
  GLCamera1.Up.Y := 0;

  GLCamera1.EndUpdate;


This however results in a "Projet raised exception class 'External: ?'. error on some computers.

My scene contains a camera (GLCamera1, a glcube used as target object and a EarthSkyDome). If I make the EarthSkyDome invisible then everything works ok.

Is this an error (in which case I'll submit it as a bug)? Or am I just doing something stupid?
I have the source code attached. Running lazarus 0.9.26.2 with GLScene 1.0.0.2.

mrBrown

  • New Member
  • *
  • Posts: 15
Re: [GLScene] Crash when setting camera UP direction
« Reply #1 on: July 24, 2009, 02:09:10 pm »
[update]
I've tested this on multiple systems now. Problem only seems to occur on machines with intel (ob) graphics so far.

On machines with:
- NVidia quadro fx 3500 or
- ATI mobility 600
the code below works fine...

 

TinyPortal © 2005-2018