#[repr(C)]
pub struct QOpenGLFunctions { /* private fields */ }
Expand description

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

C++ class: QOpenGLFunctions.

C++ documentation:

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

Implementations§

source§

impl QOpenGLFunctions

source

pub unsafe fn copy_from( &self, other: impl CastInto<Ref<QOpenGLFunctions>> ) -> Ref<QOpenGLFunctions>

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

Calls C++ function: QOpenGLFunctions& QOpenGLFunctions::operator=(const QOpenGLFunctions& other).

C++ documentation:

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

source

pub unsafe fn gl_active_texture(&self, texture: c_uint)

Convenience function that calls glActiveTexture(texture).

Calls C++ function: void QOpenGLFunctions::glActiveTexture(unsigned int texture).

C++ documentation:

Convenience function that calls glActiveTexture(texture).

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

source

pub unsafe fn gl_attach_shader(&self, program: u32, shader: u32)

Convenience function that calls glAttachShader(program, shader).

Calls C++ function: void QOpenGLFunctions::glAttachShader(GLuint program, GLuint shader).

C++ documentation:

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.

source

pub unsafe fn gl_bind_attrib_location( &self, program: u32, index: u32, name: *const c_char )

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

Calls C++ function: void QOpenGLFunctions::glBindAttribLocation(GLuint program, GLuint index, const char* name).

C++ documentation:

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.

source

pub unsafe fn gl_bind_buffer(&self, target: c_uint, buffer: u32)

Convenience function that calls glBindBuffer(target, buffer).

Calls C++ function: void QOpenGLFunctions::glBindBuffer(unsigned int target, GLuint buffer).

C++ documentation:

Convenience function that calls glBindBuffer(target, buffer).

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

source

pub unsafe fn gl_bind_framebuffer(&self, target: c_uint, framebuffer: u32)

Convenience function that calls glBindFramebuffer(target, framebuffer).

Calls C++ function: void QOpenGLFunctions::glBindFramebuffer(unsigned int target, GLuint framebuffer).

C++ documentation:

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

source

pub unsafe fn gl_bind_renderbuffer(&self, target: c_uint, renderbuffer: u32)

Convenience function that calls glBindRenderbuffer(target, renderbuffer).

Calls C++ function: void QOpenGLFunctions::glBindRenderbuffer(unsigned int target, GLuint renderbuffer).

C++ documentation:

Convenience function that calls glBindRenderbuffer(target, renderbuffer).

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

source

pub unsafe fn gl_bind_texture(&self, target: c_uint, texture: u32)

Convenience function that calls glBindTexture(target, texture).

Calls C++ function: void QOpenGLFunctions::glBindTexture(unsigned int target, GLuint texture).

C++ documentation:

Convenience function that calls glBindTexture(target, texture).

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

This function was introduced in Qt 5.3.

source

pub unsafe fn gl_blend_color( &self, red: c_float, green: c_float, blue: c_float, alpha: c_float )

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

Calls C++ function: void QOpenGLFunctions::glBlendColor(float red, float green, float blue, float alpha).

C++ documentation:

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

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

source

pub unsafe fn gl_blend_equation(&self, mode: c_uint)

Convenience function that calls glBlendEquation(mode).

Calls C++ function: void QOpenGLFunctions::glBlendEquation(unsigned int mode).

C++ documentation:

Convenience function that calls glBlendEquation(mode).

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

source

pub unsafe fn gl_blend_equation_separate( &self, mode_r_g_b: c_uint, mode_alpha: c_uint )

Convenience function that calls glBlendEquationSeparate(modeRGB, modeAlpha).

Calls C++ function: void QOpenGLFunctions::glBlendEquationSeparate(unsigned int modeRGB, unsigned int modeAlpha).

C++ documentation:

Convenience function that calls glBlendEquationSeparate(modeRGB, modeAlpha).

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

source

pub unsafe fn gl_blend_func(&self, sfactor: c_uint, dfactor: c_uint)

Convenience function that calls glBlendFunc(sfactor, dfactor).

Calls C++ function: void QOpenGLFunctions::glBlendFunc(unsigned int sfactor, unsigned int dfactor).

C++ documentation:

Convenience function that calls glBlendFunc(sfactor, dfactor).

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

This function was introduced in Qt 5.3.

source

pub unsafe fn gl_blend_func_separate( &self, src_r_g_b: c_uint, dst_r_g_b: c_uint, src_alpha: c_uint, dst_alpha: c_uint )

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

Calls C++ function: void QOpenGLFunctions::glBlendFuncSeparate(unsigned int srcRGB, unsigned int dstRGB, unsigned int srcAlpha, unsigned int dstAlpha).

C++ documentation:

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

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

source

pub unsafe fn gl_buffer_data( &self, target: c_uint, size: c_long, data: *const c_void, usage: c_uint )

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

Calls C++ function: void QOpenGLFunctions::glBufferData(unsigned int target, long size, const void* data, unsigned int usage).

C++ documentation:

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

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

source

pub unsafe fn gl_buffer_sub_data( &self, target: c_uint, offset: c_long, size: c_long, data: *const c_void )

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

Calls C++ function: void QOpenGLFunctions::glBufferSubData(unsigned int target, long offset, long size, const void* data).

C++ documentation:

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

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

source

pub unsafe fn gl_check_framebuffer_status(&self, target: c_uint) -> c_uint

Convenience function that calls glCheckFramebufferStatus(target).

Calls C++ function: unsigned int QOpenGLFunctions::glCheckFramebufferStatus(unsigned int target).

C++ documentation:

Convenience function that calls glCheckFramebufferStatus(target).

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

source

pub unsafe fn gl_clear(&self, mask: c_uint)

Convenience function that calls glClear(mask).

Calls C++ function: void QOpenGLFunctions::glClear(unsigned int mask).

C++ documentation:

Convenience function that calls glClear(mask).

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

This function was introduced in Qt 5.3.

source

pub unsafe fn gl_clear_color( &self, red: c_float, green: c_float, blue: c_float, alpha: c_float )

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

Calls C++ function: void QOpenGLFunctions::glClearColor(float red, float green, float blue, float alpha).

C++ documentation:

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

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

This function was introduced in Qt 5.3.

source

pub unsafe fn gl_clear_depthf(&self, depth: c_float)

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

Calls C++ function: void QOpenGLFunctions::glClearDepthf(float depth).

C++ documentation:

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

source

pub unsafe fn gl_clear_stencil(&self, s: i32)

Convenience function that calls glClearStencil(s).

Calls C++ function: void QOpenGLFunctions::glClearStencil(GLint s).

C++ documentation:

Convenience function that calls glClearStencil(s).

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

This function was introduced in Qt 5.3.

source

pub unsafe fn gl_color_mask( &self, red: c_uchar, green: c_uchar, blue: c_uchar, alpha: c_uchar )

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

Calls C++ function: void QOpenGLFunctions::glColorMask(unsigned char red, unsigned char green, unsigned char blue, unsigned char alpha).

C++ documentation:

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

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

This function was introduced in Qt 5.3.

source

pub unsafe fn gl_compile_shader(&self, shader: u32)

Convenience function that calls glCompileShader(shader).

Calls C++ function: void QOpenGLFunctions::glCompileShader(GLuint shader).

C++ documentation:

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.

source

pub unsafe fn gl_compressed_tex_image_2d( &self, target: c_uint, level: i32, internalformat: c_uint, width: c_int, height: c_int, border: i32, image_size: c_int, data: *const c_void )

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

Calls C++ function: void QOpenGLFunctions::glCompressedTexImage2D(unsigned int target, GLint level, unsigned int internalformat, int width, int height, GLint border, int imageSize, const void* data).

C++ documentation:

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

source

pub unsafe fn gl_compressed_tex_sub_image_2d( &self, target: c_uint, level: i32, xoffset: i32, yoffset: i32, width: c_int, height: c_int, format: c_uint, image_size: c_int, data: *const c_void )

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

Calls C++ function: void QOpenGLFunctions::glCompressedTexSubImage2D(unsigned int target, GLint level, GLint xoffset, GLint yoffset, int width, int height, unsigned int format, int imageSize, const void* data).

C++ documentation:

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

source

pub unsafe fn gl_copy_tex_image_2d( &self, target: c_uint, level: i32, internalformat: c_uint, x: i32, y: i32, width: c_int, height: c_int, border: i32 )

Convenience function that calls glCopyTexImage2D(target, level, internalformat, x, y, width, height, border).

Calls C++ function: void QOpenGLFunctions::glCopyTexImage2D(unsigned int target, GLint level, unsigned int internalformat, GLint x, GLint y, int width, int height, GLint border).

C++ documentation:

Convenience function that calls glCopyTexImage2D(target, level, internalformat, x, y, width, height, border).

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

This function was introduced in Qt 5.3.

source

pub unsafe fn gl_copy_tex_sub_image_2d( &self, target: c_uint, level: i32, xoffset: i32, yoffset: i32, x: i32, y: i32, width: c_int, height: c_int )

Convenience function that calls glCopyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height).

Calls C++ function: void QOpenGLFunctions::glCopyTexSubImage2D(unsigned int target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, int width, int height).

C++ documentation:

Convenience function that calls glCopyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height).

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

This function was introduced in Qt 5.3.

source

pub unsafe fn gl_create_program(&self) -> u32

Convenience function that calls glCreateProgram().

Calls C++ function: GLuint QOpenGLFunctions::glCreateProgram().

C++ documentation:

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.

source

pub unsafe fn gl_create_shader(&self, type_: c_uint) -> u32

Convenience function that calls glCreateShader(type).

Calls C++ function: GLuint QOpenGLFunctions::glCreateShader(unsigned int type).

C++ documentation:

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.

source

pub unsafe fn gl_cull_face(&self, mode: c_uint)

Convenience function that calls glCullFace(mode).

Calls C++ function: void QOpenGLFunctions::glCullFace(unsigned int mode).

C++ documentation:

Convenience function that calls glCullFace(mode).

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

This function was introduced in Qt 5.3.

source

pub unsafe fn gl_delete_buffers(&self, n: c_int, buffers: *const u32)

Convenience function that calls glDeleteBuffers(n, buffers).

Calls C++ function: void QOpenGLFunctions::glDeleteBuffers(int n, const GLuint* buffers).

C++ documentation:

Convenience function that calls glDeleteBuffers(n, buffers).

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

source

pub unsafe fn gl_delete_framebuffers(&self, n: c_int, framebuffers: *const u32)

Convenience function that calls glDeleteFramebuffers(n, framebuffers).

Calls C++ function: void QOpenGLFunctions::glDeleteFramebuffers(int n, const GLuint* framebuffers).

C++ documentation:

Convenience function that calls glDeleteFramebuffers(n, framebuffers).

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

source

pub unsafe fn gl_delete_program(&self, program: u32)

Convenience function that calls glDeleteProgram(program).

Calls C++ function: void QOpenGLFunctions::glDeleteProgram(GLuint program).

C++ documentation:

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.

source

pub unsafe fn gl_delete_renderbuffers( &self, n: c_int, renderbuffers: *const u32 )

Convenience function that calls glDeleteRenderbuffers(n, renderbuffers).

Calls C++ function: void QOpenGLFunctions::glDeleteRenderbuffers(int n, const GLuint* renderbuffers).

C++ documentation:

Convenience function that calls glDeleteRenderbuffers(n, renderbuffers).

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

source

pub unsafe fn gl_delete_shader(&self, shader: u32)

Convenience function that calls glDeleteShader(shader).

Calls C++ function: void QOpenGLFunctions::glDeleteShader(GLuint shader).

C++ documentation:

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.

source

pub unsafe fn gl_delete_textures(&self, n: c_int, textures: *const u32)

Convenience function that calls glDeleteTextures(n, textures).

Calls C++ function: void QOpenGLFunctions::glDeleteTextures(int n, const GLuint* textures).

C++ documentation:

Convenience function that calls glDeleteTextures(n, textures).

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

This function was introduced in Qt 5.3.

source

pub unsafe fn gl_depth_func(&self, func: c_uint)

Convenience function that calls glDepthFunc(func).

Calls C++ function: void QOpenGLFunctions::glDepthFunc(unsigned int func).

C++ documentation:

Convenience function that calls glDepthFunc(func).

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

This function was introduced in Qt 5.3.

source

pub unsafe fn gl_depth_mask(&self, flag: c_uchar)

Convenience function that calls glDepthMask(flag).

Calls C++ function: void QOpenGLFunctions::glDepthMask(unsigned char flag).

C++ documentation:

Convenience function that calls glDepthMask(flag).

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

This function was introduced in Qt 5.3.

source

pub unsafe fn gl_depth_rangef(&self, z_near: c_float, z_far: c_float)

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

Calls C++ function: void QOpenGLFunctions::glDepthRangef(float zNear, float zFar).

C++ documentation:

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

source

pub unsafe fn gl_detach_shader(&self, program: u32, shader: u32)

Convenience function that calls glDetachShader(program, shader).

Calls C++ function: void QOpenGLFunctions::glDetachShader(GLuint program, GLuint shader).

C++ documentation:

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.

source

pub unsafe fn gl_disable(&self, cap: c_uint)

Convenience function that calls glDisable(cap).

Calls C++ function: void QOpenGLFunctions::glDisable(unsigned int cap).

C++ documentation:

Convenience function that calls glDisable(cap).

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

This function was introduced in Qt 5.3.

source

pub unsafe fn gl_disable_vertex_attrib_array(&self, index: u32)

Convenience function that calls glDisableVertexAttribArray(index).

Calls C++ function: void QOpenGLFunctions::glDisableVertexAttribArray(GLuint index).

C++ documentation:

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.

source

pub unsafe fn gl_draw_arrays(&self, mode: c_uint, first: i32, count: c_int)

Convenience function that calls glDrawArrays(mode, first, count).

Calls C++ function: void QOpenGLFunctions::glDrawArrays(unsigned int mode, GLint first, int count).

C++ documentation:

Convenience function that calls glDrawArrays(mode, first, count).

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

This function was introduced in Qt 5.3.

source

pub unsafe fn gl_draw_elements( &self, mode: c_uint, count: c_int, type_: c_uint, indices: *const c_void )

Convenience function that calls glDrawElements(mode, count, type, indices).

Calls C++ function: void QOpenGLFunctions::glDrawElements(unsigned int mode, int count, unsigned int type, const void* indices).

C++ documentation:

Convenience function that calls glDrawElements(mode, count, type, indices).

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

This function was introduced in Qt 5.3.

source

pub unsafe fn gl_enable(&self, cap: c_uint)

Convenience function that calls glEnable(cap).

Calls C++ function: void QOpenGLFunctions::glEnable(unsigned int cap).

C++ documentation:

Convenience function that calls glEnable(cap).

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

This function was introduced in Qt 5.3.

source

pub unsafe fn gl_enable_vertex_attrib_array(&self, index: u32)

Convenience function that calls glEnableVertexAttribArray(index).

Calls C++ function: void QOpenGLFunctions::glEnableVertexAttribArray(GLuint index).

C++ documentation:

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.

source

pub unsafe fn gl_finish(&self)

Convenience function that calls glFinish().

Calls C++ function: void QOpenGLFunctions::glFinish().

C++ documentation:

Convenience function that calls glFinish().

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

This function was introduced in Qt 5.3.

source

pub unsafe fn gl_flush(&self)

Convenience function that calls glFlush().

Calls C++ function: void QOpenGLFunctions::glFlush().

C++ documentation:

Convenience function that calls glFlush().

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

This function was introduced in Qt 5.3.

source

pub unsafe fn gl_framebuffer_renderbuffer( &self, target: c_uint, attachment: c_uint, renderbuffertarget: c_uint, renderbuffer: u32 )

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

Calls C++ function: void QOpenGLFunctions::glFramebufferRenderbuffer(unsigned int target, unsigned int attachment, unsigned int renderbuffertarget, GLuint renderbuffer).

C++ documentation:

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

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

source

pub unsafe fn gl_framebuffer_texture_2d( &self, target: c_uint, attachment: c_uint, textarget: c_uint, texture: u32, level: i32 )

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

Calls C++ function: void QOpenGLFunctions::glFramebufferTexture2D(unsigned int target, unsigned int attachment, unsigned int textarget, GLuint texture, GLint level).

C++ documentation:

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

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

source

pub unsafe fn gl_front_face(&self, mode: c_uint)

Convenience function that calls glFrontFace(mode).

Calls C++ function: void QOpenGLFunctions::glFrontFace(unsigned int mode).

C++ documentation:

Convenience function that calls glFrontFace(mode).

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

This function was introduced in Qt 5.3.

source

pub unsafe fn gl_gen_buffers(&self, n: c_int, buffers: *mut u32)

Convenience function that calls glGenBuffers(n, buffers).

Calls C++ function: void QOpenGLFunctions::glGenBuffers(int n, GLuint* buffers).

C++ documentation:

Convenience function that calls glGenBuffers(n, buffers).

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

source

pub unsafe fn gl_gen_framebuffers(&self, n: c_int, framebuffers: *mut u32)

Convenience function that calls glGenFramebuffers(n, framebuffers).

Calls C++ function: void QOpenGLFunctions::glGenFramebuffers(int n, GLuint* framebuffers).

C++ documentation:

Convenience function that calls glGenFramebuffers(n, framebuffers).

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

source

pub unsafe fn gl_gen_renderbuffers(&self, n: c_int, renderbuffers: *mut u32)

Convenience function that calls glGenRenderbuffers(n, renderbuffers).

Calls C++ function: void QOpenGLFunctions::glGenRenderbuffers(int n, GLuint* renderbuffers).

C++ documentation:

Convenience function that calls glGenRenderbuffers(n, renderbuffers).

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

source

pub unsafe fn gl_gen_textures(&self, n: c_int, textures: *mut u32)

Convenience function that calls glGenTextures(n, textures).

Calls C++ function: void QOpenGLFunctions::glGenTextures(int n, GLuint* textures).

C++ documentation:

Convenience function that calls glGenTextures(n, textures).

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

This function was introduced in Qt 5.3.

source

pub unsafe fn gl_generate_mipmap(&self, target: c_uint)

Convenience function that calls glGenerateMipmap(target).

Calls C++ function: void QOpenGLFunctions::glGenerateMipmap(unsigned int target).

C++ documentation:

Convenience function that calls glGenerateMipmap(target).

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

source

pub unsafe fn gl_get_active_attrib( &self, program: u32, index: u32, bufsize: c_int, length: *mut c_int, size: *mut i32, type_: *mut c_uint, name: *mut c_char )

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

Calls C++ function: void QOpenGLFunctions::glGetActiveAttrib(GLuint program, GLuint index, int bufsize, int* length, GLint* size, unsigned int* type, char* name).

C++ documentation:

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.

source

pub unsafe fn gl_get_active_uniform( &self, program: u32, index: u32, bufsize: c_int, length: *mut c_int, size: *mut i32, type_: *mut c_uint, name: *mut c_char )

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

Calls C++ function: void QOpenGLFunctions::glGetActiveUniform(GLuint program, GLuint index, int bufsize, int* length, GLint* size, unsigned int* type, char* name).

C++ documentation:

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.

source

pub unsafe fn gl_get_attached_shaders( &self, program: u32, maxcount: c_int, count: *mut c_int, shaders: *mut u32 )

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

Calls C++ function: void QOpenGLFunctions::glGetAttachedShaders(GLuint program, int maxcount, int* count, GLuint* shaders).

C++ documentation:

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.

source

pub unsafe fn gl_get_attrib_location( &self, program: u32, name: *const c_char ) -> i32

Convenience function that calls glGetAttribLocation(program, name).

Calls C++ function: GLint QOpenGLFunctions::glGetAttribLocation(GLuint program, const char* name).

C++ documentation:

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.

source

pub unsafe fn gl_get_booleanv(&self, pname: c_uint, params: *mut c_uchar)

Convenience function that calls glGetBooleanv(pname, params).

Calls C++ function: void QOpenGLFunctions::glGetBooleanv(unsigned int pname, unsigned char* params).

C++ documentation:

Convenience function that calls glGetBooleanv(pname, params).

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

This function was introduced in Qt 5.3.

source

pub unsafe fn gl_get_buffer_parameteriv( &self, target: c_uint, pname: c_uint, params: *mut i32 )

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

Calls C++ function: void QOpenGLFunctions::glGetBufferParameteriv(unsigned int target, unsigned int pname, GLint* params).

C++ documentation:

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

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

source

pub unsafe fn gl_get_error(&self) -> c_uint

Convenience function that calls glGetError().

Calls C++ function: unsigned int QOpenGLFunctions::glGetError().

C++ documentation:

Convenience function that calls glGetError().

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

This function was introduced in Qt 5.3.

source

pub unsafe fn gl_get_floatv(&self, pname: c_uint, params: *mut c_float)

Convenience function that calls glGetFloatv(pname, params).

Calls C++ function: void QOpenGLFunctions::glGetFloatv(unsigned int pname, float* params).

C++ documentation:

Convenience function that calls glGetFloatv(pname, params).

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

This function was introduced in Qt 5.3.

source

pub unsafe fn gl_get_framebuffer_attachment_parameteriv( &self, target: c_uint, attachment: c_uint, pname: c_uint, params: *mut i32 )

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

Calls C++ function: void QOpenGLFunctions::glGetFramebufferAttachmentParameteriv(unsigned int target, unsigned int attachment, unsigned int pname, GLint* params).

C++ documentation:

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

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

source

pub unsafe fn gl_get_integerv(&self, pname: c_uint, params: *mut i32)

Convenience function that calls glGetIntegerv(pname, params).

Calls C++ function: void QOpenGLFunctions::glGetIntegerv(unsigned int pname, GLint* params).

C++ documentation:

Convenience function that calls glGetIntegerv(pname, params).

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

This function was introduced in Qt 5.3.

source

pub unsafe fn gl_get_program_info_log( &self, program: u32, bufsize: c_int, length: *mut c_int, infolog: *mut c_char )

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

Calls C++ function: void QOpenGLFunctions::glGetProgramInfoLog(GLuint program, int bufsize, int* length, char* infolog).

C++ documentation:

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.

source

pub unsafe fn gl_get_programiv( &self, program: u32, pname: c_uint, params: *mut i32 )

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

Calls C++ function: void QOpenGLFunctions::glGetProgramiv(GLuint program, unsigned int pname, GLint* params).

C++ documentation:

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.

source

pub unsafe fn gl_get_renderbuffer_parameteriv( &self, target: c_uint, pname: c_uint, params: *mut i32 )

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

Calls C++ function: void QOpenGLFunctions::glGetRenderbufferParameteriv(unsigned int target, unsigned int pname, GLint* params).

C++ documentation:

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

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

source

pub unsafe fn gl_get_shader_info_log( &self, shader: u32, bufsize: c_int, length: *mut c_int, infolog: *mut c_char )

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

Calls C++ function: void QOpenGLFunctions::glGetShaderInfoLog(GLuint shader, int bufsize, int* length, char* infolog).

C++ documentation:

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.

source

pub unsafe fn gl_get_shader_precision_format( &self, shadertype: c_uint, precisiontype: c_uint, range: *mut i32, precision: *mut i32 )

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

Calls C++ function: void QOpenGLFunctions::glGetShaderPrecisionFormat(unsigned int shadertype, unsigned int precisiontype, GLint* range, GLint* precision).

C++ documentation:

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.

source

pub unsafe fn gl_get_shader_source( &self, shader: u32, bufsize: c_int, length: *mut c_int, source: *mut c_char )

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

Calls C++ function: void QOpenGLFunctions::glGetShaderSource(GLuint shader, int bufsize, int* length, char* source).

C++ documentation:

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.

source

pub unsafe fn gl_get_shaderiv( &self, shader: u32, pname: c_uint, params: *mut i32 )

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

Calls C++ function: void QOpenGLFunctions::glGetShaderiv(GLuint shader, unsigned int pname, GLint* params).

C++ documentation:

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.

source

pub unsafe fn gl_get_string(&self, name: c_uint) -> *const u8

Convenience function that calls glGetString(name).

Calls C++ function: const GLubyte* QOpenGLFunctions::glGetString(unsigned int name).

C++ documentation:

Convenience function that calls glGetString(name).

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

This function was introduced in Qt 5.3.

source

pub unsafe fn gl_get_tex_parameterfv( &self, target: c_uint, pname: c_uint, params: *mut c_float )

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

Calls C++ function: void QOpenGLFunctions::glGetTexParameterfv(unsigned int target, unsigned int pname, float* params).

C++ documentation:

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

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

This function was introduced in Qt 5.3.

source

pub unsafe fn gl_get_tex_parameteriv( &self, target: c_uint, pname: c_uint, params: *mut i32 )

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

Calls C++ function: void QOpenGLFunctions::glGetTexParameteriv(unsigned int target, unsigned int pname, GLint* params).

C++ documentation:

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

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

This function was introduced in Qt 5.3.

source

pub unsafe fn gl_get_uniform_location( &self, program: u32, name: *const c_char ) -> i32

Convenience function that calls glGetUniformLocation(program, name).

Calls C++ function: GLint QOpenGLFunctions::glGetUniformLocation(GLuint program, const char* name).

C++ documentation:

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.

source

pub unsafe fn gl_get_uniformfv( &self, program: u32, location: i32, params: *mut c_float )

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

Calls C++ function: void QOpenGLFunctions::glGetUniformfv(GLuint program, GLint location, float* params).

C++ documentation:

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.

source

pub unsafe fn gl_get_uniformiv( &self, program: u32, location: i32, params: *mut i32 )

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

Calls C++ function: void QOpenGLFunctions::glGetUniformiv(GLuint program, GLint location, GLint* params).

C++ documentation:

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.

source

pub unsafe fn gl_get_vertex_attrib_pointerv( &self, index: u32, pname: c_uint, pointer: *mut *mut c_void )

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

Calls C++ function: void QOpenGLFunctions::glGetVertexAttribPointerv(GLuint index, unsigned int pname, void** pointer).

C++ documentation:

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.

source

pub unsafe fn gl_get_vertex_attribfv( &self, index: u32, pname: c_uint, params: *mut c_float )

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

Calls C++ function: void QOpenGLFunctions::glGetVertexAttribfv(GLuint index, unsigned int pname, float* params).

C++ documentation:

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.

source

pub unsafe fn gl_get_vertex_attribiv( &self, index: u32, pname: c_uint, params: *mut i32 )

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

Calls C++ function: void QOpenGLFunctions::glGetVertexAttribiv(GLuint index, unsigned int pname, GLint* params).

C++ documentation:

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.

source

pub unsafe fn gl_hint(&self, target: c_uint, mode: c_uint)

Convenience function that calls glHint(target, mode).

Calls C++ function: void QOpenGLFunctions::glHint(unsigned int target, unsigned int mode).

C++ documentation:

Convenience function that calls glHint(target, mode).

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

This function was introduced in Qt 5.3.

source

pub unsafe fn gl_is_buffer(&self, buffer: u32) -> c_uchar

Convenience function that calls glIsBuffer(buffer).

Calls C++ function: unsigned char QOpenGLFunctions::glIsBuffer(GLuint buffer).

C++ documentation:

Convenience function that calls glIsBuffer(buffer).

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

source

pub unsafe fn gl_is_enabled(&self, cap: c_uint) -> c_uchar

Convenience function that calls glIsEnabled(cap).

Calls C++ function: unsigned char QOpenGLFunctions::glIsEnabled(unsigned int cap).

C++ documentation:

Convenience function that calls glIsEnabled(cap).

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

This function was introduced in Qt 5.3.

source

pub unsafe fn gl_is_framebuffer(&self, framebuffer: u32) -> c_uchar

Convenience function that calls glIsFramebuffer(framebuffer).

Calls C++ function: unsigned char QOpenGLFunctions::glIsFramebuffer(GLuint framebuffer).

C++ documentation:

Convenience function that calls glIsFramebuffer(framebuffer).

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

source

pub unsafe fn gl_is_program(&self, program: u32) -> c_uchar

Convenience function that calls glIsProgram(program).

Calls C++ function: unsigned char QOpenGLFunctions::glIsProgram(GLuint program).

C++ documentation:

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.

source

pub unsafe fn gl_is_renderbuffer(&self, renderbuffer: u32) -> c_uchar

Convenience function that calls glIsRenderbuffer(renderbuffer).

Calls C++ function: unsigned char QOpenGLFunctions::glIsRenderbuffer(GLuint renderbuffer).

C++ documentation:

Convenience function that calls glIsRenderbuffer(renderbuffer).

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

source

pub unsafe fn gl_is_shader(&self, shader: u32) -> c_uchar

Convenience function that calls glIsShader(shader).

Calls C++ function: unsigned char QOpenGLFunctions::glIsShader(GLuint shader).

C++ documentation:

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.

source

pub unsafe fn gl_is_texture(&self, texture: u32) -> c_uchar

Convenience function that calls glIsTexture(texture).

Calls C++ function: unsigned char QOpenGLFunctions::glIsTexture(GLuint texture).

C++ documentation:

Convenience function that calls glIsTexture(texture).

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

This function was introduced in Qt 5.3.

source

pub unsafe fn gl_line_width(&self, width: c_float)

Convenience function that calls glLineWidth(width).

Calls C++ function: void QOpenGLFunctions::glLineWidth(float width).

C++ documentation:

Convenience function that calls glLineWidth(width).

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

This function was introduced in Qt 5.3.

Convenience function that calls glLinkProgram(program).

Calls C++ function: void QOpenGLFunctions::glLinkProgram(GLuint program).

C++ documentation:

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.

source

pub unsafe fn gl_pixel_storei(&self, pname: c_uint, param: i32)

Convenience function that calls glPixelStorei(pname, param).

Calls C++ function: void QOpenGLFunctions::glPixelStorei(unsigned int pname, GLint param).

C++ documentation:

Convenience function that calls glPixelStorei(pname, param).

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

This function was introduced in Qt 5.3.

source

pub unsafe fn gl_polygon_offset(&self, factor: c_float, units: c_float)

Convenience function that calls glPolygonOffset(factor, units).

Calls C++ function: void QOpenGLFunctions::glPolygonOffset(float factor, float units).

C++ documentation:

Convenience function that calls glPolygonOffset(factor, units).

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

This function was introduced in Qt 5.3.

source

pub unsafe fn gl_read_pixels( &self, x: i32, y: i32, width: c_int, height: c_int, format: c_uint, type_: c_uint, pixels: *mut c_void )

Convenience function that calls glReadPixels(x, y, width, height, format, type, pixels).

Calls C++ function: void QOpenGLFunctions::glReadPixels(GLint x, GLint y, int width, int height, unsigned int format, unsigned int type, void* pixels).

C++ documentation:

Convenience function that calls glReadPixels(x, y, width, height, format, type, pixels).

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

This function was introduced in Qt 5.3.

source

pub unsafe fn gl_release_shader_compiler(&self)

Convenience function that calls glReleaseShaderCompiler().

Calls C++ function: void QOpenGLFunctions::glReleaseShaderCompiler().

C++ documentation:

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.

source

pub unsafe fn gl_renderbuffer_storage( &self, target: c_uint, internalformat: c_uint, width: c_int, height: c_int )

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

Calls C++ function: void QOpenGLFunctions::glRenderbufferStorage(unsigned int target, unsigned int internalformat, int width, int height).

C++ documentation:

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

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

source

pub unsafe fn gl_sample_coverage(&self, value: c_float, invert: c_uchar)

Convenience function that calls glSampleCoverage(value, invert).

Calls C++ function: void QOpenGLFunctions::glSampleCoverage(float value, unsigned char invert).

C++ documentation:

Convenience function that calls glSampleCoverage(value, invert).

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

source

pub unsafe fn gl_scissor(&self, x: i32, y: i32, width: c_int, height: c_int)

Convenience function that calls glScissor(x, y, width, height).

Calls C++ function: void QOpenGLFunctions::glScissor(GLint x, GLint y, int width, int height).

C++ documentation:

Convenience function that calls glScissor(x, y, width, height).

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

This function was introduced in Qt 5.3.

source

pub unsafe fn gl_shader_binary( &self, n: i32, shaders: *const u32, binaryformat: c_uint, binary: *const c_void, length: i32 )

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

Calls C++ function: void QOpenGLFunctions::glShaderBinary(GLint n, const GLuint* shaders, unsigned int binaryformat, const void* binary, GLint length).

C++ documentation:

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.

source

pub unsafe fn gl_shader_source( &self, shader: u32, count: c_int, string: *mut *const c_char, length: *const i32 )

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

Calls C++ function: void QOpenGLFunctions::glShaderSource(GLuint shader, int count, const char** string, const GLint* length).

C++ documentation:

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.

source

pub unsafe fn gl_stencil_func(&self, func: c_uint, ref_: i32, mask: u32)

Convenience function that calls glStencilFunc(func, ref, mask).

Calls C++ function: void QOpenGLFunctions::glStencilFunc(unsigned int func, GLint ref, GLuint mask).

C++ documentation:

Convenience function that calls glStencilFunc(func, ref, mask).

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

This function was introduced in Qt 5.3.

source

pub unsafe fn gl_stencil_func_separate( &self, face: c_uint, func: c_uint, ref_: i32, mask: u32 )

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

Calls C++ function: void QOpenGLFunctions::glStencilFuncSeparate(unsigned int face, unsigned int func, GLint ref, GLuint mask).

C++ documentation:

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

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

source

pub unsafe fn gl_stencil_mask(&self, mask: u32)

Convenience function that calls glStencilMask(mask).

Calls C++ function: void QOpenGLFunctions::glStencilMask(GLuint mask).

C++ documentation:

Convenience function that calls glStencilMask(mask).

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

This function was introduced in Qt 5.3.

source

pub unsafe fn gl_stencil_mask_separate(&self, face: c_uint, mask: u32)

Convenience function that calls glStencilMaskSeparate(face, mask).

Calls C++ function: void QOpenGLFunctions::glStencilMaskSeparate(unsigned int face, GLuint mask).

C++ documentation:

Convenience function that calls glStencilMaskSeparate(face, mask).

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

source

pub unsafe fn gl_stencil_op(&self, fail: c_uint, zfail: c_uint, zpass: c_uint)

Convenience function that calls glStencilOp(fail, zfail, zpass).

Calls C++ function: void QOpenGLFunctions::glStencilOp(unsigned int fail, unsigned int zfail, unsigned int zpass).

C++ documentation:

Convenience function that calls glStencilOp(fail, zfail, zpass).

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

This function was introduced in Qt 5.3.

source

pub unsafe fn gl_stencil_op_separate( &self, face: c_uint, fail: c_uint, zfail: c_uint, zpass: c_uint )

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

Calls C++ function: void QOpenGLFunctions::glStencilOpSeparate(unsigned int face, unsigned int fail, unsigned int zfail, unsigned int zpass).

C++ documentation:

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

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

source

pub unsafe fn gl_tex_image_2d( &self, target: c_uint, level: i32, internalformat: i32, width: c_int, height: c_int, border: i32, format: c_uint, type_: c_uint, pixels: *const c_void )

Convenience function that calls glTexImage2D(target, level, internalformat, width, height, border, format, type, pixels).

Calls C++ function: void QOpenGLFunctions::glTexImage2D(unsigned int target, GLint level, GLint internalformat, int width, int height, GLint border, unsigned int format, unsigned int type, const void* pixels).

C++ documentation:

Convenience function that calls glTexImage2D(target, level, internalformat, width, height, border, format, type, pixels).

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

This function was introduced in Qt 5.3.

source

pub unsafe fn gl_tex_parameterf( &self, target: c_uint, pname: c_uint, param: c_float )

Convenience function that calls glTexParameterf(target, pname, param).

Calls C++ function: void QOpenGLFunctions::glTexParameterf(unsigned int target, unsigned int pname, float param).

C++ documentation:

Convenience function that calls glTexParameterf(target, pname, param).

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

This function was introduced in Qt 5.3.

source

pub unsafe fn gl_tex_parameterfv( &self, target: c_uint, pname: c_uint, params: *const c_float )

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

Calls C++ function: void QOpenGLFunctions::glTexParameterfv(unsigned int target, unsigned int pname, const float* params).

C++ documentation:

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

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

This function was introduced in Qt 5.3.

source

pub unsafe fn gl_tex_parameteri( &self, target: c_uint, pname: c_uint, param: i32 )

Convenience function that calls glTexParameteri(target, pname, param).

Calls C++ function: void QOpenGLFunctions::glTexParameteri(unsigned int target, unsigned int pname, GLint param).

C++ documentation:

Convenience function that calls glTexParameteri(target, pname, param).

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

This function was introduced in Qt 5.3.

source

pub unsafe fn gl_tex_parameteriv( &self, target: c_uint, pname: c_uint, params: *const i32 )

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

Calls C++ function: void QOpenGLFunctions::glTexParameteriv(unsigned int target, unsigned int pname, const GLint* params).

C++ documentation:

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

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

This function was introduced in Qt 5.3.

source

pub unsafe fn gl_tex_sub_image_2d( &self, target: c_uint, level: i32, xoffset: i32, yoffset: i32, width: c_int, height: c_int, format: c_uint, type_: c_uint, pixels: *const c_void )

Convenience function that calls glTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels).

Calls C++ function: void QOpenGLFunctions::glTexSubImage2D(unsigned int target, GLint level, GLint xoffset, GLint yoffset, int width, int height, unsigned int format, unsigned int type, const void* pixels).

C++ documentation:

Convenience function that calls glTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels).

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

This function was introduced in Qt 5.3.

source

pub unsafe fn gl_uniform_1f(&self, location: i32, x: c_float)

Convenience function that calls glUniform1f(location, x).

Calls C++ function: void QOpenGLFunctions::glUniform1f(GLint location, float x).

C++ documentation:

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.

source

pub unsafe fn gl_uniform_1fv( &self, location: i32, count: c_int, v: *const c_float )

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

Calls C++ function: void QOpenGLFunctions::glUniform1fv(GLint location, int count, const float* v).

C++ documentation:

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.

source

pub unsafe fn gl_uniform_1i(&self, location: i32, x: i32)

Convenience function that calls glUniform1i(location, x).

Calls C++ function: void QOpenGLFunctions::glUniform1i(GLint location, GLint x).

C++ documentation:

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.

source

pub unsafe fn gl_uniform_1iv(&self, location: i32, count: c_int, v: *const i32)

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

Calls C++ function: void QOpenGLFunctions::glUniform1iv(GLint location, int count, const GLint* v).

C++ documentation:

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.

source

pub unsafe fn gl_uniform_2f(&self, location: i32, x: c_float, y: c_float)

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

Calls C++ function: void QOpenGLFunctions::glUniform2f(GLint location, float x, float y).

C++ documentation:

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.

source

pub unsafe fn gl_uniform_2fv( &self, location: i32, count: c_int, v: *const c_float )

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

Calls C++ function: void QOpenGLFunctions::glUniform2fv(GLint location, int count, const float* v).

C++ documentation:

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.

source

pub unsafe fn gl_uniform_2i(&self, location: i32, x: i32, y: i32)

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

Calls C++ function: void QOpenGLFunctions::glUniform2i(GLint location, GLint x, GLint y).

C++ documentation:

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.

source

pub unsafe fn gl_uniform_2iv(&self, location: i32, count: c_int, v: *const i32)

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

Calls C++ function: void QOpenGLFunctions::glUniform2iv(GLint location, int count, const GLint* v).

C++ documentation:

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.

source

pub unsafe fn gl_uniform_3f( &self, location: i32, x: c_float, y: c_float, z: c_float )

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

Calls C++ function: void QOpenGLFunctions::glUniform3f(GLint location, float x, float y, float z).

C++ documentation:

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.

source

pub unsafe fn gl_uniform_3fv( &self, location: i32, count: c_int, v: *const c_float )

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

Calls C++ function: void QOpenGLFunctions::glUniform3fv(GLint location, int count, const float* v).

C++ documentation:

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.

source

pub unsafe fn gl_uniform_3i(&self, location: i32, x: i32, y: i32, z: i32)

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

Calls C++ function: void QOpenGLFunctions::glUniform3i(GLint location, GLint x, GLint y, GLint z).

C++ documentation:

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.

source

pub unsafe fn gl_uniform_3iv(&self, location: i32, count: c_int, v: *const i32)

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

Calls C++ function: void QOpenGLFunctions::glUniform3iv(GLint location, int count, const GLint* v).

C++ documentation:

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.

source

pub unsafe fn gl_uniform_4f( &self, location: i32, x: c_float, y: c_float, z: c_float, w: c_float )

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

Calls C++ function: void QOpenGLFunctions::glUniform4f(GLint location, float x, float y, float z, float w).

C++ documentation:

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.

source

pub unsafe fn gl_uniform_4fv( &self, location: i32, count: c_int, v: *const c_float )

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

Calls C++ function: void QOpenGLFunctions::glUniform4fv(GLint location, int count, const float* v).

C++ documentation:

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.

source

pub unsafe fn gl_uniform_4i( &self, location: i32, x: i32, y: i32, z: i32, w: i32 )

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

Calls C++ function: void QOpenGLFunctions::glUniform4i(GLint location, GLint x, GLint y, GLint z, GLint w).

C++ documentation:

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.

source

pub unsafe fn gl_uniform_4iv(&self, location: i32, count: c_int, v: *const i32)

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

Calls C++ function: void QOpenGLFunctions::glUniform4iv(GLint location, int count, const GLint* v).

C++ documentation:

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.

source

pub unsafe fn gl_uniform_matrix_2fv( &self, location: i32, count: c_int, transpose: c_uchar, value: *const c_float )

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

Calls C++ function: void QOpenGLFunctions::glUniformMatrix2fv(GLint location, int count, unsigned char transpose, const float* value).

C++ documentation:

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.

source

pub unsafe fn gl_uniform_matrix_3fv( &self, location: i32, count: c_int, transpose: c_uchar, value: *const c_float )

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

Calls C++ function: void QOpenGLFunctions::glUniformMatrix3fv(GLint location, int count, unsigned char transpose, const float* value).

C++ documentation:

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.

source

pub unsafe fn gl_uniform_matrix_4fv( &self, location: i32, count: c_int, transpose: c_uchar, value: *const c_float )

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

Calls C++ function: void QOpenGLFunctions::glUniformMatrix4fv(GLint location, int count, unsigned char transpose, const float* value).

C++ documentation:

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.

source

pub unsafe fn gl_use_program(&self, program: u32)

Convenience function that calls glUseProgram(program).

Calls C++ function: void QOpenGLFunctions::glUseProgram(GLuint program).

C++ documentation:

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.

source

pub unsafe fn gl_validate_program(&self, program: u32)

Convenience function that calls glValidateProgram(program).

Calls C++ function: void QOpenGLFunctions::glValidateProgram(GLuint program).

C++ documentation:

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.

source

pub unsafe fn gl_vertex_attrib_1f(&self, indx: u32, x: c_float)

Convenience function that calls glVertexAttrib1f(indx, x).

Calls C++ function: void QOpenGLFunctions::glVertexAttrib1f(GLuint indx, float x).

C++ documentation:

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.

source

pub unsafe fn gl_vertex_attrib_1fv(&self, indx: u32, values: *const c_float)

Convenience function that calls glVertexAttrib1fv(indx, values).

Calls C++ function: void QOpenGLFunctions::glVertexAttrib1fv(GLuint indx, const float* values).

C++ documentation:

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.

source

pub unsafe fn gl_vertex_attrib_2f(&self, indx: u32, x: c_float, y: c_float)

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

Calls C++ function: void QOpenGLFunctions::glVertexAttrib2f(GLuint indx, float x, float y).

C++ documentation:

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.

source

pub unsafe fn gl_vertex_attrib_2fv(&self, indx: u32, values: *const c_float)

Convenience function that calls glVertexAttrib2fv(indx, values).

Calls C++ function: void QOpenGLFunctions::glVertexAttrib2fv(GLuint indx, const float* values).

C++ documentation:

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.

source

pub unsafe fn gl_vertex_attrib_3f( &self, indx: u32, x: c_float, y: c_float, z: c_float )

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

Calls C++ function: void QOpenGLFunctions::glVertexAttrib3f(GLuint indx, float x, float y, float z).

C++ documentation:

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.

source

pub unsafe fn gl_vertex_attrib_3fv(&self, indx: u32, values: *const c_float)

Convenience function that calls glVertexAttrib3fv(indx, values).

Calls C++ function: void QOpenGLFunctions::glVertexAttrib3fv(GLuint indx, const float* values).

C++ documentation:

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.

source

pub unsafe fn gl_vertex_attrib_4f( &self, indx: u32, x: c_float, y: c_float, z: c_float, w: c_float )

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

Calls C++ function: void QOpenGLFunctions::glVertexAttrib4f(GLuint indx, float x, float y, float z, float w).

C++ documentation:

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.

source

pub unsafe fn gl_vertex_attrib_4fv(&self, indx: u32, values: *const c_float)

Convenience function that calls glVertexAttrib4fv(indx, values).

Calls C++ function: void QOpenGLFunctions::glVertexAttrib4fv(GLuint indx, const float* values).

C++ documentation:

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.

source

pub unsafe fn gl_vertex_attrib_pointer( &self, indx: u32, size: i32, type_: c_uint, normalized: c_uchar, stride: c_int, ptr: *const c_void )

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

Calls C++ function: void QOpenGLFunctions::glVertexAttribPointer(GLuint indx, GLint size, unsigned int type, unsigned char normalized, int stride, const void* ptr).

C++ documentation:

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.

source

pub unsafe fn gl_viewport(&self, x: i32, y: i32, width: c_int, height: c_int)

Convenience function that calls glViewport(x, y, width, height).

Calls C++ function: void QOpenGLFunctions::glViewport(GLint x, GLint y, int width, int height).

C++ documentation:

Convenience function that calls glViewport(x, y, width, height).

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

This function was introduced in Qt 5.3.

source

pub unsafe fn has_opengl_feature(&self, feature: OpenGLFeature) -> bool

Returns true if feature is present on this system's OpenGL implementation; false otherwise.

Calls C++ function: bool QOpenGLFunctions::hasOpenGLFeature(QOpenGLFunctions::OpenGLFeature feature) const.

C++ documentation:

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

source

pub unsafe fn initialize_opengl_functions(&self)

Initializes OpenGL function resolution for the current context.

Calls C++ function: void QOpenGLFunctions::initializeOpenGLFunctions().

C++ documentation:

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.

source

pub unsafe fn new_0a() -> CppBox<QOpenGLFunctions>

Constructs a default function resolver. The resolver cannot be used until initializeOpenGLFunctions() is called to specify the context.

Calls C++ function: [constructor] void QOpenGLFunctions::QOpenGLFunctions().

C++ documentation:

Constructs a default function resolver. The resolver cannot be used until initializeOpenGLFunctions() is called to specify the context.

See also initializeOpenGLFunctions().

source

pub unsafe fn new_1a( context: impl CastInto<Ptr<QOpenGLContext>> ) -> CppBox<QOpenGLFunctions>

Constructs a function resolver for context. If context is null, then the resolver will be created for the current QOpenGLContext.

Calls C++ function: [constructor] void QOpenGLFunctions::QOpenGLFunctions(QOpenGLContext* context).

C++ documentation:

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

source

pub unsafe fn new_copy( other: impl CastInto<Ref<QOpenGLFunctions>> ) -> CppBox<QOpenGLFunctions>

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

Calls C++ function: [constructor] void QOpenGLFunctions::QOpenGLFunctions(const QOpenGLFunctions& other).

C++ documentation:

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

source

pub unsafe fn opengl_features(&self) -> QFlags<OpenGLFeature>

Returns the set of features that are present on this system's OpenGL implementation.

Calls C++ function: QFlags<QOpenGLFunctions::OpenGLFeature> QOpenGLFunctions::openGLFeatures() const.

C++ documentation:

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

Trait Implementations§

source§

impl CppDeletable for QOpenGLFunctions

source§

unsafe fn delete(&self)

Destroys this function resolver.

Calls C++ function: [destructor] void QOpenGLFunctions::~QOpenGLFunctions().

C++ documentation:

Destroys this function resolver.

source§

impl StaticDowncast<QOpenGLExtraFunctions> for QOpenGLFunctions

source§

unsafe fn static_downcast( ptr: Ptr<QOpenGLFunctions> ) -> Ptr<QOpenGLExtraFunctions>

Calls C++ function: QOpenGLExtraFunctions* static_cast<QOpenGLExtraFunctions*>(QOpenGLFunctions* ptr).

source§

impl StaticUpcast<QOpenGLFunctions> for QOpenGLExtraFunctions

source§

unsafe fn static_upcast( ptr: Ptr<QOpenGLExtraFunctions> ) -> Ptr<QOpenGLFunctions>

Calls C++ function: QOpenGLFunctions* static_cast<QOpenGLFunctions*>(QOpenGLExtraFunctions* ptr).

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T, U> CastInto<U> for T
where U: CastFrom<T>,

source§

unsafe fn cast_into(self) -> U

Performs the conversion. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> StaticUpcast<T> for T

source§

unsafe fn static_upcast(ptr: Ptr<T>) -> Ptr<T>

Convert type of a const pointer. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.