PDA

View Full Version : QPixmapItem OpenGL black item



Talei
30th April 2013, 00:17
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.

wysota
30th April 2013, 07:26
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.

Talei
30th April 2013, 10:50
I thought that to, but why limitation of 4096 x 4096 for the QPixmapItem? Maybe that limitation comes from different place, like QPixmap itself?

wysota
30th April 2013, 13:21
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.

Talei
30th April 2013, 23:05
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