public void cairo_draw_from_gl (Context cr, Surface surface, int source, int source_type, int buffer_scale, int x, int y, int width, int height)
This is the main way to draw GL content in GTK.
It takes a render buffer ID (
GL_RENDERBUFFER) or a texture id (
GL_TEXTURE) and draws it onto
cr with an OVER operation, respecting the current clip. The top left corner of the rectangle
height will be drawn at the current (0,0) position of the
This will work for *all* cairo_t, as long as
surface is 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 to
will however use a more efficient approach.
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.
a cairo context
The surface we're rendering for (not necessarily into)
The GL ID of the source buffer
The type of the
The scale-factor that the
The source x position in
The source y position in
The width of the region to draw
The height of the region to draw