Related: Python OpenGL compatibility test
I have been trying to get OpenGL working for awhile by using the code from the link above. None of the desktop versions work: 2.0 and 4.1 Core crash and 2.1 shows an empty frame. For some reason, ES2 isn’t available as a profile. It’s not listed under D:\Program Files\Krita (x64)\lib\site-packages\PyQt5
. ES2 is available in the PyQt5 package. I got around context.versionFunctions(profile)
returning None
by importing the profiles directly from PyQt5._QOpenGLFunctions_2_1 import QOpenGLFunctions_2_1
.
Any suggestions? I think the next thing to try is to somehow get the ES2 profile into Krita’s Python libs. Technically, it doesn’t have to be OpenGL; I mainly need a way to interactively update frames pixel by pixel similar to the shaders in the code linked above.
System Info
OpenGL Info
Vendor: "Google Inc. (NVIDIA)"
Renderer: "ANGLE (NVIDIA, NVIDIA GeForce GTX 1660 SUPER Direct3D11 vs_5_0 ps_5_0, D3D11-31.0.15.4633)"
Driver version: "OpenGL ES 3.0.0 (ANGLE 2.1.0 git hash: f2280c0c5f93+krita_qt5)"
Shading language: "OpenGL ES GLSL ES 3.00 (ANGLE 2.1.0 git hash: f2280c0c5f93+krita_qt5)"
Requested format: QSurfaceFormat(version 3.0, options QFlags<QSurfaceFormat::FormatOption>(), depthBufferSize 24, redBufferSize 8, greenBufferSize 8, blueBufferSize 8, alphaBufferSize 8, stencilBufferSize 8, samples -1, swapBehavior QSurfaceFormat::DoubleBuffer, swapInterval 0, colorSpace QSurfaceFormat::DefaultColorSpace, profile QSurfaceFormat::NoProfile)
Current format: QSurfaceFormat(version 3.0, options QFlags<QSurfaceFormat::FormatOption>(), depthBufferSize 24, redBufferSize 8, greenBufferSize 8, blueBufferSize 8, alphaBufferSize 8, stencilBufferSize 8, samples 0, swapBehavior QSurfaceFormat::DefaultSwapBehavior, swapInterval 0, colorSpace QSurfaceFormat::DefaultColorSpace, profile QSurfaceFormat::NoProfile)
GL version: 3.0
Supports deprecated functions false
Is OpenGL ES: true
supportsBufferMapping: true
supportsBufferInvalidation: false
forceDisableTextureBuffers: true
Extensions:
...
QPA OpenGL Detection Info
supportsDesktopGL: true
supportsAngleD3D11: true
isQtPreferAngle: true
Detected renderers:
(Supported) ANGLE (Microsoft, Microsoft Basic Render Driver Direct3D11 vs_5_0 ps_5_0, D3D11-10.0.22621.3527) (OpenGL ES 3.0.0 (ANGLE 2.1.0 git hash: f2280c0c5f93+krita_qt5))
(Supported) NVIDIA GeForce GTX 1660 SUPER/PCIe/SSE2 (4.6.0 NVIDIA 546.33)
(Supported) ANGLE (NVIDIA, NVIDIA GeForce GTX 1660 SUPER Direct3D11 vs_5_0 ps_5_0, D3D11-31.0.15.4633) (OpenGL ES 3.0.0 (ANGLE 2.1.0 git hash: f2280c0c5f93+krita_qt5))