Menu

GLShadowVolume : silhouette indices limitation

Help
2016-08-25
2016-09-06
  • Sylvain Pepoli

    Sylvain Pepoli - 2016-08-25

    Hello there,

    I've been developing a 3D scene modelization tool with GLScene for a little while and I noticed that the hardware limitation was not taken into account when displaying a silhouette in GLShadowVolume.
    This leads to OpenGL crashes when a complex object silhouette has more indices than the hardware allows.

    In TGLShadowVolume.DoRender , calls are made to GL.DrawElements for both sil.Indices and sil.CapIndices without checking if sil.Indices.Count is less or equal to GL_MAX_ELEMENTS_INDICES .

    I think it would be better to check it and split it into multiple calls to GL.DrawElements. Do you agree ?

    I will try to fix it now because I need it to work quickly. If you agree and want to implement the fix, just tell me.

     
  • Sylvain Pepoli

    Sylvain Pepoli - 2016-08-25

    I may be wrong about DrawElements limitation, as GL_MAX_ELEMENTS_INDICES seems to be a performance advice only for DrawRangedElements.
    But I'm still getting an unknown error at some point thrown by DrawElements for a big object.

     
  • Jerome.D (BeanzMaster)

    Hi have you try many big objects, not just one ? it is loaded un a TGLFreeForm ? can you post th error message ?

    if you agree and want to implement the fix, just tell me.

    Yes do the job and post the result, any improvments are welcome ! :)

     
  • Sylvain Pepoli

    Sylvain Pepoli - 2016-09-06

    Hi,
    I managed to fix it, but this was not related to GLScene (good news ;)).
    There was a memory corruption in another part of the software and I was using a wrong method when generating my objects silhouettes.

     

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.