Details
-
Bug
-
Resolution: Invalid
-
Not Evaluated
-
None
-
4.6.2
-
None
Description
I set QGraphicsView viewport with a QGLWidget, and try to use bindTexture(QPixmap, GL_TEXTURE_2D); the texture doesn't take effect during drawing. details see below:
Based on qt simpleanchorlayout example ($qt_src/examples/graphicsview/simpleanchorlayout), I set the GraphicsView viewport with a GLWidget, and drew a triangle in a QGraphicsWidget. It works ok.
When I try to map a texture to the triangle based on bindTexure(QPixmap, ...), the texture can't be mapped. See Screenshot-Simple Anchor Layout.png
While if I use bindTexture(QImage, ...), the texture will be shown. See Screenshot-Simple Anchor Layout-QImage.png
However QPixmap is what we needed for the 'texture from pixmap' extension, then I could render Pixmap video frame in qt-moblility.
The entire project in in simpleanchorlayout.tgz, and my changes is in bindTexture.patch.
If I use bindTexture(QPixmap, ...) in a class derived from QGLWidget (in qt texture example), it will also be ok. It is still not our case. See Screenshot-Textures-with-triangle.png