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. Qt 5.3 vs. 4.8 GL rendering size problem
Forum Updated to NodeBB v4.3 + New Features

Qt 5.3 vs. 4.8 GL rendering size problem

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 1.0k 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.
  • L Offline
    L Offline
    larryy
    wrote on last edited by
    #1

    I render a 3D scene in the main window of my app. In Qt 4.8 it works as intended. With everything else the same, in Qt 5.3 the rendered contents of the window are much smaller than the window and pinned to the bottom-left. The area occupied by the rendering is less than 1/4 of the width and height of the window they are drawn in. But only in Qt 5.3, not 4.8. I'm poking around trying to figure out what I might be setting wrong, but, of course, since it works in 4.8, I'm not finding anything. Has anyone else heard of or hit this themselves? Any suggestions for finding and fixing the root cause?

    1 Reply Last reply
    0
    • K Offline
      K Offline
      KashiKyrios
      wrote on last edited by
      #2

      Hmm, I haven't seen this (I started using Qt around 5.1, I believe), so here are a few questions:

      • Are you drawing in a QWindow, QGLWidget, or something else?
      • Are you using raw OpenGL or Qt's convenience classes?
      • Do you call glViewport when rendering?

      Off the top of my mind, those would be the most likely leads to narrow down the issue, but I'm no pro at this...

      1 Reply Last reply
      0
      • L Offline
        L Offline
        larryy
        wrote on last edited by
        #3

        Since you didn't start until 5.x, you wouldn't have seen this, I think. I know I tried 5.2 at one point, and it had this problem. It persists into 5.3. Qt 4.8 continues to work fine.

        bq. Are you drawing in a QWindow, QGLWidget, or something else?

        QGLWidget.

        bq. Are you using raw OpenGL or Qt’s convenience classes?

        Almost all OpenGL, but I did note a few uses of qglColor() and qglClearColor() intermixed with the standard gl*() calls.

        bq. Do you call glViewport when rendering?

        Yes. And I checked the width and height parameters being used, at least at one level. Of course, it's unlikely my local parameters are being set wrong, else the problem would manifest in Qt 4.8. I wonder if those calls to qgl*Color() are causing a problem in 5.3, because some internal state is never set up. I don't hold out high hopes, but it's easy to test.

        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