pub fn gl_new_from_foreign(
        ctx: &Context,
        gl_handle: u32,
        width: i32,
        height: i32,
        format: PixelFormat,
    ) -> Texture2D {
        unsafe {
            from_glib_full(ffi::cogl_texture_2d_gl_new_from_foreign(
                ctx.to_glib_none().0,
                gl_handle,
                width,
                height,
                format.to_glib(),
            ))
        }
    }
/// Wraps an existing GL_TEXTURE_2D texture object as a `Texture2D`.
/// This can be used for integrating Cogl with software using OpenGL
/// directly.
///
/// The texture is still configurable until it has been allocated so
/// for example you can declare whether the texture is premultiplied
/// with `Texture::set_premultiplied`.
///
/// `<note>`The results are undefined for passing an invalid `gl_handle`
/// or if `width` or `height` don't have the correct texture
/// geometry.`</note>`
///
/// ## `ctx`
/// A `Context`
/// ## `gl_handle`
/// A GL handle for a GL_TEXTURE_2D texture object
/// ## `width`
/// Width of the foreign GL texture
/// ## `height`
/// Height of the foreign GL texture
/// ## `format`
/// The format of the texture
///
/// # Returns
///
/// A newly allocated `Texture2D`
Wraps an existing GL_TEXTURE_2D texture object as a `Texture2D`.
This can be used for integrating Cogl with software using OpenGL
directly.

The texture is still configurable until it has been allocated so
for example you can declare whether the texture is premultiplied
with `Texture::set_premultiplied`.


Wraps an existing GL_TEXTURE_2D texture object as a ` Texture2D ` . This can be used for integrating Cogl with software using OpenGL directly . The texture is still configurable until it has been allocated so for example you can declare whether the texture is premultiplied with ` Texture :: set_premultiplied ` .
pub fn gl_new_from_foreign(
        ctx: &Context,
        gl_handle: u32,
        width: i32,
        height: i32,
        format: PixelFormat,
    ) -> Texture2D {
        unsafe {
            from_glib_full(ffi::cogl_texture_2d_gl_new_from_foreign(
                ctx.to_glib_none().0,
                gl_handle,
                width,
                height,
                format.to_glib(),
            ))
        }
    }
pub fn gl_new_from_foreign ( ctx : & Context , gl_handle : u32 , width : i32 , height : i32 , format : PixelFormat , ) -> Texture2D { unsafe { from_glib_full ( ffi :: cogl_texture_2d_gl_new_from_foreign ( ctx . to_glib_none ( ) . 0 , gl_handle , width , height , format . to_glib ( ) , ) ) } }
Wraps an existing GL_TEXTURE_2D texture object as a `Texture2D`.
Wraps an existing GL_TEXTURE_2D texture object as a ` Texture2D ` .
ctx
&Context
gl_handle
u32
width
i32
height
i32
format
PixelFormat
A newly allocated `Texture2D`
A newly allocated ` Texture2D `
ctx
&Context
gl_handle
u32
width
i32
height
i32
format
PixelFormat
`ctx`
None
`gl_handle`
A GL handle for a GL_TEXTURE_2D texture object
A GL handle for a GL_TEXTURE_2D texture object
`width`
Width of the foreign GL texture
Width of the foreign GL texture
`height`
Height of the foreign GL texture
Height of the foreign GL texture
`format`
The format of the texture
The format of the texture