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. OpenGL for simple graphical view?
Qt 6.11 is out! See what's new in the release blog

OpenGL for simple graphical view?

Scheduled Pinned Locked Moved General and Desktop
4 Posts 3 Posters 1.3k 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.
  • D Offline
    D Offline
    Daepilin
    wrote on last edited by
    #1

    Hi :)

    I'd like to write a little tetris fot training and i'm wondering wether i should use OpenGL for the graphical output or a standard QPainter.

    Is the Qt Support for OpenGL more than just hardwareacceleration for graphics?

    1 Reply Last reply
    0
    • R Offline
      R Offline
      Rondog
      wrote on last edited by
      #2

      I would use the QPainter approach unless you need something in 3D (hmmm 3D tetris?). I don't think that performance will be an issue using QPainter.

      1 Reply Last reply
      0
      • U Offline
        U Offline
        utcenter
        wrote on last edited by
        #3

        You can use QPainter on a QGLWidget, it can still offer a considerable boost.

        Alternatively, you can implement your own QQuickItem with custom geometry nodes and easily implement both 2d and 3d tetris elements by using standard openGL approaches towards constructing geometry.

        1 Reply Last reply
        0
        • D Offline
          D Offline
          Daepilin
          wrote on last edited by
          #4

          Thanks to both of you:) i guess i will look into it, for now it should become 2d, but who knows how it may evolve^^ (im actually happy if get the 2d collision detection right ;))

          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