Viadeo Twitter Google Bookmarks ! Facebook Digg del.icio.us MySpace Yahoo MyWeb Blinklist Netvouz Reddit Simpy StumbleUpon Bookmarks Windows Live Favorites 
Logo Documentation Qt ·  Page d'accueil  ·  Toutes les classes  ·  Classes principales  ·  Annotées  ·  Classes groupées  ·  Modules  ·  Fonctions  · 

QOpenGLFunctions Class

The QOpenGLFunctions class provides cross-platform access to the OpenGL/ES 2.0 API. More...

 #include <QOpenGLFunctions>

Inherited by: QGLPainter.

This class was introduced in Qt 5.0.

Public Types

enum OpenGLFeature { Multitexture, Shaders, Buffers, Framebuffers, ..., NPOTTextures }
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 glBlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
void glBlendEquation(GLenum mode)
void glBlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha)
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 glClearDepthf(GLclampf depth)
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)
GLuint glCreateProgram()
GLuint glCreateShader(GLenum type)
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 glDepthRangef(GLclampf zNear, GLclampf zFar)
void glDetachShader(GLuint program, GLuint shader)
void glDisableVertexAttribArray(GLuint index)
void glEnableVertexAttribArray(GLuint index)
void glFramebufferRenderbuffer(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)
void glFramebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
void glGenBuffers(GLsizei n, GLuint * buffers)
void glGenFramebuffers(GLsizei n, GLuint * framebuffers)
void glGenRenderbuffers(GLsizei n, GLuint * renderbuffers)
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 glGetBufferParameteriv(GLenum target, GLenum pname, GLint * params)
void glGetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, 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)
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)
GLboolean glIsBuffer(GLuint buffer)
GLboolean glIsFramebuffer(GLuint framebuffer)
GLboolean glIsProgram(GLuint program)
GLboolean glIsRenderbuffer(GLuint renderbuffer)
GLboolean glIsShader(GLuint shader)
void glLinkProgram(GLuint program)
void glReleaseShaderCompiler()
void glRenderbufferStorage(GLenum target, GLenum internalformat, GLsizei width, GLsizei height)
void glSampleCoverage(GLclampf value, GLboolean invert)
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 glStencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask)
void glStencilMaskSeparate(GLenum face, GLuint mask)
void glStencilOpSeparate(GLenum face, GLenum fail, GLenum zfail, GLenum zpass)
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)
bool hasOpenGLFeature(QOpenGLFunctions::OpenGLFeature feature) const
void initializeGLFunctions()
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 MyGLWidget : public QOpenGLWidget, protected QOpenGLFunctions
 {
     Q_OBJECT
 public:
     MyGLWidget(QWidget *parent = 0) : QOpenGLWidget(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);
     ...
 }

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);

QOpenGLFunctions 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 QOpenGLFunctions 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:

 QOpenGLFunctions funcs(QOpenGLContext::currentContext());
 bool npot = funcs.hasOpenGLFeature(QOpenGLFunctions::NPOTTextures);

Member Type Documentation

enum QOpenGLFunctions::OpenGLFeature
flags QOpenGLFunctions::OpenGLFeatures

This enum defines OpenGL/ES 2.0 features that may be optional on other platforms.

ConstantValueDescription
QOpenGLFunctions::Multitexture0x0001glActiveTexture() function is available.
QOpenGLFunctions::Shaders0x0002Shader functions are available.
QOpenGLFunctions::Buffers0x0004Vertex and index buffer functions are available.
QOpenGLFunctions::Framebuffers0x0008Framebuffer object functions are available.
QOpenGLFunctions::BlendColor0x0010glBlendColor() is available.
QOpenGLFunctions::BlendEquation0x0020glBlendEquation() is available.
QOpenGLFunctions::BlendEquationSeparate0x0040glBlendEquationSeparate() is available.
QOpenGLFunctions::BlendFuncSeparate0x0080glBlendFuncSeparate() is available.
QOpenGLFunctions::BlendSubtract0x0100Blend subtract mode is available.
QOpenGLFunctions::CompressedTextures0x0200Compressed texture functions are available.
QOpenGLFunctions::Multisample0x0400glSampleCoverage() function is available.
QOpenGLFunctions::StencilSeparate0x0800Separate stencil functions are available.
QOpenGLFunctions::NPOTTextures0x1000Non power of two textures 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 initializeGLFunctions() is called to specify the context.

See also initializeGLFunctions().

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 initializeGLFunctions() to change the object's context association.

See also initializeGLFunctions().

QOpenGLFunctions::~QOpenGLFunctions()

Destroys this function resolver.

void QOpenGLFunctions::glActiveTexture(GLenum texture)

Convenience function that calls glActiveTexture(texture).

For more information, see the OpenGL/ES 2.0 documentation for glActiveTexture().

void QOpenGLFunctions::glAttachShader(GLuint program, GLuint shader)

Convenience function that calls glAttachShader(program, shader).

For more information, see the OpenGL/ES 2.0 documentation for glAttachShader().

This convenience function will do nothing on OpenGL/ES 1.x systems.

void QOpenGLFunctions::glBindAttribLocation(GLuint program, GLuint index, const char * name)

Convenience function that calls glBindAttribLocation(program, index, name).

For more information, see the OpenGL/ES 2.0 documentation for glBindAttribLocation().

This convenience function will do nothing on OpenGL/ES 1.x systems.

void QOpenGLFunctions::glBindBuffer(GLenum target, GLuint buffer)

Convenience function that calls glBindBuffer(target, buffer).

For more information, see the OpenGL/ES 2.0 documentation for glBindBuffer().

void QOpenGLFunctions::glBindFramebuffer(GLenum target, GLuint framebuffer)

Convenience function that calls glBindFramebuffer(target, framebuffer).

Note that Qt will translate a framebuffer argument of 0 to the currently bound QOpenGLContext's defaultFramebufferObject().

For more information, see the OpenGL/ES 2.0 documentation for glBindFramebuffer().

void QOpenGLFunctions::glBindRenderbuffer(GLenum target, GLuint renderbuffer)

Convenience function that calls glBindRenderbuffer(target, renderbuffer).

For more information, see the OpenGL/ES 2.0 documentation for glBindRenderbuffer().

void QOpenGLFunctions::glBlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)

Convenience function that calls glBlendColor(red, green, blue, alpha).

For more information, see the OpenGL/ES 2.0 documentation for glBlendColor().

void QOpenGLFunctions::glBlendEquation(GLenum mode)

Convenience function that calls glBlendEquation(mode).

For more information, see the OpenGL/ES 2.0 documentation for glBlendEquation().

void QOpenGLFunctions::glBlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha)

Convenience function that calls glBlendEquationSeparate(modeRGB, modeAlpha).

For more information, see the OpenGL/ES 2.0 documentation for glBlendEquationSeparate().

void QOpenGLFunctions::glBlendFuncSeparate(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha)

Convenience function that calls glBlendFuncSeparate(srcRGB, dstRGB, srcAlpha, dstAlpha).

For more information, see the OpenGL/ES 2.0 documentation for glBlendFuncSeparate().

void QOpenGLFunctions::glBufferData(GLenum target, qopengl_GLsizeiptr size, const void * data, GLenum usage)

Convenience function that calls glBufferData(target, size, data, usage).

For more information, see the OpenGL/ES 2.0 documentation for glBufferData().

void QOpenGLFunctions::glBufferSubData(GLenum target, qopengl_GLintptr offset, qopengl_GLsizeiptr size, const void * data)

Convenience function that calls glBufferSubData(target, offset, size, data).

For more information, see the OpenGL/ES 2.0 documentation for glBufferSubData().

GLenum QOpenGLFunctions::glCheckFramebufferStatus(GLenum target)

Convenience function that calls glCheckFramebufferStatus(target).

For more information, see the OpenGL/ES 2.0 documentation for glCheckFramebufferStatus().

void QOpenGLFunctions::glClearDepthf(GLclampf depth)

Convenience function that calls glClearDepth(depth) on desktop OpenGL systems and glClearDepthf(depth) on embedded OpenGL/ES systems.

For more information, see the OpenGL/ES 2.0 documentation for glClearDepthf().

void QOpenGLFunctions::glCompileShader(GLuint shader)

Convenience function that calls glCompileShader(shader).

For more information, see the OpenGL/ES 2.0 documentation for glCompileShader().

This convenience function will do nothing on OpenGL/ES 1.x systems.

void QOpenGLFunctions::glCompressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void * data)

Convenience function that calls glCompressedTexImage2D(target, level, internalformat, width, height, border, imageSize, data).

For more information, see the OpenGL/ES 2.0 documentation for glCompressedTexImage2D().

void QOpenGLFunctions::glCompressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void * data)

Convenience function that calls glCompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, data).

For more information, see the OpenGL/ES 2.0 documentation for glCompressedTexSubImage2D().

GLuint QOpenGLFunctions::glCreateProgram()

Convenience function that calls glCreateProgram().

For more information, see the OpenGL/ES 2.0 documentation for glCreateProgram().

This convenience function will do nothing on OpenGL/ES 1.x systems.

GLuint QOpenGLFunctions::glCreateShader(GLenum type)

Convenience function that calls glCreateShader(type).

For more information, see the OpenGL/ES 2.0 documentation for glCreateShader().

This convenience function will do nothing on OpenGL/ES 1.x systems.

void QOpenGLFunctions::glDeleteBuffers(GLsizei n, const GLuint * buffers)

Convenience function that calls glDeleteBuffers(n, buffers).

For more information, see the OpenGL/ES 2.0 documentation for glDeleteBuffers().

void QOpenGLFunctions::glDeleteFramebuffers(GLsizei n, const GLuint * framebuffers)

Convenience function that calls glDeleteFramebuffers(n, framebuffers).

For more information, see the OpenGL/ES 2.0 documentation for glDeleteFramebuffers().

void QOpenGLFunctions::glDeleteProgram(GLuint program)

Convenience function that calls glDeleteProgram(program).

For more information, see the OpenGL/ES 2.0 documentation for glDeleteProgram().

This convenience function will do nothing on OpenGL/ES 1.x systems.

void QOpenGLFunctions::glDeleteRenderbuffers(GLsizei n, const GLuint * renderbuffers)

Convenience function that calls glDeleteRenderbuffers(n, renderbuffers).

For more information, see the OpenGL/ES 2.0 documentation for glDeleteRenderbuffers().

void QOpenGLFunctions::glDeleteShader(GLuint shader)

Convenience function that calls glDeleteShader(shader).

For more information, see the OpenGL/ES 2.0 documentation for glDeleteShader().

This convenience function will do nothing on OpenGL/ES 1.x systems.

void QOpenGLFunctions::glDepthRangef(GLclampf zNear, GLclampf zFar)

Convenience function that calls glDepthRange(zNear, zFar) on desktop OpenGL systems and glDepthRangef(zNear, zFar) on embedded OpenGL/ES systems.

For more information, see the OpenGL/ES 2.0 documentation for glDepthRangef().

void QOpenGLFunctions::glDetachShader(GLuint program, GLuint shader)

Convenience function that calls glDetachShader(program, shader).

For more information, see the OpenGL/ES 2.0 documentation for glDetachShader().

This convenience function will do nothing on OpenGL/ES 1.x systems.

void QOpenGLFunctions::glDisableVertexAttribArray(GLuint index)

Convenience function that calls glDisableVertexAttribArray(index).

For more information, see the OpenGL/ES 2.0 documentation for glDisableVertexAttribArray().

This convenience function will do nothing on OpenGL/ES 1.x systems.

void QOpenGLFunctions::glEnableVertexAttribArray(GLuint index)

Convenience function that calls glEnableVertexAttribArray(index).

For more information, see the OpenGL/ES 2.0 documentation for glEnableVertexAttribArray().

This convenience function will do nothing on OpenGL/ES 1.x systems.

void QOpenGLFunctions::glFramebufferRenderbuffer(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)

Convenience function that calls glFramebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer).

For more information, see the OpenGL/ES 2.0 documentation for glFramebufferRenderbuffer().

void QOpenGLFunctions::glFramebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)

Convenience function that calls glFramebufferTexture2D(target, attachment, textarget, texture, level).

For more information, see the OpenGL/ES 2.0 documentation for glFramebufferTexture2D().

void QOpenGLFunctions::glGenBuffers(GLsizei n, GLuint * buffers)

Convenience function that calls glGenBuffers(n, buffers).

For more information, see the OpenGL/ES 2.0 documentation for glGenBuffers().

void QOpenGLFunctions::glGenFramebuffers(GLsizei n, GLuint * framebuffers)

Convenience function that calls glGenFramebuffers(n, framebuffers).

For more information, see the OpenGL/ES 2.0 documentation for glGenFramebuffers().

void QOpenGLFunctions::glGenRenderbuffers(GLsizei n, GLuint * renderbuffers)

Convenience function that calls glGenRenderbuffers(n, renderbuffers).

For more information, see the OpenGL/ES 2.0 documentation for glGenRenderbuffers().

void QOpenGLFunctions::glGenerateMipmap(GLenum target)

Convenience function that calls glGenerateMipmap(target).

For more information, see the OpenGL/ES 2.0 documentation for glGenerateMipmap().

void QOpenGLFunctions::glGetActiveAttrib(GLuint program, GLuint index, GLsizei bufsize, GLsizei * length, GLint * size, GLenum * type, char * name)

Convenience function that calls glGetActiveAttrib(program, index, bufsize, length, size, type, name).

For more information, see the OpenGL/ES 2.0 documentation for glGetActiveAttrib().

This convenience function will do nothing on OpenGL/ES 1.x systems.

void QOpenGLFunctions::glGetActiveUniform(GLuint program, GLuint index, GLsizei bufsize, GLsizei * length, GLint * size, GLenum * type, char * name)

Convenience function that calls glGetActiveUniform(program, index, bufsize, length, size, type, name).

For more information, see the OpenGL/ES 2.0 documentation for glGetActiveUniform().

This convenience function will do nothing on OpenGL/ES 1.x systems.

void QOpenGLFunctions::glGetAttachedShaders(GLuint program, GLsizei maxcount, GLsizei * count, GLuint * shaders)

Convenience function that calls glGetAttachedShaders(program, maxcount, count, shaders).

For more information, see the OpenGL/ES 2.0 documentation for glGetAttachedShaders().

This convenience function will do nothing on OpenGL/ES 1.x systems.

GLint QOpenGLFunctions::glGetAttribLocation(GLuint program, const char * name)

Convenience function that calls glGetAttribLocation(program, name).

For more information, see the OpenGL/ES 2.0 documentation for glGetAttribLocation().

This convenience function will do nothing on OpenGL/ES 1.x systems.

void QOpenGLFunctions::glGetBufferParameteriv(GLenum target, GLenum pname, GLint * params)

Convenience function that calls glGetBufferParameteriv(target, pname, params).

For more information, see the OpenGL/ES 2.0 documentation for glGetBufferParameteriv().

void QOpenGLFunctions::glGetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, GLenum pname, GLint * params)

Convenience function that calls glGetFramebufferAttachmentParameteriv(target, attachment, pname, params).

For more information, see the OpenGL/ES 2.0 documentation for glGetFramebufferAttachmentParameteriv().

void QOpenGLFunctions::glGetProgramInfoLog(GLuint program, GLsizei bufsize, GLsizei * length, char * infolog)

Convenience function that calls glGetProgramInfoLog(program, bufsize, length, infolog).

For more information, see the OpenGL/ES 2.0 documentation for glGetProgramInfoLog().

This convenience function will do nothing on OpenGL/ES 1.x systems.

void QOpenGLFunctions::glGetProgramiv(GLuint program, GLenum pname, GLint * params)

Convenience function that calls glGetProgramiv(program, pname, params).

For more information, see the OpenGL/ES 2.0 documentation for glGetProgramiv().

This convenience function will do nothing on OpenGL/ES 1.x systems.

void QOpenGLFunctions::glGetRenderbufferParameteriv(GLenum target, GLenum pname, GLint * params)

Convenience function that calls glGetRenderbufferParameteriv(target, pname, params).

For more information, see the OpenGL/ES 2.0 documentation for glGetRenderbufferParameteriv().

void QOpenGLFunctions::glGetShaderInfoLog(GLuint shader, GLsizei bufsize, GLsizei * length, char * infolog)

Convenience function that calls glGetShaderInfoLog(shader, bufsize, length, infolog).

For more information, see the OpenGL/ES 2.0 documentation for glGetShaderInfoLog().

This convenience function will do nothing on OpenGL/ES 1.x systems.

void QOpenGLFunctions::glGetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype, GLint * range, GLint * precision)

Convenience function that calls glGetShaderPrecisionFormat(shadertype, precisiontype, range, precision).

For more information, see the OpenGL/ES 2.0 documentation for glGetShaderPrecisionFormat().

This convenience function will do nothing on OpenGL/ES 1.x systems.

void QOpenGLFunctions::glGetShaderSource(GLuint shader, GLsizei bufsize, GLsizei * length, char * source)

Convenience function that calls glGetShaderSource(shader, bufsize, length, source).

For more information, see the OpenGL/ES 2.0 documentation for glGetShaderSource().

This convenience function will do nothing on OpenGL/ES 1.x systems.

void QOpenGLFunctions::glGetShaderiv(GLuint shader, GLenum pname, GLint * params)

Convenience function that calls glGetShaderiv(shader, pname, params).

For more information, see the OpenGL/ES 2.0 documentation for glGetShaderiv().

This convenience function will do nothing on OpenGL/ES 1.x systems.

GLint QOpenGLFunctions::glGetUniformLocation(GLuint program, const char * name)

Convenience function that calls glGetUniformLocation(program, name).

For more information, see the OpenGL/ES 2.0 documentation for glGetUniformLocation().

This convenience function will do nothing on OpenGL/ES 1.x systems.

void QOpenGLFunctions::glGetUniformfv(GLuint program, GLint location, GLfloat * params)

Convenience function that calls glGetUniformfv(program, location, params).

For more information, see the OpenGL/ES 2.0 documentation for glGetUniformfv().

This convenience function will do nothing on OpenGL/ES 1.x systems.

void QOpenGLFunctions::glGetUniformiv(GLuint program, GLint location, GLint * params)

Convenience function that calls glGetUniformiv(program, location, params).

For more information, see the OpenGL/ES 2.0 documentation for glGetUniformiv().

This convenience function will do nothing on OpenGL/ES 1.x systems.

void QOpenGLFunctions::glGetVertexAttribPointerv(GLuint index, GLenum pname, void ** pointer)

Convenience function that calls glGetVertexAttribPointerv(index, pname, pointer).

For more information, see the OpenGL/ES 2.0 documentation for glGetVertexAttribPointerv().

This convenience function will do nothing on OpenGL/ES 1.x systems.

void QOpenGLFunctions::glGetVertexAttribfv(GLuint index, GLenum pname, GLfloat * params)

Convenience function that calls glGetVertexAttribfv(index, pname, params).

For more information, see the OpenGL/ES 2.0 documentation for glGetVertexAttribfv().

This convenience function will do nothing on OpenGL/ES 1.x systems.

void QOpenGLFunctions::glGetVertexAttribiv(GLuint index, GLenum pname, GLint * params)

Convenience function that calls glGetVertexAttribiv(index, pname, params).

For more information, see the OpenGL/ES 2.0 documentation for glGetVertexAttribiv().

This convenience function will do nothing on OpenGL/ES 1.x systems.

GLboolean QOpenGLFunctions::glIsBuffer(GLuint buffer)

Convenience function that calls glIsBuffer(buffer).

For more information, see the OpenGL/ES 2.0 documentation for glIsBuffer().

GLboolean QOpenGLFunctions::glIsFramebuffer(GLuint framebuffer)

Convenience function that calls glIsFramebuffer(framebuffer).

For more information, see the OpenGL/ES 2.0 documentation for glIsFramebuffer().

GLboolean QOpenGLFunctions::glIsProgram(GLuint program)

Convenience function that calls glIsProgram(program).

For more information, see the OpenGL/ES 2.0 documentation for glIsProgram().

This convenience function will do nothing on OpenGL/ES 1.x systems.

GLboolean QOpenGLFunctions::glIsRenderbuffer(GLuint renderbuffer)

Convenience function that calls glIsRenderbuffer(renderbuffer).

For more information, see the OpenGL/ES 2.0 documentation for glIsRenderbuffer().

GLboolean QOpenGLFunctions::glIsShader(GLuint shader)

Convenience function that calls glIsShader(shader).

For more information, see the OpenGL/ES 2.0 documentation for glIsShader().

This convenience function will do nothing on OpenGL/ES 1.x systems.

void QOpenGLFunctions::glLinkProgram(GLuint program)

Convenience function that calls glLinkProgram(program).

For more information, see the OpenGL/ES 2.0 documentation for glLinkProgram().

This convenience function will do nothing on OpenGL/ES 1.x systems.

void QOpenGLFunctions::glReleaseShaderCompiler()

Convenience function that calls glReleaseShaderCompiler().

For more information, see the OpenGL/ES 2.0 documentation for glReleaseShaderCompiler().

This convenience function will do nothing on OpenGL/ES 1.x systems.

void QOpenGLFunctions::glRenderbufferStorage(GLenum target, GLenum internalformat, GLsizei width, GLsizei height)

Convenience function that calls glRenderbufferStorage(target, internalformat, width, height).

For more information, see the OpenGL/ES 2.0 documentation for glRenderbufferStorage().

void QOpenGLFunctions::glSampleCoverage(GLclampf value, GLboolean invert)

Convenience function that calls glSampleCoverage(value, invert).

For more information, see the OpenGL/ES 2.0 documentation for glSampleCoverage().

void QOpenGLFunctions::glShaderBinary(GLint n, const GLuint * shaders, GLenum binaryformat, const void * binary, GLint length)

Convenience function that calls glShaderBinary(n, shaders, binaryformat, binary, length).

For more information, see the OpenGL/ES 2.0 documentation for glShaderBinary().

This convenience function will do nothing on OpenGL/ES 1.x systems.

void QOpenGLFunctions::glShaderSource(GLuint shader, GLsizei count, const char ** string, const GLint * length)

Convenience function that calls glShaderSource(shader, count, string, length).

For more information, see the OpenGL/ES 2.0 documentation for glShaderSource().

This convenience function will do nothing on OpenGL/ES 1.x systems.

void QOpenGLFunctions::glStencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask)

Convenience function that calls glStencilFuncSeparate(face, func, ref, mask).

For more information, see the OpenGL/ES 2.0 documentation for glStencilFuncSeparate().

void QOpenGLFunctions::glStencilMaskSeparate(GLenum face, GLuint mask)

Convenience function that calls glStencilMaskSeparate(face, mask).

For more information, see the OpenGL/ES 2.0 documentation for glStencilMaskSeparate().

void QOpenGLFunctions::glStencilOpSeparate(GLenum face, GLenum fail, GLenum zfail, GLenum zpass)

Convenience function that calls glStencilOpSeparate(face, fail, zfail, zpass).

For more information, see the OpenGL/ES 2.0 documentation for glStencilOpSeparate().

void QOpenGLFunctions::glUniform1f(GLint location, GLfloat x)

Convenience function that calls glUniform1f(location, x).

For more information, see the OpenGL/ES 2.0 documentation for glUniform1f().

This convenience function will do nothing on OpenGL/ES 1.x systems.

void QOpenGLFunctions::glUniform1fv(GLint location, GLsizei count, const GLfloat * v)

Convenience function that calls glUniform1fv(location, count, v).

For more information, see the OpenGL/ES 2.0 documentation for glUniform1fv().

This convenience function will do nothing on OpenGL/ES 1.x systems.

void QOpenGLFunctions::glUniform1i(GLint location, GLint x)

Convenience function that calls glUniform1i(location, x).

For more information, see the OpenGL/ES 2.0 documentation for glUniform1i().

This convenience function will do nothing on OpenGL/ES 1.x systems.

void QOpenGLFunctions::glUniform1iv(GLint location, GLsizei count, const GLint * v)

Convenience function that calls glUniform1iv(location, count, v).

For more information, see the OpenGL/ES 2.0 documentation for glUniform1iv().

This convenience function will do nothing on OpenGL/ES 1.x systems.

void QOpenGLFunctions::glUniform2f(GLint location, GLfloat x, GLfloat y)

Convenience function that calls glUniform2f(location, x, y).

For more information, see the OpenGL/ES 2.0 documentation for glUniform2f().

This convenience function will do nothing on OpenGL/ES 1.x systems.

void QOpenGLFunctions::glUniform2fv(GLint location, GLsizei count, const GLfloat * v)

Convenience function that calls glUniform2fv(location, count, v).

For more information, see the OpenGL/ES 2.0 documentation for glUniform2fv().

This convenience function will do nothing on OpenGL/ES 1.x systems.

void QOpenGLFunctions::glUniform2i(GLint location, GLint x, GLint y)

Convenience function that calls glUniform2i(location, x, y).

For more information, see the OpenGL/ES 2.0 documentation for glUniform2i().

This convenience function will do nothing on OpenGL/ES 1.x systems.

void QOpenGLFunctions::glUniform2iv(GLint location, GLsizei count, const GLint * v)

Convenience function that calls glUniform2iv(location, count, v).

For more information, see the OpenGL/ES 2.0 documentation for glUniform2iv().

This convenience function will do nothing on OpenGL/ES 1.x systems.

void QOpenGLFunctions::glUniform3f(GLint location, GLfloat x, GLfloat y, GLfloat z)

Convenience function that calls glUniform3f(location, x, y, z).

For more information, see the OpenGL/ES 2.0 documentation for glUniform3f().

This convenience function will do nothing on OpenGL/ES 1.x systems.

void QOpenGLFunctions::glUniform3fv(GLint location, GLsizei count, const GLfloat * v)

Convenience function that calls glUniform3fv(location, count, v).

For more information, see the OpenGL/ES 2.0 documentation for glUniform3fv().

This convenience function will do nothing on OpenGL/ES 1.x systems.

void QOpenGLFunctions::glUniform3i(GLint location, GLint x, GLint y, GLint z)

Convenience function that calls glUniform3i(location, x, y, z).

For more information, see the OpenGL/ES 2.0 documentation for glUniform3i().

This convenience function will do nothing on OpenGL/ES 1.x systems.

void QOpenGLFunctions::glUniform3iv(GLint location, GLsizei count, const GLint * v)

Convenience function that calls glUniform3iv(location, count, v).

For more information, see the OpenGL/ES 2.0 documentation for glUniform3iv().

This convenience function will do nothing on OpenGL/ES 1.x systems.

void QOpenGLFunctions::glUniform4f(GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w)

Convenience function that calls glUniform4f(location, x, y, z, w).

For more information, see the OpenGL/ES 2.0 documentation for glUniform4f().

This convenience function will do nothing on OpenGL/ES 1.x systems.

void QOpenGLFunctions::glUniform4fv(GLint location, GLsizei count, const GLfloat * v)

Convenience function that calls glUniform4fv(location, count, v).

For more information, see the OpenGL/ES 2.0 documentation for glUniform4fv().

This convenience function will do nothing on OpenGL/ES 1.x systems.

void QOpenGLFunctions::glUniform4i(GLint location, GLint x, GLint y, GLint z, GLint w)

Convenience function that calls glUniform4i(location, x, y, z, w).

For more information, see the OpenGL/ES 2.0 documentation for glUniform4i().

This convenience function will do nothing on OpenGL/ES 1.x systems.

void QOpenGLFunctions::glUniform4iv(GLint location, GLsizei count, const GLint * v)

Convenience function that calls glUniform4iv(location, count, v).

For more information, see the OpenGL/ES 2.0 documentation for glUniform4iv().

This convenience function will do nothing on OpenGL/ES 1.x systems.

void QOpenGLFunctions::glUniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value)

Convenience function that calls glUniformMatrix2fv(location, count, transpose, value).

For more information, see the OpenGL/ES 2.0 documentation for glUniformMatrix2fv().

This convenience function will do nothing on OpenGL/ES 1.x systems.

void QOpenGLFunctions::glUniformMatrix3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value)

Convenience function that calls glUniformMatrix3fv(location, count, transpose, value).

For more information, see the OpenGL/ES 2.0 documentation for glUniformMatrix3fv().

This convenience function will do nothing on OpenGL/ES 1.x systems.

void QOpenGLFunctions::glUniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value)

Convenience function that calls glUniformMatrix4fv(location, count, transpose, value).

For more information, see the OpenGL/ES 2.0 documentation for glUniformMatrix4fv().

This convenience function will do nothing on OpenGL/ES 1.x systems.

void QOpenGLFunctions::glUseProgram(GLuint program)

Convenience function that calls glUseProgram(program).

For more information, see the OpenGL/ES 2.0 documentation for glUseProgram().

This convenience function will do nothing on OpenGL/ES 1.x systems.

void QOpenGLFunctions::glValidateProgram(GLuint program)

Convenience function that calls glValidateProgram(program).

For more information, see the OpenGL/ES 2.0 documentation for glValidateProgram().

This convenience function will do nothing on OpenGL/ES 1.x systems.

void QOpenGLFunctions::glVertexAttrib1f(GLuint indx, GLfloat x)

Convenience function that calls glVertexAttrib1f(indx, x).

For more information, see the OpenGL/ES 2.0 documentation for glVertexAttrib1f().

This convenience function will do nothing on OpenGL/ES 1.x systems.

void QOpenGLFunctions::glVertexAttrib1fv(GLuint indx, const GLfloat * values)

Convenience function that calls glVertexAttrib1fv(indx, values).

For more information, see the OpenGL/ES 2.0 documentation for glVertexAttrib1fv().

This convenience function will do nothing on OpenGL/ES 1.x systems.

void QOpenGLFunctions::glVertexAttrib2f(GLuint indx, GLfloat x, GLfloat y)

Convenience function that calls glVertexAttrib2f(indx, x, y).

For more information, see the OpenGL/ES 2.0 documentation for glVertexAttrib2f().

This convenience function will do nothing on OpenGL/ES 1.x systems.

void QOpenGLFunctions::glVertexAttrib2fv(GLuint indx, const GLfloat * values)

Convenience function that calls glVertexAttrib2fv(indx, values).

For more information, see the OpenGL/ES 2.0 documentation for glVertexAttrib2fv().

This convenience function will do nothing on OpenGL/ES 1.x systems.

void QOpenGLFunctions::glVertexAttrib3f(GLuint indx, GLfloat x, GLfloat y, GLfloat z)

Convenience function that calls glVertexAttrib3f(indx, x, y, z).

For more information, see the OpenGL/ES 2.0 documentation for glVertexAttrib3f().

This convenience function will do nothing on OpenGL/ES 1.x systems.

void QOpenGLFunctions::glVertexAttrib3fv(GLuint indx, const GLfloat * values)

Convenience function that calls glVertexAttrib3fv(indx, values).

For more information, see the OpenGL/ES 2.0 documentation for glVertexAttrib3fv().

This convenience function will do nothing on OpenGL/ES 1.x systems.

void QOpenGLFunctions::glVertexAttrib4f(GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w)

Convenience function that calls glVertexAttrib4f(indx, x, y, z, w).

For more information, see the OpenGL/ES 2.0 documentation for glVertexAttrib4f().

This convenience function will do nothing on OpenGL/ES 1.x systems.

void QOpenGLFunctions::glVertexAttrib4fv(GLuint indx, const GLfloat * values)

Convenience function that calls glVertexAttrib4fv(indx, values).

For more information, see the OpenGL/ES 2.0 documentation for glVertexAttrib4fv().

This convenience function will do nothing on OpenGL/ES 1.x systems.

void QOpenGLFunctions::glVertexAttribPointer(GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void * ptr)

Convenience function that calls glVertexAttribPointer(indx, size, type, normalized, stride, ptr).

For more information, see the OpenGL/ES 2.0 documentation for glVertexAttribPointer().

This convenience function will do nothing on OpenGL/ES 1.x systems.

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()

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 initializeGLFunctions() again to change the object's context association.

bool QOpenGLFunctions::isInitialized(const QOpenGLFunctionsPrivate * d) [static protected]

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().

Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. Qt 5.0-snapshot
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD.
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP !
 
 
 
 
Partenaires

Hébergement Web