Lazarus

Programming => Graphics and Multimedia => OpenGL => Topic started by: stab on December 10, 2021, 06:28:29 pm

Title: Strange issue with GLScene
Post by: stab 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
Title: Re: Strange issue with GLScene
Post by: Ñuño_Martínez on December 11, 2021, 08:30:02 pm
Hard to know without code.  Since it is a simple project maybe you can attach it.
Title: Re: Strange issue with GLScene
Post by: stab 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
Title: Re: Strange issue with GLScene
Post by: Handoko 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
Title: Re: Strange issue with GLScene
Post by: stab 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?
Title: Re: Strange issue with GLScene
Post by: dseligo 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?
Title: Re: Strange issue with GLScene
Post by: stab 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
Title: Re: Strange issue with GLScene
Post by: dseligo 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.
Title: Re: Strange issue with GLScene
Post by: stab 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 %)
Title: Re: Strange issue with GLScene
Post by: dseligo 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?
Title: Re: Strange issue with GLScene
Post by: stab on December 13, 2021, 07:57:19 pm
Only compiling t0 64-bit.
Going to test a very simple app with GLScene
Title: Re: Strange issue with GLScene
Post by: stab 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? %)
Title: Re: Strange issue with GLScene
Post by: stab 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 %)
Title: Re: Strange issue with GLScene
Post by: funlw65 on December 18, 2022, 03:49:00 am
Corrupted code in a system library on the gaming computer. If reinstalling the OS does not solve the problem, it is a hardware problem: bad HDD sectors, RAM memory, graphical chip...  or the gaming computer is playing with you.
Title: Re: Strange issue with GLScene
Post by: tambok on February 05, 2023, 05:59:21 pm
Hi stab.

I've tried it.
I think the problem is with the Viewer.
Try placing a new GLSceneViewer1.

Cheers
Tbk
Title: Re: Strange issue with GLScene
Post by: Patro de Nordo on April 15, 2023, 06:39:49 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? %)
Have you solved this problem? I have encountered the same behavior.
TinyPortal © 2005-2018