Rendering big images in QML1 with GLWidget

2014-03-03 Thread Shantanu Tushar Jha
Hi folks,

In PMC, we have this fragment of code which (from what I understand) uses
an OpenGL canvas to draw stuff -

QGLWidget *glWidget = new QGLWidget;
glWidget-setAutoFillBackground(false);
view-setViewport(glWidget);

While this gives improved video playback performance and quality
(antialiasing etc), this leads to the QML1 Image element rendering a black
area for images more than a specific size (Somewhat more than 4000x3000 px).

The Image renders fine if I remove the GLWidget, has anyone encountered
this before and/or can suggest a solution?

Cheers!

-- 
Shantanu Tushar(UTC +0530)
http://www.shantanutushar.com
___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Re: Rendering big images in QML1 with GLWidget

2014-03-03 Thread Martin Gräßlin
On Monday 03 March 2014 21:25:59 Shantanu Tushar Jha wrote:
 Hi folks,
 
 In PMC, we have this fragment of code which (from what I understand) uses
 an OpenGL canvas to draw stuff -
 
 QGLWidget *glWidget = new QGLWidget;
 glWidget-setAutoFillBackground(false);
 view-setViewport(glWidget);
 
 While this gives improved video playback performance and quality
 (antialiasing etc), this leads to the QML1 Image element rendering a black
 area for images more than a specific size (Somewhat more than 4000x3000 px).
 
 The Image renders fine if I remove the GLWidget, has anyone encountered
 this before and/or can suggest a solution?

you try to render an image which is larger than most likely your max texture 
size of your GPU. You can check the actual limits with glxinfo -l.

This is a common problem we have run into in KWin and we post IIRC a warning 
and disable OpenGL compositing. For your usecase it also sounds like a good 
idea to check the limits and just disable the GLWidget if the image is larger 
than the limit.

Cheers
Martin

signature.asc
Description: This is a digitally signed message part.
___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Re: Rendering big images in QML1 with GLWidget

2014-03-03 Thread David Edmundson
Or set a sourceSize on the Image. This way you'll save memory when you
load the image, and save you ever going over this limit.

There's no point loading something bigger than you can display it.
___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Re: Rendering big images in QML1 with GLWidget

2014-03-03 Thread Shantanu Tushar Jha
Ah, one of those Why didn't I think of that! moments :P Thanks folks.


On Mon, Mar 3, 2014 at 11:01 PM, David Edmundson da...@davidedmundson.co.uk
 wrote:

 Or set a sourceSize on the Image. This way you'll save memory when you
 load the image, and save you ever going over this limit.

 There's no point loading something bigger than you can display it.
 ___
 Plasma-devel mailing list
 Plasma-devel@kde.org
 https://mail.kde.org/mailman/listinfo/plasma-devel




-- 
Shantanu Tushar(UTC +0530)
http://www.shantanutushar.com
___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel