Menu

Multi View / Composite Viewer of GLSCENE

Help
SBlade
2019-02-16
2019-02-17
  • SBlade

    SBlade - 2019-02-16

    I would like to know if there was any advances regarding the multi view of GLScene, lately there was a lag if you place 2 or more GlScene views on the Form.

    So is there any work around for that ? Or for those who are familiar with the source code of GLScene, can they point me out which part of source code is causing that dscrepancy, I'm wiling to remedy that part if my skill is adaquate.

     

    Last edit: SBlade 2019-02-16
  • Jerome.D (BeanzMaster)

    Hi SBlade for multiview check demo in branch examples/editors/Viewer4Win
    Or make me a simple sample for i can reproduce and see what's wrong.
    From what version this bug was appeared ? It's in Delphi or Lazarus ?

    Cheers

     

    Last edit: Jerome.D (BeanzMaster) 2019-02-16
    • SBlade

      SBlade - 2019-02-16

      Hi Jerome,
      thanks for helping, for the backward compatiblity I have to stick to the old version of Lazarus0.9.30 and GLScene 1.1. In the example that you mentioned I see that you have introduced the asynTimer when creating the 4 viewports. Is this the only difference when it comes to have more than one viewports having no lagging during camer interaction ?

      Of course I'm planing to port to the new Lazarus code and dependency, but for the time being it would a better to stick to the stable release of my project. So As a work around how can I change relevant portion of code in GLScene 1.1 for temporary solution.

       
  • Jerome.D (BeanzMaster)

    Hum difficult to answer because i don't working on this version for Lazarus 0.9.3.
    Perhaps a bit of code can help me to answer.
    How you manage the multiview ? Do you use GLCadencer ? if is the case check in source GLCadencer.pas in TGLCadencer.Progress comment "Application.processMessage" except in the block "if mode= cmAsap"
    You can also try to make a diff between your GLScene version and the current One. First search in TGLSceneViewer's code and TGLScene's code. If you don't have GLAsyncTimer unit i think you should be import it and register easly in Lazarus 0.9.3.

    Lazarus are now on version 2.0 many improvments and bugs corrections have made.
    I suggest you to update your development environment asap.

     
    • SBlade

      SBlade - 2019-02-17

      Hi Jerome,
      In order to reproduce:
      I simply drop the 2 GlSceneViewers and 1 GlScene component on the form , in GLScene component I create 2 cameras where 1st is perspective and the 2nd is Orthographic. Nowhere in the project, I never used the Cadencer in my scene, I don't even need a timer. If I move around the target then movement stucks from time to time and is lagging.

      Since you have 4Win example ( I assume it is smothly movesaround target) it seems that you have eliminated that problem in the next versions of GLScene, First of all, I really would like to know does all of this really is related to the Cadencer or Timer ?Since I don't have any cadencer or timer in scene, my previous statement that it is related to AsynTimer can be misleading, but I couldn't think what else could it be. Your guidance will be appreciated.

       

      Last edit: SBlade 2019-02-17
  • Jerome.D (BeanzMaster)

    Hi SBlade

    So you only "MouseAround" on the perspective Camera and with in Mouse's event of the Viewer if i understand well.

    This Lag appeared when you have only one or many objects in your scene ?

    This Lag appeared with only one viewer or not ?

    In your version of GLScene the problem can be provide from the second Camera with "CameraStyle = csOrthogonal" try with "CameraStyle =csPerspective" and adjust his position for be aligned with the view plane you want (Front, Top, Left.)

    Others solution the Lag provide from how your Mouse event is coded. Can you put the code of the mousemove event you use ?

    If you have many objects, this lag can be appeared due to the limitation of your PC.

     
  • SBlade

    SBlade - 2019-02-17

    Dear Jerome, PLease find the test case project at the attachment it is minimalistic, use right mouse button to rotate on the left screen you will experience the lagging. On right side there is a ortho camera, if delete that orthographic camera then everything is fine and function properly.

     
  • Jerome.D (BeanzMaster)

    I have tested your binary, on my pc i don't see any lag.

    So perhaps is due to a limitation of your hardware or can provide from an outdated graphic card driver.

    Your GPU it is and Intel ? if yes this is surely the cause

    Anyway you can try o make diff of the TGLBaseSceneObject.Render????? functions in GLScene.pas. The other thing has changed from your version, if i'm right it's how matrix are managed.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.