Recent

Author Topic: Strange issue with GLScene  (Read 6107 times)

stab

  • Full Member
  • ***
  • Posts: 234
Strange issue with GLScene
« on: December 10, 2021, 06:28:29 pm »
On a laptop I've made an app where I can display a 3D-model, rotate
it and zoom in and out using a GLSceneViewer and GLScene with
a GLDummyCube, a GLHeightField, GLCamera and a GLLigthSource.
When I installed the code on a personal computer with more power
and ram, 3D-models doesn't show up as before even though I haven't
changed the code.
Rotations is preformed buy left mouse button down and move on the
laptop.
When I load a 3D-model on the personal computer it doesn't show up
at all, but when trying to rotate it, I can see it flashing in the
GLSceneViewer. When I move the program window a little outside the
screen and back again, the model is seen, but immediately as the mouse
is moved whithin the program window it disappears again.

I guess there is something real simple I've done wrong, but can't
figure it out :o.

Any hint appreciated

My system:
Windows 10 64-bit
Ram: 24 GB

Lazarus 2.0.12
FPC Version: 3.2.0
SVN Revision: 64642

Regards
stab

Ñuño_Martínez

  • Hero Member
  • *****
  • Posts: 1175
    • Burdjia
Re: Strange issue with GLScene
« Reply #1 on: December 11, 2021, 08:30:02 pm »
Hard to know without code.  Since it is a simple project maybe you can attach it.
Are you interested in game programming? Join the Pascal Game Development community!
Also visit the Game Development Portal

stab

  • Full Member
  • ***
  • Posts: 234
Re: Strange issue with GLScene
« Reply #2 on: December 13, 2021, 11:13:39 am »
I order to further check the issue I tried example Fuente, both at my laptop and the personal computer and experience the same behavior.
On the laptop Fuente runs fine displaying kind of a fountain of particles. On the personal computer it is just flashing like in my own program

Could it possible be caused by some parameter setting in the cadencer running in 4.00 GHz in contrast to the laptop running only 2.20 GHz? :o

Handoko

  • Hero Member
  • *****
  • Posts: 4695
  • My goal: build my own game engine using Lazarus
Re: Strange issue with GLScene
« Reply #3 on: December 13, 2021, 11:18:54 am »
Could it be hardware/driver issue? Maybe you can try to run Castle Game Engine demos or play real 3D games on the machine.

https://wiki.lazarus.freepascal.org/Castle_Game_Engine

stab

  • Full Member
  • ***
  • Posts: 234
Re: Strange issue with GLScene
« Reply #4 on: December 13, 2021, 11:50:44 am »
I even copied the program that was compiled and worked on the laptop to the other computer and it ran OK there. That would exclude hardware/driver issue or?

dseligo

  • Hero Member
  • *****
  • Posts: 651
Re: Strange issue with GLScene
« Reply #5 on: December 13, 2021, 12:01:31 pm »
So, if you copy compiled program from laptop then it works fine?
And if you compile program on desktop computer then it doesn't work?

Try to run program compiled on desktop computer directly (outside of Lazarus) - to exclude debugger.
Try to copy program from desktop computer to laptop and see if it works.
Do you have exactly same version of Lazarus, FPC, packages, ... installed in both computers?

stab

  • Full Member
  • ***
  • Posts: 234
Re: Strange issue with GLScene
« Reply #6 on: December 13, 2021, 12:22:50 pm »
Running desktop compiled program directly from disk have same error.
Running desktop compiled program on laptop, same error.

Lazarus on laptop:
Version: 2.0.10
FPC Version: 3.2.0
SVN Revision: 63526

Lazarus on desktop:
Version: 2.0.12
FPC Version: 3.2.0
SVN Revision: 64642

dseligo

  • Hero Member
  • *****
  • Posts: 651
Re: Strange issue with GLScene
« Reply #7 on: December 13, 2021, 01:18:00 pm »
Well, it looks like some environment issue on desktop computer.
Do you have exactly the same library on desktop computer as in the laptop?
Did you copy project from laptop to desktop computer or did you make new project on desktop computer?
You could try to install same Lazarus version on desktop computer as you have in laptop.

Also, as someone mentioned, you should make minimal demo project that shows issue.

stab

  • Full Member
  • ***
  • Posts: 234
Re: Strange issue with GLScene
« Reply #8 on: December 13, 2021, 02:40:29 pm »
As I wrote in my first reply I tried one of the GLScene examples on desktop as well as on laptop and the the issue remained.

Also tried installing version 2.0.10 on desktop and still same error %)

dseligo

  • Hero Member
  • *****
  • Posts: 651
Re: Strange issue with GLScene
« Reply #9 on: December 13, 2021, 04:06:45 pm »
Do you compile on both computers to 32-bit or 64-bit?
Do you have exactly the same library on desktop computer as in the laptop?

stab

  • Full Member
  • ***
  • Posts: 234
Re: Strange issue with GLScene
« Reply #10 on: December 13, 2021, 07:57:19 pm »
Only compiling t0 64-bit.
Going to test a very simple app with GLScene

stab

  • Full Member
  • ***
  • Posts: 234
Re: Strange issue with GLScene
« Reply #11 on: December 13, 2021, 09:04:06 pm »
I made a spinning cube according to the example in GLSceneGuide_v1.9.pdf,
compiled it on laptop(lazarus 2.0.10 FPC 3.2.0) - working fine,
zipped the code together with the compiled exe,
copied it the the desktop,
ran the exe on desktop - working fine,
compiled the code once again in lazarus on desktop(lazarus 2.0.12 FPC 3.2.0),
ran it - flashing window where I could see the cube rotating.

Something is different, but what? %)

stab

  • Full Member
  • ***
  • Posts: 234
Re: Strange issue with GLScene
« Reply #12 on: December 14, 2021, 11:01:08 am »
One thing that might has an impact is that I think the desktop has been a gaming computer.

If anyone has a clue on how to fix that it would be appreciated %)

 

TinyPortal © 2005-2018