Deprecatedcr: default.Contexta cairo context
Deprecatedsurface: Gdk.SurfaceThe surface we're rendering for (not necessarily into)
Deprecatedsource: numberThe GL ID of the source buffer
Deprecatedsource_type: numberThe type of the source
Deprecatedbuffer_scale: numberThe scale-factor that the source buffer is allocated for
Deprecatedx: numberThe source x position in source to start copying from in GL coordinates
Deprecatedy: numberThe source y position in source to start copying from in GL coordinates
Deprecatedwidth: numberThe width of the region to draw
Deprecatedheight: numberThe height of the region to draw
since 4.6: The function is overly complex and produces broken output in various combinations of arguments. If you want to draw with GL textures in GTK, use Gdk.GLTexture.new; if you want to use that texture in Cairo, use Gdk.Texture.download to download the data into a Cairo image surface.
Draws GL content onto a cairo context.
It takes a render buffer ID (
source_type== GL_RENDERBUFFER) or a texture id (source_type== GL_TEXTURE) and draws it ontocrwith an OVER operation, respecting the current clip. The top left corner of the rectangle specified byx,y,widthandheightwill be drawn at the current (0,0) position of thecairo_t.This will work for all
cairo_t, as long assurfaceis realized, but the fallback implementation that reads back the pixels from the buffer may be used in the general case. In the case of direct drawing to a surface with no special effects applied tocrit will however use a more efficient approach.For GL_RENDERBUFFER the code will always fall back to software for buffers with alpha components, so make sure you use GL_TEXTURE if using alpha.
Calling this may change the current GL context.