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. Most efficient manner to present graphics generated pixel-by-pixel performance wise?

Most efficient manner to present graphics generated pixel-by-pixel performance wise?

Scheduled Pinned Locked Moved Unsolved General and Desktop
desktopgridemulator
4 Posts 2 Posters 553 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.
  • N Offline
    N Offline
    narkro555
    wrote on 10 Jun 2022, 19:21 last edited by
    #1

    Hello,
    I am designing an editor for an older video game as a side project. Part of it involves pulling graphics data from the game files, of which it is stored as interchangeable colors and pixels. I will need to generate this at runtime. Then, I will need to draw those 8x8 tiles to a scrollable grid.
    I initially figured I'd see where it goes by experimenting, however, I soon realized that performance is definitely going to be an issue. The main grid is at least 255x255 tiles, which means the possibility of having 65k+ tiles being rendered. I have a couple of theories:

    1. Render the 8x8 pixel arrays to a traditional image format like PNG or JPG, then place them in a 255x255 grid as backgrounds or images. Downside: massive number of image files in memory. Caching these beforehand would be even bigger since it would require saving a file for every color and pixel combination.
    2. Make sub-grids inside the tiles that are 8x8 grids, each with a certain color, inside a 255x255 grid. Downside: Massive number of grid tiles in memory
    3. Make the grid (255x8)x(255x8), being 1 tile per pixel, each with a colored background. Downside: Massive number of grid tiles in memory
    4. Create a custom renderer. Downside: Will need to recreate all the functionality present from QT5

    Which of these is the most pro-performance? Is there another option I'm not thinking of? This is for desktop, using C++.

    Thank you

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 10 Jun 2022, 19:25 last edited by
      #2

      Hi,

      Did you consider OpenGL ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      N 1 Reply Last reply 10 Jun 2022, 19:33
      0
      • S SGaist
        10 Jun 2022, 19:25

        Hi,

        Did you consider OpenGL ?

        N Offline
        N Offline
        narkro555
        wrote on 10 Jun 2022, 19:33 last edited by
        #3

        @SGaist That was my back-up plan. I would miss a lot of the functionality that QT provides out the gate, but if this framework is not right for this task, that's what I'll do.

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 10 Jun 2022, 20:16 last edited by
          #4

          Qt integrates very well with OpenGL so I am unsure what you think you would be missing ?

          That said, another possible way to do what you want could be the Graphics View Framework.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0

          4/4

          10 Jun 2022, 20:16

          • Login

          • Login or register to search.
          4 out of 4
          • First post
            4/4
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved