Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. QQuickFramebufferObject redraw
QtWS25 Last Chance

QQuickFramebufferObject redraw

Scheduled Pinned Locked Moved QML and Qt Quick
openglqopenglframebuf
2 Posts 1 Posters 1.3k Views
  • 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.
  • T Offline
    T Offline
    themts
    wrote on 10 Mar 2015, 12:47 last edited by themts 3 Oct 2015, 20:48
    #1

    Hey guys,

    I created a QQuickFramebufferObject to render custom opengl content.
    In QML I placed my component like this:
    Renderer {
    id: renderer
    x: 72
    y: 106
    width: 496
    height: 260
    }
    Renderer is a QQuickFramebufferObject::Renderer class.
    I placed a button on my form to rerender like this:
    button1.onClicked: renderer.update()

    At first start of my application my render-function gets called and it draws as expected.
    When I press the button, my render function get called again by the render-scheduler but this time I don't see anything.

    I reduced my render function to some very simple gl-calls to be sure there is nothing else:
    void NTestFboRenderer::render()
    {
    if (!first) {
    glColor4f(1, 0, 0, 1);
    glBegin(GL_LINES);
    glVertex2d(0, 0);
    glVertex2d(1, 1);
    glEnd();
    }
    first = false;
    }

    Do you have any idea whats wrong here?
    Do I have to mark my fbo as dirty or something?

    EDIT:
    glClear works all the time, but when I draw something like vertex I don't see it... (only on first render call)

    1 Reply Last reply
    0
    • T Offline
      T Offline
      themts
      wrote on 11 Mar 2015, 16:09 last edited by
      #2

      I solved this problem by creating a vertex- and fragment-shader because there was probably another shader active.

      Is there a way to mark this topic as solved?

      1 Reply Last reply
      0

      1/2

      10 Mar 2015, 12:47

      • Login

      • Login or register to search.
      1 out of 2
      • First post
        1/2
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved