<div dir="ltr"><div>I'm trying to get a set of OpenGL strings using PyQt. To make it clear what I'm trying to achieve, this is how I would do it via PyOpenGL (which is not available):</div><div><br></div><div><font face="monospace, monospace" color="#351c75">```</font></div><div><font face="monospace, monospace" color="#351c75">>>> from OpenGL.GL import glGetString, GL_VERSION, GL_RENDERER, GL_VENDOR</font></div><div><font face="monospace, monospace" color="#351c75">>>> for s in (GL_VENDOR, GL_RENDERER, GL_VERSION):</font></div><div><font face="monospace, monospace" color="#351c75">... print(glGetString(s))</font></div><div><font face="monospace, monospace" color="#351c75">... </font></div><div><font face="monospace, monospace" color="#351c75">b'NVIDIA Corporation'</font></div><div><font face="monospace, monospace" color="#351c75">b'Quadro FX 3700M/PCIe/SSE2'</font></div><div><font face="monospace, monospace" color="#351c75">b'3.3.0 NVIDIA 340.96'</font></div><div><font face="monospace, monospace" color="#351c75">```</font></div><div><br></div><div>This *should* be achievable through Qt/PyQt with the use of `glGetString()` in the `QOpenGLFunctions` class [1], but I'm having several PyQt problems following the Qt docs for using this.</div><div><br></div><div>The first issue is that I can't locate `QOpenGLFunctions` anywhere in PyQt... where is it?</div><div><br></div><div>The second issue is that `QOpenGLContext` instances are supposed to have a `functions()` method that provides an easily accessible instance of `QOpenGLFunctions` (for ad-hoc usage, per Qt docs), but it does not exist on contexts created in PyQt.</div><div><br></div><div>How do I get a hold of `QOpenGLFunctions` via PyQt? Alternatively, is there some other PyQt way to get the OpenGL strings that I want?</div><div><br></div><div>Thanks,</div><div>Russ</div><div><br></div><div>[1] <a href="http://doc.qt.io/qt-5/qopenglfunctions.html#glGetString" target="_blank">http://doc.qt.io/qt-5/<wbr>qopenglfunctions.html#<wbr>glGetString</a></div><div><br></div>
</div>