diff options
author | Julian Thijssen <Nimthora@gmail.com> | 2016-07-27 15:45:31 +0200 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@qt.io> | 2017-01-23 11:34:05 +0000 |
commit | 7dc88b68904c7f1b7e012bd65ccdcbf48cc6e2e0 (patch) | |
tree | 6de47b86b99200b999eddd8de0f07c2e86d8e027 /tests/auto/opengl | |
parent | da4b6c4774c0adf8dee5ee4a9a8d9d24967ede3c (diff) |
Add support for OpenGL 3.2+ core profile contexts in QPainter
This change allows painting via QPainter onto a QOpenGLWindow, QOpenGLWidget
or QOpenGLFramebufferObject when an core profile context is in use. This is
important on macOS in particular, where compatibility profiles are not
available, and so the only way to use modern OpenGL is via a core profile
context.
Added core profile compatible shaders with moder GLSL keywords.
The paint engine binds a VAO and two VBOs from now on, whenever VAOs are
supported. Note that this changes behavior also for OpenGL 2.x context that
have VAO support via extensions.
The Lancelot test suite gains support for core profile contexts. This can
be triggered via -coreglbuffer in place of -glbuffer when manually inspecting
via 'lance', while tst_lancelot will automatically run core context-based tests
whenever supported.
Task-number: QTBUG-33535
Change-Id: I6323a7ea2aaa9e111651ebbffd3e40259c8e7a9c
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'tests/auto/opengl')
-rw-r--r-- | tests/auto/opengl/qgl/tst_qgl.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/auto/opengl/qgl/tst_qgl.cpp b/tests/auto/opengl/qgl/tst_qgl.cpp index af0248b432..cf92c9fab6 100644 --- a/tests/auto/opengl/qgl/tst_qgl.cpp +++ b/tests/auto/opengl/qgl/tst_qgl.cpp @@ -1169,6 +1169,10 @@ void tst_QGL::currentFboSync() QGLWidget glw; glw.makeCurrent(); + // For some reason we offer inter-operatibility between QGL and QOpenGL + // paint engines. (?!) Let's check if the two engines can be used to perform + // drawing in turns on different targets within the same context. + { QGLFramebufferObject fbo1(256, 256, QGLFramebufferObject::CombinedDepthStencil); |