Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QOpenGLWidget auto-resize of viewpoint

QOpenGLWidget auto-resize of viewpoint

Scheduled Pinned Locked Moved Unsolved General and Desktop
1 Posts 1 Posters 385 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.
  • A Offline
    A Offline
    amess
    wrote on last edited by
    #1

    I'm trying to develop an application that shows two QOpenGLWidgets side-by-side with a divider between them so that as the user slides the divider they can compare the two images contained in the Widget. An example of this is here:

    https://mangomap.com/mango-chris/maps/20604/Deforestation-in-Cambodia-Between-1976---2013#

    I want to do this in OpenGL because what I'm comparing is not really a static image, but a rendering of an image using fragment shaders to quickly recalculate lighting effect changes.

    Anyway, my obvious problem is that as a QOpenGLWidget is resized the object contained in it resizes as well. I tried to code my way out by changing the viewpoint as the window was resized to keep the image stationary on the screen. This kind of worked but I think because of rounding errors etc. the pixels "jitter" as the window resizes.

    Is there any way to keep pixels locked on the screen despite the size and position of the QOpenGLWidgets container? Is there fundamentally a better way to achieve what I want?

    Thanks for reading!

    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