PythonQt.Qt.QGLFunctions
QGLFunctions
PythonQtInstanceWrapper object
Native bases: PythonQtInstanceWrapper
Supplemental documentation: Qt 5 reference:
Detailed Description
OpenGL ES 2.0 defines a subset of the OpenGL specification that is common across many desktop and embedded OpenGL implementations. However, it can be difficult to use the functions from that subset because they need to be resolved manually on desktop systems.
QGLFunctions provides a guaranteed API that is available on all OpenGL systems and takes care of function resolution on systems that need it. The recommended way to use QGLFunctions is by direct inheritance:
class MyGLWidget : public QGLWidget, protected QGLFunctions
{
Q_OBJECT
public:
MyGLWidget(QWidget *parent = 0) : QGLWidget(parent) {}
protected:
void initializeGL();
void paintGL();
};
void MyGLWidget::initializeGL()
{
initializeGLFunctions();
}
The paintGL() function can then use any of the OpenGL ES 2.0 functions without
explicit resolution, such as
glActiveTexture()
in the following example:
void MyGLWidget::paintGL()
{
glActiveTexture(GL_TEXTURE1);
glBindTexture(GL_TEXTURE_2D, textureId);
...
}
QGLFunctions can also be used directly for ad-hoc invocation of OpenGL ES 2.0 functions on all platforms:
QGLFunctions glFuncs(QGLContext::currentContext());
glFuncs.glActiveTexture(GL_TEXTURE1);
QGLFunctions provides wrappers for all OpenGL ES 2.0 functions, except those like
glDrawArrays(), glViewport(), and glBindTexture() that don't have portability
issues.
Including the header for QGLFunctions will also define all of the OpenGL ES 2.0 macro
constants that are not already defined by the system's OpenGL headers, such as
GL_TEXTURE1 above.
The hasOpenGLFeature() and openGLFeatures() functions can be used to determine if the OpenGL implementation has a major OpenGL ES 2.0 feature. For example, the following checks if non power of two textures are available:
QGLFunctions funcs(QGLContext::currentContext());
bool npot = funcs.hasOpenGLFeature(QGLFunctions::NPOTTextures);
Note: This class has been deprecated in favor of QOpenGLFunctions.
Source: https://doc.qt.io/archives/qt-5.15/qglfunctions.html
Complete member index
Every captured member retains its own identity. Identical captured declaration text is linked once; this does not establish native inheritance or interchangeable objects.
| Member | Kind | Signature | Summary |
|---|---|---|---|
BlendColor |
attribute | Any |
(shared captured text) |
BlendEquation |
attribute | Any |
(shared captured text) |
BlendEquationSeparate |
attribute | Any |
(shared captured text) |
BlendFuncSeparate |
attribute | Any |
(shared captured text) |
BlendSubtract |
attribute | Any |
(shared captured text) |
Buffers |
attribute | Any |
(shared captured text) |
CompressedTextures |
attribute | Any |
(shared captured text) |
Framebuffers |
attribute | Any |
(shared captured text) |
Multisample |
attribute | Any |
(shared captured text) |
Multitexture |
attribute | Any |
(shared captured text) |
NPOTTextures |
attribute | Any |
(shared captured text) |
OpenGLFeature |
attribute | type |
Convert a number or string to an integer, or return 0 if no arguments are given. (shared captured text) |
OpenGLFeatures |
attribute | type |
Convert a number or string to an integer, or return 0 if no arguments are given. (shared captured text) |
Shaders |
attribute | Any |
(shared captured text) |
StencilSeparate |
attribute | Any |
(shared captured text) |
__init__ |
function | (self, *args: Any, **kwargs: Any) -> None |
Native constructor; consult class documentation for supported overloads. (shared captured text) |
className |
function | (self, *args: Any, **kwargs: Any) -> Any |
Return the classname of the object (shared captured text) |
delete |
function | (self, *args: Any, **kwargs: Any) -> Any |
Deletes the C++ object (at your own risk, my friend!) (shared captured text) |
glActiveTexture |
function | (self, texture: Any) -> Any |
Convenience function that calls glActiveTexture(texture). (shared captured text) |
glAttachShader |
function | (self, program: Any, shader: Any) -> Any |
X.glAttachShader(program, shader) (shared captured text) |
glBindAttribLocation |
function | (self, program: Any, index: Any, name: Any) -> Any |
X.glBindAttribLocation(program, index, name) (shared captured text) |
glBindBuffer |
function | (self, target: Any, buffer: Any) -> Any |
X.glBindBuffer(target, buffer) (shared captured text) |
glBindFramebuffer |
function | (self, target: Any, framebuffer: Any) -> Any |
X.glBindFramebuffer(target, framebuffer) (shared captured text) |
glBindRenderbuffer |
function | (self, target: Any, renderbuffer: Any) -> Any |
X.glBindRenderbuffer(target, renderbuffer) (shared captured text) |
glBlendColor |
function | (self, red: Any, green: Any, blue: Any, alpha: Any) -> Any |
X.glBlendColor(red, green, blue, alpha) (shared captured text) |
glBlendEquation |
function | (self, mode: Any) -> Any |
Convenience function that calls glBlendEquation(mode). (shared captured text) |
glBlendEquationSeparate |
function | (self, modeRGB: Any, modeAlpha: Any) -> Any |
X.glBlendEquationSeparate(modeRGB, modeAlpha) (shared captured text) |
glBlendFuncSeparate |
function | (self, srcRGB: Any, dstRGB: Any, srcAlpha: Any, dstAlpha: Any) -> Any |
X.glBlendFuncSeparate(srcRGB, dstRGB, srcAlpha, dstAlpha) (shared captured text) |
glCheckFramebufferStatus |
function | (self, target: Any) -> int |
X.glCheckFramebufferStatus(target) -> int (shared captured text) |
glClearDepthf |
function | (self, depth: Any) -> Any |
Convenience function that calls glClearDepth(depth) on desktop OpenGL systems and glClearDepthf(depth) on embedded OpenGL ES systems. (shared captured text) |
glCompileShader |
function | (self, shader: Any) -> Any |
Convenience function that calls glCompileShader(shader). (shared captured text) |
glCompressedTexImage2D |
function | (self, target: Any, level: Any, internalformat: Any, width: Any, height: Any, border: Any, imageSize: Any, da… |
X.glCompressedTexImage2D(target, level, internalformat, width, height, border, imageSize, data) (shared captured text) |
glCompressedTexSubImage2D |
function | (self, target: Any, level: Any, xoffset: Any, yoffset: Any, width: Any, height: Any, format: Any, imageSize: … |
X.glCompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, data) (shared captured text) |
glCreateProgram |
function | (self) -> int |
X.glCreateProgram() -> int (shared captured text) |
glCreateShader |
function | (self, type: Any) -> int |
X.glCreateShader(type) -> int (shared captured text) |
glDeleteBuffers |
function | (self, n: Any, buffers: Any) -> Any |
X.glDeleteBuffers(n, buffers) (shared captured text) |
glDeleteFramebuffers |
function | (self, n: Any, framebuffers: Any) -> Any |
X.glDeleteFramebuffers(n, framebuffers) (shared captured text) |
glDeleteProgram |
function | (self, program: Any) -> Any |
Convenience function that calls glDeleteProgram(program). (shared captured text) |
glDeleteRenderbuffers |
function | (self, n: Any, renderbuffers: Any) -> Any |
X.glDeleteRenderbuffers(n, renderbuffers) (shared captured text) |
glDeleteShader |
function | (self, shader: Any) -> Any |
Convenience function that calls glDeleteShader(shader). (shared captured text) |
glDepthRangef |
function | (self, zNear: Any, zFar: Any) -> Any |
X.glDepthRangef(zNear, zFar) (shared captured text) |
glDetachShader |
function | (self, program: Any, shader: Any) -> Any |
X.glDetachShader(program, shader) (shared captured text) |
glDisableVertexAttribArray |
function | (self, index: Any) -> Any |
Convenience function that calls glDisableVertexAttribArray(index). (shared captured text) |
glEnableVertexAttribArray |
function | (self, index: Any) -> Any |
Convenience function that calls glEnableVertexAttribArray(index). (shared captured text) |
glFramebufferRenderbuffer |
function | (self, target: Any, attachment: Any, renderbuffertarget: Any, renderbuffer: Any) -> Any |
X.glFramebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer) (shared captured text) |
glFramebufferTexture2D |
function | (self, target: Any, attachment: Any, textarget: Any, texture: Any, level: Any) -> Any |
X.glFramebufferTexture2D(target, attachment, textarget, texture, level) (shared captured text) |
glGenBuffers |
function | (self, n: Any, buffers: Any) -> Any |
X.glGenBuffers(n, buffers) (shared captured text) |
glGenFramebuffers |
function | (self, n: Any, framebuffers: Any) -> Any |
X.glGenFramebuffers(n, framebuffers) (shared captured text) |
glGenRenderbuffers |
function | (self, n: Any, renderbuffers: Any) -> Any |
X.glGenRenderbuffers(n, renderbuffers) (shared captured text) |
glGenerateMipmap |
function | (self, target: Any) -> Any |
Convenience function that calls glGenerateMipmap(target). (shared captured text) |
glGetActiveAttrib |
function | (self, program: Any, index: Any, bufsize: Any, length: Any, size: Any, type: Any, name: Any) -> Any |
X.glGetActiveAttrib(program, index, bufsize, length, size, type, name) (shared captured text) |
glGetActiveUniform |
function | (self, program: Any, index: Any, bufsize: Any, length: Any, size: Any, type: Any, name: Any) -> Any |
X.glGetActiveUniform(program, index, bufsize, length, size, type, name) (shared captured text) |
glGetAttachedShaders |
function | (self, program: Any, maxcount: Any, count: Any, shaders: Any) -> Any |
X.glGetAttachedShaders(program, maxcount, count, shaders) (shared captured text) |
glGetAttribLocation |
function | (self, program: Any, name: Any) -> int |
X.glGetAttribLocation(program, name) -> int (shared captured text) |
glGetBufferParameteriv |
function | (self, target: Any, pname: Any, params: Any) -> Any |
X.glGetBufferParameteriv(target, pname, params) (shared captured text) |
glGetFramebufferAttachmentParameteriv |
function | (self, target: Any, attachment: Any, pname: Any, params: Any) -> Any |
X.glGetFramebufferAttachmentParameteriv(target, attachment, pname, params) (shared captured text) |
glGetProgramInfoLog |
function | (self, program: Any, bufsize: Any, length: Any, infolog: Any) -> Any |
X.glGetProgramInfoLog(program, bufsize, length, infolog) (shared captured text) |
glGetProgramiv |
function | (self, program: Any, pname: Any, params: Any) -> Any |
X.glGetProgramiv(program, pname, params) (shared captured text) |
glGetRenderbufferParameteriv |
function | (self, target: Any, pname: Any, params: Any) -> Any |
X.glGetRenderbufferParameteriv(target, pname, params) (shared captured text) |
glGetShaderInfoLog |
function | (self, shader: Any, bufsize: Any, length: Any, infolog: Any) -> Any |
X.glGetShaderInfoLog(shader, bufsize, length, infolog) (shared captured text) |
glGetShaderPrecisionFormat |
function | (self, shadertype: Any, precisiontype: Any, range: Any, precision: Any) -> Any |
X.glGetShaderPrecisionFormat(shadertype, precisiontype, range, precision) (shared captured text) |
glGetShaderSource |
function | (self, shader: Any, bufsize: Any, length: Any, source: Any) -> Any |
X.glGetShaderSource(shader, bufsize, length, source) (shared captured text) |
glGetShaderiv |
function | (self, shader: Any, pname: Any, params: Any) -> Any |
X.glGetShaderiv(shader, pname, params) (shared captured text) |
glGetUniformLocation |
function | (self, program: Any, name: Any) -> int |
X.glGetUniformLocation(program, name) -> int (shared captured text) |
glGetUniformfv |
function | (self, program: Any, location: Any, params: Any) -> Any |
X.glGetUniformfv(program, location, params) (shared captured text) |
glGetUniformiv |
function | (self, program: Any, location: Any, params: Any) -> Any |
X.glGetUniformiv(program, location, params) (shared captured text) |
glGetVertexAttribPointerv |
function | (self, index: Any, pname: Any, pointer: Any) -> Any |
X.glGetVertexAttribPointerv(index, pname, pointer) (shared captured text) |
glGetVertexAttribfv |
function | (self, index: Any, pname: Any, params: Any) -> Any |
X.glGetVertexAttribfv(index, pname, params) (shared captured text) |
glGetVertexAttribiv |
function | (self, index: Any, pname: Any, params: Any) -> Any |
X.glGetVertexAttribiv(index, pname, params) (shared captured text) |
glIsBuffer |
function | (self, buffer: Any) -> int |
X.glIsBuffer(buffer) -> int (shared captured text) |
glIsFramebuffer |
function | (self, framebuffer: Any) -> int |
X.glIsFramebuffer(framebuffer) -> int (shared captured text) |
glIsProgram |
function | (self, program: Any) -> int |
X.glIsProgram(program) -> int (shared captured text) |
glIsRenderbuffer |
function | (self, renderbuffer: Any) -> int |
X.glIsRenderbuffer(renderbuffer) -> int (shared captured text) |
glIsShader |
function | (self, shader: Any) -> int |
X.glIsShader(shader) -> int (shared captured text) |
glLinkProgram |
function | (self, program: Any) -> Any |
Convenience function that calls glLinkProgram(program). (shared captured text) |
glReleaseShaderCompiler |
function | (self) -> Any |
Convenience function that calls glReleaseShaderCompiler(). (shared captured text) |
glRenderbufferStorage |
function | (self, target: Any, internalformat: Any, width: Any, height: Any) -> Any |
X.glRenderbufferStorage(target, internalformat, width, height) (shared captured text) |
glSampleCoverage |
function | (self, value: Any, invert: Any) -> Any |
X.glSampleCoverage(value, invert) (shared captured text) |
glShaderBinary |
function | (self, n: Any, shaders: Any, binaryformat: Any, binary: Any, length: Any) -> Any |
X.glShaderBinary(n, shaders, binaryformat, binary, length) (shared captured text) |
glShaderSource |
function | (self, shader: Any, count: Any, string: Any, length: Any) -> Any |
X.glShaderSource(shader, count, string, length) (shared captured text) |
glStencilFuncSeparate |
function | (self, face: Any, func: Any, ref: Any, mask: Any) -> Any |
X.glStencilFuncSeparate(face, func, ref, mask) (shared captured text) |
glStencilMaskSeparate |
function | (self, face: Any, mask: Any) -> Any |
X.glStencilMaskSeparate(face, mask) (shared captured text) |
glStencilOpSeparate |
function | (self, face: Any, fail: Any, zfail: Any, zpass: Any) -> Any |
X.glStencilOpSeparate(face, fail, zfail, zpass) (shared captured text) |
glUniform1f |
function | (self, location: Any, x: Any) -> Any |
X.glUniform1f(location, x) (shared captured text) |
glUniform1fv |
function | (self, location: Any, count: Any, v: Any) -> Any |
X.glUniform1fv(location, count, v) (shared captured text) |
glUniform1i |
function | (self, location: Any, x: Any) -> Any |
X.glUniform1i(location, x) (shared captured text) |
glUniform1iv |
function | (self, location: Any, count: Any, v: Any) -> Any |
X.glUniform1iv(location, count, v) (shared captured text) |
glUniform2f |
function | (self, location: Any, x: Any, y: Any) -> Any |
X.glUniform2f(location, x, y) (shared captured text) |
glUniform2fv |
function | (self, location: Any, count: Any, v: Any) -> Any |
X.glUniform2fv(location, count, v) (shared captured text) |
glUniform2i |
function | (self, location: Any, x: Any, y: Any) -> Any |
X.glUniform2i(location, x, y) (shared captured text) |
glUniform2iv |
function | (self, location: Any, count: Any, v: Any) -> Any |
X.glUniform2iv(location, count, v) (shared captured text) |
glUniform3f |
function | (self, location: Any, x: Any, y: Any, z: Any) -> Any |
X.glUniform3f(location, x, y, z) (shared captured text) |
glUniform3fv |
function | (self, location: Any, count: Any, v: Any) -> Any |
X.glUniform3fv(location, count, v) (shared captured text) |
glUniform3i |
function | (self, location: Any, x: Any, y: Any, z: Any) -> Any |
X.glUniform3i(location, x, y, z) (shared captured text) |
glUniform3iv |
function | (self, location: Any, count: Any, v: Any) -> Any |
X.glUniform3iv(location, count, v) (shared captured text) |
glUniform4f |
function | (self, location: Any, x: Any, y: Any, z: Any, w: Any) -> Any |
X.glUniform4f(location, x, y, z, w) (shared captured text) |
glUniform4fv |
function | (self, location: Any, count: Any, v: Any) -> Any |
X.glUniform4fv(location, count, v) (shared captured text) |
glUniform4i |
function | (self, location: Any, x: Any, y: Any, z: Any, w: Any) -> Any |
X.glUniform4i(location, x, y, z, w) (shared captured text) |
glUniform4iv |
function | (self, location: Any, count: Any, v: Any) -> Any |
X.glUniform4iv(location, count, v) (shared captured text) |
glUniformMatrix2fv |
function | (self, location: Any, count: Any, transpose: Any, value: Any) -> Any |
X.glUniformMatrix2fv(location, count, transpose, value) (shared captured text) |
glUniformMatrix3fv |
function | (self, location: Any, count: Any, transpose: Any, value: Any) -> Any |
X.glUniformMatrix3fv(location, count, transpose, value) (shared captured text) |
glUniformMatrix4fv |
function | (self, location: Any, count: Any, transpose: Any, value: Any) -> Any |
X.glUniformMatrix4fv(location, count, transpose, value) (shared captured text) |
glUseProgram |
function | (self, program: Any) -> Any |
Convenience function that calls glUseProgram(program). (shared captured text) |
glValidateProgram |
function | (self, program: Any) -> Any |
Convenience function that calls glValidateProgram(program). (shared captured text) |
glVertexAttrib1f |
function | (self, indx: Any, x: Any) -> Any |
X.glVertexAttrib1f(indx, x) (shared captured text) |
glVertexAttrib1fv |
function | (self, indx: Any, values: Any) -> Any |
X.glVertexAttrib1fv(indx, values) (shared captured text) |
glVertexAttrib2f |
function | (self, indx: Any, x: Any, y: Any) -> Any |
X.glVertexAttrib2f(indx, x, y) (shared captured text) |
glVertexAttrib2fv |
function | (self, indx: Any, values: Any) -> Any |
X.glVertexAttrib2fv(indx, values) (shared captured text) |
glVertexAttrib3f |
function | (self, indx: Any, x: Any, y: Any, z: Any) -> Any |
X.glVertexAttrib3f(indx, x, y, z) (shared captured text) |
glVertexAttrib3fv |
function | (self, indx: Any, values: Any) -> Any |
X.glVertexAttrib3fv(indx, values) (shared captured text) |
glVertexAttrib4f |
function | (self, indx: Any, x: Any, y: Any, z: Any, w: Any) -> Any |
X.glVertexAttrib4f(indx, x, y, z, w) (shared captured text) |
glVertexAttrib4fv |
function | (self, indx: Any, values: Any) -> Any |
X.glVertexAttrib4fv(indx, values) (shared captured text) |
glVertexAttribPointer |
function | (self, indx: Any, size: Any, type: Any, normalized: Any, stride: Any, ptr: Any) -> Any |
X.glVertexAttribPointer(indx, size, type, normalized, stride, ptr) (shared captured text) |
hasOpenGLFeature |
function | (self, feature: Any) -> bool |
X.hasOpenGLFeature(feature) -> bool (shared captured text) |
help |
function | (self, *args: Any, **kwargs: Any) -> Any |
Shows the help of available methods for this class (shared captured text) |
inherits |
function | (self, *args: Any, **kwargs: Any) -> Any |
Returns if the class inherits or is of given type name (shared captured text) |
initializeGLFunctions |
function | (self, context: Any) -> Any |
Initializes GL function resolution for context. (shared captured text) |
openGLFeatures |
function | (self) -> Any |
Returns the set of features that are present on this system's OpenGL implementation. (shared captured text) |