SAMSON Forum
    • Login
    • Search
    • Recent
    • Tags
    • Popular
    • SAMSON Connect
    • Get SAMSON

    Solved Transparency or Depth related issue in Editors

    Editors
    2
    3
    2573
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H
      Haichao last edited by

      Hi,
      I am working on an Editor for creating DNA strands. I call the display function and render spheres and cylinders when the Editor is in use. However, the Editor’s display function renders the structure different from the function in the Visual Model, as you can see in the attached images. There seem to be some issues with transparency of certain parts or maybe the depth is incorrect? Btw, I do not create these structures in the Data Graph. What would I need to change in the Editor in order to get rid of these artifacts?

      Thanks,
      Haichao

      1_1519145505534_2.jpg 0_1519145505533_1.jpg
      1_1519145514259_3.png 0_1519145514258_4.png

      1 Reply Last reply Reply Quote 0
      • Stephane
        Stephane last edited by

        Hi @Haichao,

        can you please try to add glEnable(GL_DEPTH_TEST) at the beginning of the display function in the editor, and glDisable(GL_DEPTH_TEST) at the end, to see if it changes something?

        1 Reply Last reply Reply Quote 0
        • Stephane
          Stephane last edited by

          Hi @Haichao,

          can you please try to add glEnable(GL_DEPTH_TEST) at the beginning of the display function in the editor, and glDisable(GL_DEPTH_TEST) at the end, to see if it changes something?

          1 Reply Last reply Reply Quote 0
          • H
            Haichao last edited by

            Hi @Stephane-Redon,

            ah yes, it was the depth test. This solves it!

            Thanks,
            Haichao

            1 Reply Last reply Reply Quote 0
            • First post
              Last post