Lazarus
Programming => Graphics and Multimedia => OpenGL => Topic started 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
-
Hard to know without code. Since it is a simple project maybe you can attach it.
-
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
-
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
-
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?
-
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?
-
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
-
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.
-
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 %)
-
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?
-
Only compiling t0 64-bit.
Going to test a very simple app with GLScene
-
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? %)
-
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 %)
-
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.
-
Hi stab.
I've tried it.
I think the problem is with the Viewer.
Try placing a new GLSceneViewer1.
Cheers
Tbk
-
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.