Hello everyone,

I'm trying to draw the background of a QGraphicsScene via OpenGL. I have working code below, which has some issues.
In OpenGL, I draw an image decomposed into tiles as a background. On top of this image, I want to overlay any QGraphicsItems, so that
the coordinate systems of QGraphicsScene and OpenGL match.

I have pushed my current code here:

https://github.com/thorbenk/tiled

A simple qmake tiled.pro; qmake; make; ./tiled should work.

Zooming (wheel) and panning (left drag) works as expected. However, when I resize the window, the textures gets contorted.

Why?

I believe the critical parts is the set-up of matrices in the drawBackground function, which you can view here:

https://github.com/thorbenk/tiled/bl...tiled.cpp#L412

Thanks for any help,

Thorben