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. How to set GL_LINEAR as default on QOpenGLFramebufferObject ?

How to set GL_LINEAR as default on QOpenGLFramebufferObject ?

Scheduled Pinned Locked Moved Solved Mobile and Embedded
openglhw accelerationandroiddecoderscale
2 Posts 1 Posters 901 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.
  • D Offline
    D Offline
    delamor
    wrote on 27 Apr 2018, 08:16 last edited by
    #1

    I'm having scaling issues while rendering from a hw surface and I've discovered that's because QOpenGLFramebufferObject has set

    GL_TEXTURE_MIN_FILTER -> GL_NEAREST
    GL_TEXTURE_MAG_FILTER -> GL_NEAREST
    

    By default (https://code.woboq.org/qt5/qtbase/src/gui/opengl/qopenglframebufferobject.cpp.html#516)

    How can I change this to be GL_LINEAR ? There's not public api for that but I'm pretty sure that should be a way to do this, as it's something more than one will need to change..

    1 Reply Last reply
    0
    • D Offline
      D Offline
      delamor
      wrote on 27 Apr 2018, 10:48 last edited by
      #2

      If found the way by myself, if this can help to someone, is a question of attaching the texture again and change it before the fbo generation.

      Like:
      ```
      glBindTexture(GL_TEXTURE_2D, d->fbo->texture());
      glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); // Linear Filtering
      glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); // Linear Filtering

      1 Reply Last reply
      0

      1/2

      27 Apr 2018, 08:16

      • 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