[Qt5-feedback] Immutable QPixmaps
Tom Cooksey
tomcooksey at gmail.com
Fri May 13 18:43:35 CEST 2011
On Fri, May 13, 2011 at 5:11 PM, <gunnar.sletta at nokia.com> wrote:
>
> On May 13, 2011, at 4:48 PM, ext Samuel Rødal wrote:
>
> > On 05/13/2011 04:31 PM, ext Tom Cooksey wrote:
> >> One design feature I remember would have been quite nice in Qt4 was to
> >> have the concept of immutable QPixmaps and possibly QImages too. That
> >> way, you can use a compressed texture as a QPixmap and never have to
> >> worry that someone might at a later date open a painter on it.
> >
> > QPixmap will probably not play a big role in QtQuick2, scene graph
> > currently does explicit texture management on its own (with the
> > QSGTexture etc classes).
> >
> > There's also the option to make custom scene graph nodes where you
> > supply a raw texture id directly (using QSGSimpleTextureNode).
> >
>
> For compressed textures, one can always use the ETC image provider in QML.
> This allows you to load compressed textures as Image elements. Inside the
> scene graph API, they are passed around as QSGTexture subclasses.
>
> The immutable pixmap class you are looking for should be mostly covered by
> the QSGTexture class.
>
Fair enough - seems like a good idea to make them explicitly GL textures
rather than hiding that fact behind an overly generic QPixmap abstraction.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt.nokia.com/pipermail/qt5-feedback/attachments/20110513/dca50916/attachment.html
More information about the Qt5-feedback
mailing list