Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Game Development
  4. Why Qt's creators uses two methods to provide OpenGL support( QGLWidget, QWindow)?
Forum Updated to NodeBB v4.3 + New Features

Why Qt's creators uses two methods to provide OpenGL support( QGLWidget, QWindow)?

Scheduled Pinned Locked Moved Game Development
7 Posts 5 Posters 3.7k 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.
  • J Offline
    J Offline
    jiangcaiyang
    wrote on last edited by
    #1

    One of those are provided early when Qt4.2(or earlier) released, which can integrate well with Qt' graphics - view framework;
    But the new comer( QWindow, QSurface, QOpenGL*) seems have little in common with our old friend QWidget, and seems impossible to integrate with Qt‘s graphics - view framework.
    Why is that, why let developers make a decision about which to choose from?

    1 Reply Last reply
    0
    • P Offline
      P Offline
      planloveyou
      wrote on last edited by
      #2

      why? I want to know too. thanks.

      1 Reply Last reply
      0
      • J Offline
        J Offline
        john_god
        wrote on last edited by
        #3

        Basically QGLWidget is the old way of doing it, it's stable and mature but it's deprecate, and we should not expect new functionally to be added to it.
        For new code it is advised to start with QWindow.
        This "video":http://www.youtube.com/watch?v=GYa5DLV6ADQ explains it better.

        1 Reply Last reply
        0
        • S Offline
          S Offline
          semos
          wrote on last edited by
          #4

          Yes, but QWindow is only window. QT was the best framework for game editors etc (like my 2D editor: http://www.youtube.com/watch?v=__EGoLDSBv8).

          Before a few days I started new project based on QT 5.1 It is another game editor for internal use. But QGLWidget is deprecated, pure OpenGL castrated, ...why??? Yes, I know, because of default Windows OpenGL drivers, but is not problem for my application....

          Please, Is there any correct solution, without deprecated functionality?

          1 Reply Last reply
          0
          • J Offline
            J Offline
            jiangcaiyang
            wrote on last edited by
            #5

            [quote author="semos" date="1380273239"]Yes, but QWindow is only window. QT was the best framework for game editors etc (like my 2D editor: http://www.youtube.com/watch?v=__EGoLDSBv8).

            Before a few days I started new project based on QT 5.1 It is another game editor for internal use. But QGLWidget is deprecated, pure OpenGL castrated, ...why??? Yes, I know, because of default Windows OpenGL drivers, but is not problem for my application....

            Well, although deprecated, I still use Qt4's API for my game demo. Because it's not until the fulfillment of Qt5 that I'll transport my code into pure Qt5.
            If possible, you can visit my blog at "Here":http://blog.csdn.net/gamesdev/article/details/12073065
            Please, Is there any correct solution, without deprecated functionality?[/quote]

            1 Reply Last reply
            0
            • S Offline
              S Offline
              Skyrpex
              wrote on last edited by
              #6

              What's wrong using QWindow? I've tried it and it works like a charm.

              1 Reply Last reply
              0
              • S Offline
                S Offline
                semos
                wrote on last edited by
                #7

                There is nothing wrong using QWindow. But when you need QGLWidget functionality, you must use "createWindowContainer":http://qt-project.org/doc/qt-5.1/qtwidgets/qwidget.html#createWindowContainer. I did not know this function, when I wrote the post.

                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