Set projection matrix for systems with OpenGL 3.1
The projection matrix should also be set for systems running OpenGL 3.1 with GL_ARB_compatibility extension. Task-number: QTBUG-28284 Change-Id: I756155a6064dcbff29fd817e676d31f24f559e8c Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
This commit is contained in:
parent
bc7e63e3f9
commit
9514422eee
@ -549,8 +549,10 @@ void QOpenGL2PaintEngineEx::beginNativePainting()
|
||||
|
||||
#ifndef QT_OPENGL_ES_2
|
||||
Q_ASSERT(QOpenGLContext::currentContext());
|
||||
const QOpenGLContext *ctx = d->ctx;
|
||||
const QSurfaceFormat &fmt = d->device->context()->format();
|
||||
if (fmt.majorVersion() < 3 || (fmt.majorVersion() == 3 && fmt.minorVersion() < 1)
|
||||
|| (fmt.majorVersion() == 3 && fmt.minorVersion() == 1 && ctx->hasExtension(QByteArrayLiteral("GL_ARB_compatibility")))
|
||||
|| fmt.profile() == QSurfaceFormat::CompatibilityProfile)
|
||||
{
|
||||
// be nice to people who mix OpenGL 1.x code with QPainter commands
|
||||
|
@ -545,8 +545,10 @@ void QGL2PaintEngineEx::beginNativePainting()
|
||||
d->funcs.glDisableVertexAttribArray(i);
|
||||
|
||||
#ifndef QT_OPENGL_ES_2
|
||||
const QGLContext *ctx = d->ctx;
|
||||
const QGLFormat &fmt = d->device->format();
|
||||
if (fmt.majorVersion() < 3 || (fmt.majorVersion() == 3 && fmt.minorVersion() < 1)
|
||||
|| (fmt.majorVersion() == 3 && fmt.minorVersion() == 1 && ctx->contextHandle()->hasExtension(QByteArrayLiteral("GL_ARB_compatibility")))
|
||||
|| fmt.profile() == QGLFormat::CompatibilityProfile)
|
||||
{
|
||||
// be nice to people who mix OpenGL 1.x code with QPainter commands
|
||||
|
Loading…
x
Reference in New Issue
Block a user