QOpenGLFunctions Class
The QOpenGLFunctions class provides cross-platform access to the OpenGL ES 2.0 API. More...
Header: | #include <QOpenGLFunctions> |
qmake: | QT += gui |
Since: | Qt 5.0 |
Inherited By: |
Public Types
enum | OpenGLFeature { Multitexture, Shaders, Buffers, Framebuffers, ..., MultipleRenderTargets } |
flags | OpenGLFeatures |
Public Functions
QOpenGLFunctions() | |
QOpenGLFunctions(QOpenGLContext *context) | |
~QOpenGLFunctions() | |
void | glActiveTexture(GLenum texture) |
void | glAttachShader(GLuint program, GLuint shader) |
void | glBindAttribLocation(GLuint program, GLuint index, const char *name) |
void | glBindBuffer(GLenum target, GLuint buffer) |
void | glBindFramebuffer(GLenum target, GLuint framebuffer) |
void | glBindRenderbuffer(GLenum target, GLuint renderbuffer) |
void | glBindTexture(GLenum target, GLuint texture) |
void | glBlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) |
void | glBlendEquation(GLenum mode) |
void | glBlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha) |
void | glBlendFunc(GLenum sfactor, GLenum dfactor) |
void | glBlendFuncSeparate(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha) |
void | glBufferData(GLenum target, qopengl_GLsizeiptr size, const void *data, GLenum usage) |
void | glBufferSubData(GLenum target, qopengl_GLintptr offset, qopengl_GLsizeiptr size, const void *data) |
GLenum | glCheckFramebufferStatus(GLenum target) |
void | glClear(GLbitfield mask) |
void | glClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) |
void | glClearDepthf(GLclampf depth) |
void | glClearStencil(GLint s) |
void | glColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha) |
void | glCompileShader(GLuint shader) |
void | glCompressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data) |
void | glCompressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data) |
void | glCopyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border) |
void | glCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height) |
GLuint | glCreateProgram() |
GLuint | glCreateShader(GLenum type) |
void | glCullFace(GLenum mode) |
void | glDeleteBuffers(GLsizei n, const GLuint *buffers) |
void | glDeleteFramebuffers(GLsizei n, const GLuint *framebuffers) |
void | glDeleteProgram(GLuint program) |
void | glDeleteRenderbuffers(GLsizei n, const GLuint *renderbuffers) |
void | glDeleteShader(GLuint shader) |
void | glDeleteTextures(GLsizei n, const GLuint *textures) |
void | glDepthFunc(GLenum func) |
void | glDepthMask(GLboolean flag) |
void | glDepthRangef(GLclampf zNear, GLclampf zFar) |
void | glDetachShader(GLuint program, GLuint shader) |
void | glDisable(GLenum cap) |
void | glDisableVertexAttribArray(GLuint index) |
void | glDrawArrays(GLenum mode, GLint first, GLsizei count) |
void | glDrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices) |
void | glEnable(GLenum cap) |
void | glEnableVertexAttribArray(GLuint index) |
void | glFinish() |
void | glFlush() |
void | glFramebufferRenderbuffer(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer) |
void | glFramebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level) |
void | glFrontFace(GLenum mode) |
void | glGenBuffers(GLsizei n, GLuint *buffers) |
void | glGenFramebuffers(GLsizei n, GLuint *framebuffers) |
void | glGenRenderbuffers(GLsizei n, GLuint *renderbuffers) |
void | glGenTextures(GLsizei n, GLuint *textures) |
void | glGenerateMipmap(GLenum target) |
void | glGetActiveAttrib(GLuint program, GLuint index, GLsizei bufsize, GLsizei *length, GLint *size, GLenum *type, char *name) |
void | glGetActiveUniform(GLuint program, GLuint index, GLsizei bufsize, GLsizei *length, GLint *size, GLenum *type, char *name) |
void | glGetAttachedShaders(GLuint program, GLsizei maxcount, GLsizei *count, GLuint *shaders) |
GLint | glGetAttribLocation(GLuint program, const char *name) |
void | glGetBooleanv(GLenum pname, GLboolean *params) |
void | glGetBufferParameteriv(GLenum target, GLenum pname, GLint *params) |
GLenum | glGetError() |
void | glGetFloatv(GLenum pname, GLfloat *params) |
void | glGetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, GLenum pname, GLint *params) |
void | glGetIntegerv(GLenum pname, GLint *params) |
void | glGetProgramInfoLog(GLuint program, GLsizei bufsize, GLsizei *length, char *infolog) |
void | glGetProgramiv(GLuint program, GLenum pname, GLint *params) |
void | glGetRenderbufferParameteriv(GLenum target, GLenum pname, GLint *params) |
void | glGetShaderInfoLog(GLuint shader, GLsizei bufsize, GLsizei *length, char *infolog) |
void | glGetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision) |
void | glGetShaderSource(GLuint shader, GLsizei bufsize, GLsizei *length, char *source) |
void | glGetShaderiv(GLuint shader, GLenum pname, GLint *params) |
const GLubyte * | glGetString(GLenum name) |
void | glGetTexParameterfv(GLenum target, GLenum pname, GLfloat *params) |
void | glGetTexParameteriv(GLenum target, GLenum pname, GLint *params) |
GLint | glGetUniformLocation(GLuint program, const char *name) |
void | glGetUniformfv(GLuint program, GLint location, GLfloat *params) |
void | glGetUniformiv(GLuint program, GLint location, GLint *params) |
void | glGetVertexAttribPointerv(GLuint index, GLenum pname, void **pointer) |
void | glGetVertexAttribfv(GLuint index, GLenum pname, GLfloat *params) |
void | glGetVertexAttribiv(GLuint index, GLenum pname, GLint *params) |
void | glHint(GLenum target, GLenum mode) |
GLboolean | glIsBuffer(GLuint buffer) |
GLboolean | glIsEnabled(GLenum cap) |
GLboolean | glIsFramebuffer(GLuint framebuffer) |
GLboolean | glIsProgram(GLuint program) |
GLboolean | glIsRenderbuffer(GLuint renderbuffer) |
GLboolean | glIsShader(GLuint shader) |
GLboolean | glIsTexture(GLuint texture) |
void | glLineWidth(GLfloat width) |
void | glLinkProgram(GLuint program) |
void | glPixelStorei(GLenum pname, GLint param) |
void | glPolygonOffset(GLfloat factor, GLfloat units) |
void | glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels) |
void | glReleaseShaderCompiler() |
void | glRenderbufferStorage(GLenum target, GLenum internalformat, GLsizei width, GLsizei height) |
void | glSampleCoverage(GLclampf value, GLboolean invert) |
void | glScissor(GLint x, GLint y, GLsizei width, GLsizei height) |
void | glShaderBinary(GLint n, const GLuint *shaders, GLenum binaryformat, const void *binary, GLint length) |
void | glShaderSource(GLuint shader, GLsizei count, const char **string, const GLint *length) |
void | glStencilFunc(GLenum func, GLint ref, GLuint mask) |
void | glStencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask) |
void | glStencilMask(GLuint mask) |
void | glStencilMaskSeparate(GLenum face, GLuint mask) |
void | glStencilOp(GLenum fail, GLenum zfail, GLenum zpass) |
void | glStencilOpSeparate(GLenum face, GLenum fail, GLenum zfail, GLenum zpass) |
void | glTexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels) |
void | glTexParameterf(GLenum target, GLenum pname, GLfloat param) |
void | glTexParameterfv(GLenum target, GLenum pname, const GLfloat *params) |
void | glTexParameteri(GLenum target, GLenum pname, GLint param) |
void | glTexParameteriv(GLenum target, GLenum pname, const GLint *params) |
void | glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels) |
void | glUniform1f(GLint location, GLfloat x) |
void | glUniform1fv(GLint location, GLsizei count, const GLfloat *v) |
void | glUniform1i(GLint location, GLint x) |
void | glUniform1iv(GLint location, GLsizei count, const GLint *v) |
void | glUniform2f(GLint location, GLfloat x, GLfloat y) |
void | glUniform2fv(GLint location, GLsizei count, const GLfloat *v) |
void | glUniform2i(GLint location, GLint x, GLint y) |
void | glUniform2iv(GLint location, GLsizei count, const GLint *v) |
void | glUniform3f(GLint location, GLfloat x, GLfloat y, GLfloat z) |
void | glUniform3fv(GLint location, GLsizei count, const GLfloat *v) |
void | glUniform3i(GLint location, GLint x, GLint y, GLint z) |
void | glUniform3iv(GLint location, GLsizei count, const GLint *v) |
void | glUniform4f(GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w) |
void | glUniform4fv(GLint location, GLsizei count, const GLfloat *v) |
void | glUniform4i(GLint location, GLint x, GLint y, GLint z, GLint w) |
void | glUniform4iv(GLint location, GLsizei count, const GLint *v) |
void | glUniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) |
void | glUniformMatrix3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) |
void | glUniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) |
void | glUseProgram(GLuint program) |
void | glValidateProgram(GLuint program) |
void | glVertexAttrib1f(GLuint indx, GLfloat x) |
void | glVertexAttrib1fv(GLuint indx, const GLfloat *values) |
void | glVertexAttrib2f(GLuint indx, GLfloat x, GLfloat y) |
void | glVertexAttrib2fv(GLuint indx, const GLfloat *values) |
void | glVertexAttrib3f(GLuint indx, GLfloat x, GLfloat y, GLfloat z) |
void | glVertexAttrib3fv(GLuint indx, const GLfloat *values) |
void | glVertexAttrib4f(GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w) |
void | glVertexAttrib4fv(GLuint indx, const GLfloat *values) |
void | glVertexAttribPointer(GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *ptr) |
void | glViewport(GLint x, GLint y, GLsizei width, GLsizei height) |
bool | hasOpenGLFeature(QOpenGLFunctions::OpenGLFeature feature) const |
void | initializeGLFunctions() |
void | initializeOpenGLFunctions() |
QOpenGLFunctions::OpenGLFeatures | openGLFeatures() const |
Static Protected Members
bool | isInitialized(const QOpenGLFunctionsPrivate *d) |
Detailed Description
The QOpenGLFunctions class provides cross-platform access to the OpenGL ES 2.0 API.
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.
QOpenGLFunctions 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 QOpenGLFunctions is by direct inheritance:
class MyGLWindow : public QWindow, protected QOpenGLFunctions { Q_OBJECT public: MyGLWindow(QScreen *screen = 0); protected: void initializeGL(); void paintGL(); QOpenGLContext *m_context; }; MyGLWindow(QScreen *screen) : QWindow(screen), QOpenGLWidget(parent) { setSurfaceType(OpenGLSurface); create(); // Create an OpenGL context m_context = new QOpenGLContext; m_context->create(); // Setup scene and render it initializeGL(); paintGL(); } void MyGLWindow::initializeGL() { m_context->makeCurrent(this); initializeOpenGLFunctions(); }
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 MyGLWindow::paintGL() { m_context->makeCurrent(this); glActiveTexture(GL_TEXTURE1); glBindTexture(GL_TEXTURE_2D, textureId); ... m_context->swapBuffers(this); m_context->doneCurrent(); }
QOpenGLFunctions can also be used directly for ad-hoc invocation of OpenGL ES 2.0 functions on all platforms:
QOpenGLFunctions glFuncs(QOpenGLContext::currentContext()); glFuncs.glActiveTexture(GL_TEXTURE1);
An alternative approach is to query the context's associated QOpenGLFunctions instance. This is somewhat faster than the previous approach due to avoiding the creation of a new instance, but the difference is fairly small since the internal data structures are shared, and function resolving happens only once for a given context, regardless of the number of QOpenGLFunctions instances initialized for it.
QOpenGLFunctions *glFuncs = QOpenGLContext::currentContext()->functions(); glFuncs->glActiveTexture(GL_TEXTURE1);
QOpenGLFunctions provides wrappers for all OpenGL ES 2.0 functions, including the common subset of OpenGL 1.x and ES 2.0. While such functions, for example glClear() or glDrawArrays(), can be called also directly, as long as the application links to the platform-specific OpenGL library, calling them via QOpenGLFunctions enables the possibility of dynamically loading the OpenGL implementation.
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:
QOpenGLFunctions funcs(QOpenGLContext::currentContext()); bool npot = funcs.hasOpenGLFeature(QOpenGLFunctions::NPOTTextures);
See also QOpenGLContext and QSurfaceFormat.
Member Type Documentation
enum QOpenGLFunctions::OpenGLFeature
flags QOpenGLFunctions::OpenGLFeatures
This enum defines OpenGL and OpenGL ES features whose presence may depend on the implementation.
Constant | Value | Description |
---|---|---|
QOpenGLFunctions::Multitexture | 0x0001 | glActiveTexture() function is available. |
QOpenGLFunctions::Shaders | 0x0002 | Shader functions are available. |
QOpenGLFunctions::Buffers | 0x0004 | Vertex and index buffer functions are available. |
QOpenGLFunctions::Framebuffers | 0x0008 | Framebuffer object functions are available. |
QOpenGLFunctions::BlendColor | 0x0010 | glBlendColor() is available. |
QOpenGLFunctions::BlendEquation | 0x0020 | glBlendEquation() is available. |
QOpenGLFunctions::BlendEquationSeparate | 0x0040 | glBlendEquationSeparate() is available. |
QOpenGLFunctions::BlendFuncSeparate | 0x0080 | glBlendFuncSeparate() is available. |
QOpenGLFunctions::BlendSubtract | 0x0100 | Blend subtract mode is available. |
QOpenGLFunctions::CompressedTextures | 0x0200 | Compressed texture functions are available. |
QOpenGLFunctions::Multisample | 0x0400 | glSampleCoverage() function is available. |
QOpenGLFunctions::StencilSeparate | 0x0800 | Separate stencil functions are available. |
QOpenGLFunctions::NPOTTextures | 0x1000 | Non power of two textures are available. |
QOpenGLFunctions::NPOTTextureRepeat | 0x2000 | Non power of two textures can use GL_REPEAT as wrap parameter. |
QOpenGLFunctions::FixedFunctionPipeline | 0x4000 | The fixed function pipeline is available. |
QOpenGLFunctions::TextureRGFormats | 0x8000 | The GL_RED and GL_RG texture formats are available. |
QOpenGLFunctions::MultipleRenderTargets | 0x10000 | Multiple color attachments to framebuffer objects are available. |
The OpenGLFeatures type is a typedef for QFlags<OpenGLFeature>. It stores an OR combination of OpenGLFeature values.
Member Function Documentation
QOpenGLFunctions::QOpenGLFunctions()
Constructs a default function resolver. The resolver cannot be used until initializeOpenGLFunctions() is called to specify the context.
See also initializeOpenGLFunctions().
QOpenGLFunctions::QOpenGLFunctions(QOpenGLContext *context)
Constructs a function resolver for context. If context is null, then the resolver will be created for the current QOpenGLContext.
The context or another context in the group must be current.
An object constructed in this way can only be used with context and other contexts that share with it. Use initializeOpenGLFunctions() to change the object's context association.
See also initializeOpenGLFunctions().
QOpenGLFunctions::~QOpenGLFunctions()
Destroys the instance of QOpenGLFunctions.
void QOpenGLFunctions::glActiveTexture(GLenum texture)
void QOpenGLFunctions::glAttachShader(GLuint program, GLuint shader)
void QOpenGLFunctions::glBindAttribLocation(GLuint program, GLuint index, const char *name)
void QOpenGLFunctions::glBindBuffer(GLenum target, GLuint buffer)
void QOpenGLFunctions::glBindFramebuffer(GLenum target, GLuint framebuffer)
void QOpenGLFunctions::glBindRenderbuffer(GLenum target, GLuint renderbuffer)
void QOpenGLFunctions::glBindTexture(GLenum target, GLuint texture)
void QOpenGLFunctions::glBlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
void QOpenGLFunctions::glBlendEquation(GLenum mode)
void QOpenGLFunctions::glBlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha)
void QOpenGLFunctions::glBlendFunc(GLenum sfactor, GLenum dfactor)
void QOpenGLFunctions::glBlendFuncSeparate(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha)
void QOpenGLFunctions::glBufferData(GLenum target, qopengl_GLsizeiptr size, const void *data, GLenum usage)
void QOpenGLFunctions::glBufferSubData(GLenum target, qopengl_GLintptr offset, qopengl_GLsizeiptr size, const void *data)
GLenum QOpenGLFunctions::glCheckFramebufferStatus(GLenum target)
void QOpenGLFunctions::glClear(GLbitfield mask)
void QOpenGLFunctions::glClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
void QOpenGLFunctions::glClearDepthf(GLclampf depth)
void QOpenGLFunctions::glClearStencil(GLint s)
void QOpenGLFunctions::glColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha)
void QOpenGLFunctions::glCompileShader(GLuint shader)
void QOpenGLFunctions::glCompressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data)
void QOpenGLFunctions::glCompressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data)
void QOpenGLFunctions::glCopyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border)
void QOpenGLFunctions::glCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height)
GLuint QOpenGLFunctions::glCreateProgram()
GLuint QOpenGLFunctions::glCreateShader(GLenum type)
void QOpenGLFunctions::glCullFace(GLenum mode)
void QOpenGLFunctions::glDeleteBuffers(GLsizei n, const GLuint *buffers)
void QOpenGLFunctions::glDeleteFramebuffers(GLsizei n, const GLuint *framebuffers)
void QOpenGLFunctions::glDeleteProgram(GLuint program)
void QOpenGLFunctions::glDeleteRenderbuffers(GLsizei n, const GLuint *renderbuffers)
void QOpenGLFunctions::glDeleteShader(GLuint shader)
void QOpenGLFunctions::glDeleteTextures(GLsizei n, const GLuint *textures)
void QOpenGLFunctions::glDepthFunc(GLenum func)
void QOpenGLFunctions::glDepthMask(GLboolean flag)
void QOpenGLFunctions::glDepthRangef(GLclampf zNear, GLclampf zFar)
void QOpenGLFunctions::glDetachShader(GLuint program, GLuint shader)
void QOpenGLFunctions::glDisable(GLenum cap)
void QOpenGLFunctions::glDisableVertexAttribArray(GLuint index)
void QOpenGLFunctions::glDrawArrays(GLenum mode, GLint first, GLsizei count)
void QOpenGLFunctions::glDrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices)
void QOpenGLFunctions::glEnable(GLenum cap)
void QOpenGLFunctions::glEnableVertexAttribArray(GLuint index)
void QOpenGLFunctions::glFinish()
void QOpenGLFunctions::glFlush()
void QOpenGLFunctions::glFramebufferRenderbuffer(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)
void QOpenGLFunctions::glFramebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
void QOpenGLFunctions::glFrontFace(GLenum mode)
void QOpenGLFunctions::glGenBuffers(GLsizei n, GLuint *buffers)
void QOpenGLFunctions::glGenFramebuffers(GLsizei n, GLuint *framebuffers)
void QOpenGLFunctions::glGenRenderbuffers(GLsizei n, GLuint *renderbuffers)
void QOpenGLFunctions::glGenTextures(GLsizei n, GLuint *textures)
void QOpenGLFunctions::glGenerateMipmap(GLenum target)
void QOpenGLFunctions::glGetActiveAttrib(GLuint program, GLuint index, GLsizei bufsize, GLsizei *length, GLint *size, GLenum *type, char *name)
void QOpenGLFunctions::glGetActiveUniform(GLuint program, GLuint index, GLsizei bufsize, GLsizei *length, GLint *size, GLenum *type, char *name)
void QOpenGLFunctions::glGetAttachedShaders(GLuint program, GLsizei maxcount, GLsizei *count, GLuint *shaders)
GLint QOpenGLFunctions::glGetAttribLocation(GLuint program, const char *name)
void QOpenGLFunctions::glGetBooleanv(GLenum pname, GLboolean *params)
void QOpenGLFunctions::glGetBufferParameteriv(GLenum target, GLenum pname, GLint *params)
GLenum QOpenGLFunctions::glGetError()
void QOpenGLFunctions::glGetFloatv(GLenum pname, GLfloat *params)
void QOpenGLFunctions::glGetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, GLenum pname, GLint *params)
void QOpenGLFunctions::glGetIntegerv(GLenum pname, GLint *params)
void QOpenGLFunctions::glGetProgramInfoLog(GLuint program, GLsizei bufsize, GLsizei *length, char *infolog)
void QOpenGLFunctions::glGetProgramiv(GLuint program, GLenum pname, GLint *params)
void QOpenGLFunctions::glGetRenderbufferParameteriv(GLenum target, GLenum pname, GLint *params)
void QOpenGLFunctions::glGetShaderInfoLog(GLuint shader, GLsizei bufsize, GLsizei *length, char *infolog)
void QOpenGLFunctions::glGetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision)
void QOpenGLFunctions::glGetShaderSource(GLuint shader, GLsizei bufsize, GLsizei *length, char *source)
void QOpenGLFunctions::glGetShaderiv(GLuint shader, GLenum pname, GLint *params)
const GLubyte *QOpenGLFunctions::glGetString(GLenum name)
void QOpenGLFunctions::glGetTexParameterfv(GLenum target, GLenum pname, GLfloat *params)
void QOpenGLFunctions::glGetTexParameteriv(GLenum target, GLenum pname, GLint *params)
GLint QOpenGLFunctions::glGetUniformLocation(GLuint program, const char *name)
void QOpenGLFunctions::glGetUniformfv(GLuint program, GLint location, GLfloat *params)
void QOpenGLFunctions::glGetUniformiv(GLuint program, GLint location, GLint *params)
void QOpenGLFunctions::glGetVertexAttribPointerv(GLuint index, GLenum pname, void **pointer)
void QOpenGLFunctions::glGetVertexAttribfv(GLuint index, GLenum pname, GLfloat *params)
void QOpenGLFunctions::glGetVertexAttribiv(GLuint index, GLenum pname, GLint *params)
void QOpenGLFunctions::glHint(GLenum target, GLenum mode)
GLboolean QOpenGLFunctions::glIsBuffer(GLuint buffer)
GLboolean QOpenGLFunctions::glIsEnabled(GLenum cap)
GLboolean QOpenGLFunctions::glIsFramebuffer(GLuint framebuffer)
GLboolean QOpenGLFunctions::glIsProgram(GLuint program)
GLboolean QOpenGLFunctions::glIsRenderbuffer(GLuint renderbuffer)
GLboolean QOpenGLFunctions::glIsShader(GLuint shader)
GLboolean QOpenGLFunctions::glIsTexture(GLuint texture)
void QOpenGLFunctions::glLineWidth(GLfloat width)
void QOpenGLFunctions::glLinkProgram(GLuint program)
void QOpenGLFunctions::glPixelStorei(GLenum pname, GLint param)
void QOpenGLFunctions::glPolygonOffset(GLfloat factor, GLfloat units)
void QOpenGLFunctions::glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels)
void QOpenGLFunctions::glReleaseShaderCompiler()
void QOpenGLFunctions::glRenderbufferStorage(GLenum target, GLenum internalformat, GLsizei width, GLsizei height)
void QOpenGLFunctions::glSampleCoverage(GLclampf value, GLboolean invert)
void QOpenGLFunctions::glScissor(GLint x, GLint y, GLsizei width, GLsizei height)
void QOpenGLFunctions::glShaderBinary(GLint n, const GLuint *shaders, GLenum binaryformat, const void *binary, GLint length)
void QOpenGLFunctions::glShaderSource(GLuint shader, GLsizei count, const char **string, const GLint *length)
void QOpenGLFunctions::glStencilFunc(GLenum func, GLint ref, GLuint mask)
void QOpenGLFunctions::glStencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask)
void QOpenGLFunctions::glStencilMask(GLuint mask)
void QOpenGLFunctions::glStencilMaskSeparate(GLenum face, GLuint mask)
void QOpenGLFunctions::glStencilOp(GLenum fail, GLenum zfail, GLenum zpass)
void QOpenGLFunctions::glStencilOpSeparate(GLenum face, GLenum fail, GLenum zfail, GLenum zpass)
void QOpenGLFunctions::glTexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels)
void QOpenGLFunctions::glTexParameterf(GLenum target, GLenum pname, GLfloat param)
void QOpenGLFunctions::glTexParameterfv(GLenum target, GLenum pname, const GLfloat *params)
void QOpenGLFunctions::glTexParameteri(GLenum target, GLenum pname, GLint param)
void QOpenGLFunctions::glTexParameteriv(GLenum target, GLenum pname, const GLint *params)
void QOpenGLFunctions::glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels)
void QOpenGLFunctions::glUniform1f(GLint location, GLfloat x)
void QOpenGLFunctions::glUniform1fv(GLint location, GLsizei count, const GLfloat *v)
void QOpenGLFunctions::glUniform1i(GLint location, GLint x)
void QOpenGLFunctions::glUniform1iv(GLint location, GLsizei count, const GLint *v)
void QOpenGLFunctions::glUniform2f(GLint location, GLfloat x, GLfloat y)
void QOpenGLFunctions::glUniform2fv(GLint location, GLsizei count, const GLfloat *v)
void QOpenGLFunctions::glUniform2i(GLint location, GLint x, GLint y)
void QOpenGLFunctions::glUniform2iv(GLint location, GLsizei count, const GLint *v)
void QOpenGLFunctions::glUniform3f(GLint location, GLfloat x, GLfloat y, GLfloat z)
void QOpenGLFunctions::glUniform3fv(GLint location, GLsizei count, const GLfloat *v)
void QOpenGLFunctions::glUniform3i(GLint location, GLint x, GLint y, GLint z)
void QOpenGLFunctions::glUniform3iv(GLint location, GLsizei count, const GLint *v)
void QOpenGLFunctions::glUniform4f(GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
void QOpenGLFunctions::glUniform4fv(GLint location, GLsizei count, const GLfloat *v)
void QOpenGLFunctions::glUniform4i(GLint location, GLint x, GLint y, GLint z, GLint w)
void QOpenGLFunctions::glUniform4iv(GLint location, GLsizei count, const GLint *v)
void QOpenGLFunctions::glUniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
void QOpenGLFunctions::glUniformMatrix3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
void QOpenGLFunctions::glUniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
void QOpenGLFunctions::glUseProgram(GLuint program)
void QOpenGLFunctions::glValidateProgram(GLuint program)
void QOpenGLFunctions::glVertexAttrib1f(GLuint indx, GLfloat x)
void QOpenGLFunctions::glVertexAttrib1fv(GLuint indx, const GLfloat *values)
void QOpenGLFunctions::glVertexAttrib2f(GLuint indx, GLfloat x, GLfloat y)
void QOpenGLFunctions::glVertexAttrib2fv(GLuint indx, const GLfloat *values)
void QOpenGLFunctions::glVertexAttrib3f(GLuint indx, GLfloat x, GLfloat y, GLfloat z)
void QOpenGLFunctions::glVertexAttrib3fv(GLuint indx, const GLfloat *values)
void QOpenGLFunctions::glVertexAttrib4f(GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
void QOpenGLFunctions::glVertexAttrib4fv(GLuint indx, const GLfloat *values)
void QOpenGLFunctions::glVertexAttribPointer(GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *ptr)
void QOpenGLFunctions::glViewport(GLint x, GLint y, GLsizei width, GLsizei height)
bool QOpenGLFunctions::hasOpenGLFeature(QOpenGLFunctions::OpenGLFeature feature) const
Returns true
if feature is present on this system's OpenGL implementation; false otherwise.
It is assumed that the QOpenGLContext associated with this function resolver is current.
See also openGLFeatures().
void QOpenGLFunctions::initializeGLFunctions()
void QOpenGLFunctions::initializeOpenGLFunctions()
Initializes OpenGL function resolution for the current context.
After calling this function, the QOpenGLFunctions object can only be used with the current context and other contexts that share with it. Call initializeOpenGLFunctions() again to change the object's context association.
[static protected]
bool QOpenGLFunctions::isInitialized(const QOpenGLFunctionsPrivate *d)
QOpenGLFunctions::OpenGLFeatures QOpenGLFunctions::openGLFeatures() const
Returns the set of features that are present on this system's OpenGL implementation.
It is assumed that the QOpenGLContext associated with this function resolver is current.
See also hasOpenGLFeature().