HISE Logo Forum
    • Categories
    • Register
    • Login

    Interface Rendering Optimization?

    Scheduled Pinned Locked Moved General Questions
    3 Posts 2 Posters 92 Views
    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.
    • A
      aaronventure
      last edited by

      I'm playing around with geometry and have noticed simple drawLine calls butchering my UI thread.

      d1d4ae88-d2a8-45c3-acb5-9ed5108a5943-image.png

      1ms for this drawLine call. It draws a line across the entire interface, so over 800px. It uses a gradient, so there's that; if I switch to solid colors using setColour, the performance improves dramatically.

      I'm using gradients in other places, and they seem to be the culprit that butchers the performance. Can anything be done about this or should this just go straight into OpenGL?

      Also, what's up with the redraw of the entire panel whenever I move a knob that's above it?

      If the knob is moving, the entire paint routine of the panel is getting redrawn periodically. It's not the paint routine being executed, because things would be changing (I have some randomization in place), just a redraw. How is this efficient? Isn't it more efficient to store a screenshot and then paint that instead of redoing all the calculations?

      Is it simply a draw call issue because I have 150 rectangles, and it's the drawing that takes time, not the calculations? Still, wouldn't it be easier to show a screenshot if the paint routine calculations haven't changed?

      dd3694ac-b074-42b4-9ff7-e6025254be8d-image.png

      clevername27C 1 Reply Last reply Reply Quote 3
      • clevername27C
        clevername27 @aaronventure
        last edited by

        @aaronventure Partial question—are you using alpha channels (and if so, have you tried with and without the Opaque flag set for every panel)?

        A 1 Reply Last reply Reply Quote 0
        • A
          aaronventure @clevername27
          last edited by

          @clevername27 i tried it with the stock sliders without any LAF. they don't have the opaque flag. If there was an entire opaque panel covering it, I'm pretty sure it wouldn't be redrawing.

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

          55

          Online

          1.7k

          Users

          11.7k

          Topics

          101.8k

          Posts