Menu

Performance issue with GLScene

Help
SBlade
2015-10-28
2015-10-29
  • SBlade

    SBlade - 2015-10-28

    dear all,

    I experience a performance issue with following code snippet FPS is around 4-5 (code is pretty straight forward), I tried to keep the code as simple as possible so I can testify only the performance, I played around with ObjectSorting and VsibilityCulling options in GLScene component but that still doesn't bring any improvement on performance .

    There is one hurdle that I need to stick to, It is compulsory to have TGLLines object and TGLfreeForm as chiild object under the TGLLines parentship, because my data structures requires that. Loading all suzanne models into same freeform can improve performance but that sceheme will not be useful to me.

    procedure TForm1.FormCreate(Sender: TObject);
    var
       FF:TGLFreeForm;
       i:Integer;
       Line :TGLLines;
    begin
      for i := 0 to 1000 do
      begin
        Line := TGLLines.Create(GLScene1);
        line.Nodes.AddNode(0,0,0);
        line.Nodes.AddNode(0,0,3);
        FF := TGLFreeForm.Create(GLScene1);
        FF.LoadFromFile('C:\Suzanne.obj');
        Line.AddChild(FF);
    
        GLScene1.Objects.AddChild(line);
      end;
    end;
    

    http://we.tl/42dXMF2C9h -- FreeForm wavefront object file Suzanne download link

     
  • Pavel Vassiliev

    Pavel Vassiliev - 2015-10-28

    SBlade,
    It's better to add your obj file here as an attachment.
    PW

     
  • SBlade

    SBlade - 2015-10-29

    You can find it at the bottom of the orignal post there is a link, I post here again http://we.tl/42dXMF2C9h .

    If I'm not wrong, in the past, there was a demo created with 10 million cube which and was working like a charm, do I have to use FBO or VBO to increase the performance of the scene?
    Regards,

     

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.