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 and fixed pipeline OpenGL
Forum Updated to NodeBB v4.3 + New Features

QQuickFramebufferObject and fixed pipeline OpenGL

Scheduled Pinned Locked Moved Solved QML and Qt Quick
2 Posts 1 Posters 703 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.
  • M Offline
    M Offline
    Michel Joron
    wrote on 31 Jul 2017, 17:49 last edited by Michel Joron
    #1

    I have managed to integrate our product with QT using QQuickWidget in a Renderer based QObject and QOpenGLFunctions_1_3. It works well, I get everything correctly drawn however I set the drawing is at the highest level because I used QQuickWindow::afterRendering in order to have multiple of those objects.

    I let QT to erases background, draws QT component(s) and finally my own components.

    Everything works well however the order of drawing is not respected by design and it is necessary to use QQuickFramebufferObject/QQuickFramebufferObject::Renderer now.

    I read in the docs, using FBO apparently will respect the order of drawing. It seems so when I try one example or two but:

    1- I want to have multiple FBOs in the same window, is there a limit to the number of FBOs ?

    2- Is it possible to use OpenGL 1.3 in QQuickFramebufferObject::Renderer::render ?
    I think it is possible if the renderer is based of QQuickFramebufferObject::Renderer and QOpenGLFunctions_1_3.

    -  However what is the call to restore the OpenGL or at least to reset the OpenGL states, it is not crystal clear to me. 
        I tried several things nothing works well enough.
    
    M 1 Reply Last reply 4 Aug 2017, 13:13
    0
    • M Michel Joron
      31 Jul 2017, 17:49

      I have managed to integrate our product with QT using QQuickWidget in a Renderer based QObject and QOpenGLFunctions_1_3. It works well, I get everything correctly drawn however I set the drawing is at the highest level because I used QQuickWindow::afterRendering in order to have multiple of those objects.

      I let QT to erases background, draws QT component(s) and finally my own components.

      Everything works well however the order of drawing is not respected by design and it is necessary to use QQuickFramebufferObject/QQuickFramebufferObject::Renderer now.

      I read in the docs, using FBO apparently will respect the order of drawing. It seems so when I try one example or two but:

      1- I want to have multiple FBOs in the same window, is there a limit to the number of FBOs ?

      2- Is it possible to use OpenGL 1.3 in QQuickFramebufferObject::Renderer::render ?
      I think it is possible if the renderer is based of QQuickFramebufferObject::Renderer and QOpenGLFunctions_1_3.

      -  However what is the call to restore the OpenGL or at least to reset the OpenGL states, it is not crystal clear to me. 
          I tried several things nothing works well enough.
      
      M Offline
      M Offline
      Michel Joron
      wrote on 4 Aug 2017, 13:13 last edited by
      #2

      @Michel-Joron

      I figure out a way to restore the OpenGL state so the fixed pipeline could be used in render() method:
      just call QOpenGLContext::currentContext()->functions()->glUseProgram(0)

      in the beginning of QQuickFramebufferObject/QQuickFramebufferObject::Renderer::render() prior to execute my own fixed pipeline calls.

      Apparently QT has enabled a shader which has bad effects later on my own fixed pipeline OpenGL calls.

      Note: I noticed the first iteration render() was working correctly but the subsequent iterations the result was messed up.

      1 Reply Last reply
      0

      1/2

      31 Jul 2017, 17:49

      • 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