Use of Multiple buffers

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • Use of Multiple buffers

    Hello,
    I have some doubts about multiple buffering.

    First of all, I am using the STM32F429IDISCO board and emwin v5.32.

    What I want is to have 3 frame buffers and I also want to use automatic mode of frame buffers using the window manager, so I have enabled it with WM_MULTIBUF_Enable(1);.
    Till here is all I understand about frame buffer, so my questions are:

    1.- Is everything I will draw going to be drawn using the multibuffer feature?
    2.- Can I select in which back buffer will it be drawn?
    3.- Will each drawing operation be drawn one by one or can I choose to draw several things to appear together at the same time?

    What I mean with the last question is that if I want to change the front buffer from one with just one button to another one with 5 buttons, will each button be drawn one by one or will they appear at the same time?

    Thanks! :D
  • Hi,
    1.- Is everything I will draw going to be drawn using the multibuffer feature?
    Just if you draw inside a WM_PAINT case. Anything drawn outside will be displayed directly, or not even displayed since it gets overdrawn by the window manager. Anyway, drawing outside WM_PAINT is not recomended when using the window manager.
    2.- Can I select in which back buffer will it be drawn?
    No unfortunately not. This is done automatically by the window manager.
    3.- Will each drawing operation be drawn one by one or can I choose to draw several things to appear together at the same time?
    They are getting displayed all at once. Before the window manager starts the drawing process it tells the multibuffer module to copy the front buffer into the backbuffer. After all drawing operations are finished the backbuffer become the front buffer and all drawings are getting displayed at once.
    What I mean with the last question is that if I want to change the front
    buffer from one with just one button to another one with 5 buttons,
    will each button be drawn one by one or will they appear at the same
    time?
    I guess what you mean are virtual screens. Multibuffering is to avoid tearing effects and to some point flickering. Unfortunately virtual screens and multibuffering is not compatible to each other.

    When using multibuffering you can create windows outside the visible area (or create them when required) and make them visible on button press.
    For example you have one button and on button press you create another window which holds five other buttons. Those buttons will appear all at once when their parent window gets visible. Take a look into the example attached.

    Regards,
    Sven
    Files
    • Sample.zip

      (1.1 kB, downloaded 438 times, last: )
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.