Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Alternative way to get QOpenGLFramebufferObject anti-aliased texture other than multisampling + blitting
Forum Updated to NodeBB v4.3 + New Features

Alternative way to get QOpenGLFramebufferObject anti-aliased texture other than multisampling + blitting

Scheduled Pinned Locked Moved Mobile and Embedded
1 Posts 1 Posters 971 Views 1 Watching
  • 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.
  • S Offline
    S Offline
    swMadjid
    wrote on last edited by
    #1

    I'm trying to achieve anti-aliased effect on the texture of the FBO (QOpenGLFramebufferObject) used when doing native GL drawing on a Qt 5.2.1 widget-based application on WinCE-based device. It supports OpenGL ES 2.0 and apparently also GL_EXT_multisampled_render_to_texture extension.

    The mechanism described on Qt documentation using two QOpenGLFramebufferObject, one with multi-sample enabled (e.g. 4 samples) and another one without multi-sampling used as the target FBO to down-sample, then blitting from the multi-sampled one to the down-sampled one does not work.

    This is because the blit operation is not supported on the device, QOpenGLFramebufferObject::hasOpenGLFramebufferBlit() returns false, even though it works properly anti-aliased on Win32 desktop where the blit is supported.

    Is there any other way to achieve the anti-aliasing without using this blit operation? Preferably using Qt components to ease the implementation.

    ----Details on the situation----
    The application displays the GL drawings as the screen background and on top of that the control widgets (buttons, labels, etc.). The GL drawings itself are done by a third party library that we use.

    For this we use QGraphicsView and QGraphicsScene to have the library draws the background and add the control widgets to the scene to be drawn on top of it.

    Aside from the QGLWidget's context created for the QGraphicsView's viewport, we have a separate GL context and FBOs created exclusively for the library to use because the library expects an exclusive context for itself. The contexts share display list and texture object and are switched before and after the library draws.

    The library draws depending on a QTimer callback to simulate the desired frames per second. During the drawing the multi-sampled FBO will be bound and released after the drawing is done, and then blitted to the down-sampled one.

    During the QGraphicsScene::drawBackground() the texture of the down-sampled FBO will be drawn on the viewport's context using QGLContext::drawTexture(). Sadly this draws garbage on the device because the blit operation from the multi to down-sampled FBO is not supported.

    1 Reply Last reply
    0

    • Login

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