Skip to content

doc: QtGL: fix textures being recreated

Alexandre Janniaux requested to merge alexandre-janniaux/vlc:qtgl-leak/1 into master

QOpenGLFramebufferObject::takeTexture is detaching the current texture and transfering ownership to the caller, and the texture was never destroyed afterwards. It was leading to a huge memory consumption and leak when using the sample app.

From the documentation[^1] in Qt5:

Returns the texture id for the texture attached to this framebuffer
object. The ownership of the texture is transferred to the caller.

If the framebuffer object is currently bound, an implicit release()
will be done. During the next call to bind() a new texture will be
created.

Co-authored-by: Alexandre Janniaux ajanni@videolabs.io

For the commit message and cleaning the fix mostly.

Fixes #25867 (closed)

Thanks a lot to Craig Turner for finding and fixing where this issue was coming from, which was hard to spot. :)

Edited by Alexandre Janniaux

Merge request reports

Loading