Results 1 to 5 of 5

Thread: QPixmapItem OpenGL black item

  1. #1
    Join Date
    Dec 2008
    Location
    Poland
    Posts
    383
    Thanks
    52
    Thanked 42 Times in 42 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Android

    Default QPixmapItem OpenGL black item

    Hello,
    I have problem with QPixmapItem that is placed on the view with OpenGL viewport.
    Problem is that when item is large, like 5000x4000 then that item is black.
    I thought that maybe image needs size of pow 2 but with i.e. 5120x5120 the same behaviour occurs.

    I did test this on NVidia GPUs and they have exactly the same behaviour and same specification if it comes to shaders uniforms sizes:

    GTS450 can support up to:

    Max Texture Size: 16384 x 16384 pixels
    Max Viewport Size: 16384 x 16384 pixels

    but:
    Max Uniforms: Vertex / Pixel / Geometry: 4096 / 2048 / 2048

    My question here is is QGraphicsScene use shader in "background" to send items to the OpenGL? Because if it is then that would explained size limitation.

    Any suggestions are more then welcome.
    In the near future - corporate networks reach out to the stars. Electrons and light flow throughout the universe.
    The advance of computerization however, has not yet wiped out nations and ethnic groups.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,363
    Thanks
    3
    Thanked 5,012 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QPixmapItem OpenGL black item

    Quote Originally Posted by Talei View Post
    My question here is is QGraphicsScene use shader in "background" to send items to the OpenGL?
    I don't think the opengl paint engine uses any shader-based code but you'd have to verify that yourself by grepping the source code.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. The following user says thank you to wysota for this useful post:

    Talei (1st May 2013)

  4. #3
    Join Date
    Dec 2008
    Location
    Poland
    Posts
    383
    Thanks
    52
    Thanked 42 Times in 42 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: QPixmapItem OpenGL black item

    I thought that to, but why limitation of 4096 x 4096 for the QPixmapItem? Maybe that limitation comes from different place, like QPixmap itself?
    In the near future - corporate networks reach out to the stars. Electrons and light flow throughout the universe.
    The advance of computerization however, has not yet wiped out nations and ethnic groups.

  5. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,363
    Thanks
    3
    Thanked 5,012 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QPixmapItem OpenGL black item

    I don't think QPixmap has such a limitation. It's more likely your GL pipeline needs to enable support of textures larger than 4096x4096 and that it doesn't do that.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  6. The following user says thank you to wysota for this useful post:

    Talei (30th April 2013)

  7. #5
    Join Date
    Dec 2008
    Location
    Poland
    Posts
    383
    Thanks
    52
    Thanked 42 Times in 42 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: QPixmapItem OpenGL black item

    As always it's users fault ...
    To be honest I don't know where the error was because I just started from scratch.
    Now everything is working correct.

    Sorry for wasting Your time.
    Regards
    In the near future - corporate networks reach out to the stars. Electrons and light flow throughout the universe.
    The advance of computerization however, has not yet wiped out nations and ethnic groups.

Similar Threads

  1. Can I use STL in Black Berry 10 development??
    By ggdev001 in forum Newbie
    Replies: 2
    Last Post: 6th February 2013, 16:03
  2. Qt + opengl+opencv black screen
    By loose in forum Qt Programming
    Replies: 1
    Last Post: 11th April 2011, 16:49
  3. Replies: 0
    Last Post: 22nd November 2010, 20:02
  4. Image conversion black and white
    By offline in forum Qt Programming
    Replies: 1
    Last Post: 25th March 2010, 02:21
  5. QGLWidget renders black
    By jonasbalmer in forum General Programming
    Replies: 2
    Last Post: 24th January 2010, 16:32

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.