I'm trying to use glReadPixels in a QOpenGLWidget class (Qt 5.8.0, PyQt 5.8.0, python 3.6.1), but can't figure out how to access the function.
Here's a segment of my code:
self.vp = QOpenGLVersionProfile()
self.vp.setVersion(2,1)
self.glFunc = QOpenGLContext.currentContext().versionFunctions(self.vp)
self.glFunc.glReadPixels(...)
Regardless of what I pass to the function, I get an error:
AttributeError: 'QOpenGLFunctions_2_1' object has no attribute 'glReadPixels'
Running print(dir(self.glFunc)
returns a huge list of functions but does not include glReadPixels or any variation that I can find (there's GL_READ_PIXELS but it's an int).
Am I looking in the wrong place for this function?