The new navigation cube is very useful but it seems to be some problems with it in the Samples\Delphi\AdvDemos\GLSViewer project:
If the navcube is enabled before some file is opened, all the buttons on the toolbar become unresponsive.
If the navcube is enabled, disabled and enabled again (pressing the toolbar icon), you get an invalid pointer operation. It looks like the navcube gets freed on disable and not created again on enable.
If you open a file, enable the navcube and then opens a second file, the navcube become unresponsive.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Ørjan Nilsen, in unavCube.pas try to replace procedure TGLNCube.DoProgress(const pt: TProgressTimes); by the following code. (Just some minor change)
You have a different class name than I have. In my copy of the code it’s TGLNavCube not TGLNCube.
Anyway replacing the DoProgress procedure did not fix any of the tree issues I described. I think at least part of the issue must be addressed in GLSViewer\Source\fMain.pas
Ørjan
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi, i tried under Lazarus and i've the same behaviour so. after some litte research, the cause is du to the mouse.CursorPos := point(sW2, sH2); this line set mouse cursor position and making lost Focus on other controls
So this is the correction :
PS : I let and commented the "old" code :
I was not aware that the Examples branch existed. Although Scene Master use a different version of unavcube.pas, it looks like it have the same problems with the navcube.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The lastet code you posted fixes the first problem in my original post. Your code does not fix the two other problems. I think the second problem with invalid pointer operation must be fixed in fMain.pas
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Nilsen,
Yes, the problem is in mainForm of GLSceneViewer (or SceneMaster) and I've not found a decision yet, but the menu could be accessed by clicking right mouse button and after a file is opened then again click on NavCube menu button. And the cube is working then.
Pavel
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The new navigation cube is very useful but it seems to be some problems with it in the Samples\Delphi\AdvDemos\GLSViewer project:
Hi Ørjan Nilsen, in unavCube.pas try to replace procedure TGLNCube.DoProgress(const pt: TProgressTimes); by the following code. (Just some minor change)
Hi Jerome
You have a different class name than I have. In my copy of the code it’s TGLNavCube not TGLNCube.
Anyway replacing the DoProgress procedure did not fix any of the tree issues I described. I think at least part of the issue must be addressed in GLSViewer\Source\fMain.pas
Ørjan
Hi, i tried under Lazarus and i've the same behaviour so. after some litte research, the cause is du to the
mouse.CursorPos := point(sW2, sH2);
this line set mouse cursor position and making lost Focus on other controlsSo this is the correction :
PS : I let and commented the "old" code :
Cheers
Last edit: Jerome.D (BeanzMaster) 2017-03-21
Hi Jerome
I just tried your code. With this version of TGLNavCube.DoProgress, the NavCube does not appear at all when I click the NavCube icon in GLSViewer.
Uh ! ??? Have you the sample code you use, something else must not be correct. You are under Delphi or Lazarus ?
I Use Delphi 10.1. The sample code I use is this project svn://svn.code.sf.net/p/glscene/code/trunk/Samples/Delphi/AdvDemos/GLSViewer
To activate the NavCube I click on the fourth icon (yellow with three axes) from right on the toolbar.
Ok, have you tried the "Scene Master" project in examples/editor branch ? (its an update of GLSViewer demo)
I was not aware that the Examples branch existed. Although Scene Master use a different version of unavcube.pas, it looks like it have the same problems with the navcube.
Humm ! Pavel can you check under Delphi because under Lazarus it work very well.
Ørjan have you try make the changes with the latest code i posted here ?
The lastet code you posted fixes the first problem in my original post. Your code does not fix the two other problems. I think the second problem with invalid pointer operation must be fixed in fMain.pas
Nilsen,
Yes, the problem is in mainForm of GLSceneViewer (or SceneMaster) and I've not found a decision yet, but the menu could be accessed by clicking right mouse button and after a file is opened then again click on NavCube menu button. And the cube is working then.
Pavel