Yep, something like that.
The text is most likely rasterized first so you'd get four vertices and a texture. You get the same for a pixmap.Caching a pixmap is not what I had in mind when I spoke of an OpenGL-Displaylist. I sort of hoped to compile the actual vertex ops etc..
You need to fill one properly but then there is a question what would you fill in there. I assure you - you won't do better than what Qt already does in this field. You can't do better than blitting a texture into the buffer.Yes, so far that's clear. But if I would want to render the TextItem once outside a paintevent to compile a displaylist myself, I need to pass a valid style option. How do I get that?
You should be able to use ItemCoordinateCache with this approach. As long as you modify the transformations of items and not their internals, this should work.Probably my problem with the cachemodes is that for nearly each repaint (camera position changed) I'm changing the projection of all items.
Either in src/gui/graphicsview/qgraphicsitem* or in src/opengl/qpaintengine_opengl* and src/opengl/qpixmapdata_gl*. I assume the bare caching code is the same regardless of the backend - it just stores an appropriate pixmap. The magic is how the pixmap works.Where in the Qt sources do I find the caching modes implementation for the opengl painter?
Bookmarks