Fix crash in QOpenGLTexture

Any function using the non-dsa helpers and glTextureParameterf() would
crash as this code path failed to initialize the function pointers.

Task-number: QTBUG-47133
Change-Id: I8970c9693ec471a96b135ae5728ab6407ee06a6f
Reviewed-by: Mike Krus <mike.krus@kdab.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
This commit is contained in:
Sean Harmer 2015-07-11 09:56:35 +01:00
parent bf36986f50
commit f2634c3a48

View File

@ -101,6 +101,8 @@ QOpenGLTextureHelper::QOpenGLTextureHelper(QOpenGLContext *context)
// Use our own DSA emulation
TextureParameteri = &QOpenGLTextureHelper::qt_TextureParameteri;
TextureParameteriv = &QOpenGLTextureHelper::qt_TextureParameteriv;
TextureParameterf = &QOpenGLTextureHelper::qt_TextureParameterf;
TextureParameterfv = &QOpenGLTextureHelper::qt_TextureParameterfv;
GenerateTextureMipmap = &QOpenGLTextureHelper::qt_GenerateTextureMipmap;
TextureStorage3D = &QOpenGLTextureHelper::qt_TextureStorage3D;
TextureStorage2D = &QOpenGLTextureHelper::qt_TextureStorage2D;