pub fn new_p3t2(context: &Context, mode: VerticesMode, data: &[&VertexP3T2]) -> Primitive {
        let data: Vec<ffi::CoglVertexP3T2> = data
            .iter()
            .map(|e| unsafe { *e.to_glib_none().0 })
            .collect();
        let n_vertices = data.len() as i32;
        unsafe {
            from_glib_full(ffi::cogl_primitive_new_p3t2(
                context.to_glib_none().0,
                mode.to_glib(),
                n_vertices,
                data.as_ptr(),
            ))
        }
    }
/// Provides a convenient way to describe a primitive, such as a single
/// triangle strip or a triangle fan, that will internally allocate the
/// necessary `AttributeBuffer` storage, describe the position and
/// texture coordinate attributes with `Attribute`<!-- -->s and
/// upload your data.
///
/// For example to draw a convex polygon with texture mapping you can
/// do:
///
/// ```text
/// CoglVertexP3T2 triangle[] =
/// {
///   { 0,   300, 0,  0.0, 1.0},
///   { 150, 0,   0,  0.5, 0.0},
///   { 300, 300, 0,  1.0, 1.0}
/// };
/// prim = cogl_primitive_new_p3t2 (COGL_VERTICES_MODE_TRIANGLE_FAN,
///                                 3, triangle);
/// cogl_primitive_draw (prim);
/// ```
///
/// The value passed as `n_vertices` is initially used to determine how
/// much can be read from `data` but it will also be used to update the
/// `Primitive` `<structfield>`n_vertices`</structfield>` property as if
/// `Primitive::set_n_vertices` were called. This property defines
/// the number of vertices to read when drawing.
///
/// `<note>`The primitive API doesn't support drawing with sliced
/// textures (since switching between slices implies changing state and
/// so that implies multiple primitives need to be submitted). You
/// should pass the `TextureFlags::NoSlicing` flag to all textures that
/// might be used while drawing with this API. If your hardware doesn't
/// support non-power of two textures (For example you are using GLES
/// 1.1) then you will need to make sure your assets are resized to a
/// power-of-two size (though they don't have to be square)`</note>`
/// ## `context`
/// A `Context`
/// ## `mode`
/// A `VerticesMode` defining how to draw the vertices
/// ## `n_vertices`
/// The number of vertices to read from `data` and also
///  the number of vertices to read when later drawing.
/// ## `data`
/// An array
///  of `VertexP3T2` vertices
///
/// # Returns
///
/// A newly allocated `Primitive`
/// with a reference of 1. This can be freed using `Object::unref`.
Provides a convenient way to describe a primitive, such as a single
triangle strip or a triangle fan, that will internally allocate the
necessary `AttributeBuffer` storage, describe the position and
texture coordinate attributes with `Attribute`s and
upload your data.

For example to draw a convex polygon with texture mapping you can
do.





``The primitive API doesn't support drawing with sliced
textures (since switching between slices implies changing state and
so that implies multiple primitives need to be submitted). You
should pass the `TextureFlags::NoSlicing` flag to all textures that
might be used while drawing with this API. If your hardware doesn't
support non-power of two textures (For example you are using GLES
1.1) then you will need to make sure your assets are resized to a
power-of-two size (though they don't have to be square)``
Provides a convenient way to describe a primitive such as a single triangle strip or a triangle fan that will internally allocate the necessary ` AttributeBuffer ` storage describe the position and texture coordinate attributes with ` Attribute ` s and upload your data . For example to draw a convex polygon with texture mapping you can do . ` ` The primitive API doesn ' t support drawing with sliced textures ( since switching between slices implies changing state and so that implies multiple primitives need to be submitted ) . You should pass the ` TextureFlags :: NoSlicing ` flag to all textures that might be used while drawing with this API . If your hardware doesn ' t support non - power of two textures ( For example you are using GLES 1 . 1 ) then you will need to make sure your assets are resized to a power - of - two size ( though they don ' t have to be square ) ` `
pub fn new_p3t2(context: &Context, mode: VerticesMode, data: &[&VertexP3T2]) -> Primitive {
        let data: Vec<ffi::CoglVertexP3T2> = data
            .iter()
            .map(|e| unsafe { *e.to_glib_none().0 })
            .collect();
        let n_vertices = data.len() as i32;
        unsafe {
            from_glib_full(ffi::cogl_primitive_new_p3t2(
                context.to_glib_none().0,
                mode.to_glib(),
                n_vertices,
                data.as_ptr(),
            ))
        }
    }
pub fn new_p3t2 ( context : & Context , mode : VerticesMode , data : & [ & VertexP3T2 ] ) -> Primitive { let data : Vec < ffi :: CoglVertexP3T2 > = data . iter ( ) . map ( | e | unsafe { * e . to_glib_none ( ) . 0 } ) . collect ( ) ; let n_vertices = data . len ( ) as i32 ; unsafe { from_glib_full ( ffi :: cogl_primitive_new_p3t2 ( context . to_glib_none ( ) . 0 , mode . to_glib ( ) , n_vertices , data . as_ptr ( ) , ) ) } }
Provides a convenient way to describe a primitive, such as a single
triangle strip or a triangle fan, that will internally allocate the
necessary `AttributeBuffer` storage, describe the position and
texture coordinate attributes with `Attribute`<!-- -->s and
upload your data.
Provides a convenient way to describe a primitive such as a single triangle strip or a triangle fan that will internally allocate the necessary ` AttributeBuffer ` storage describe the position and texture coordinate attributes with ` Attribute ` <! -- -- > s and upload your data .
context
&Context
mode
VerticesMode
data
&[&VertexP3T2]
A newly allocated `Primitive`
with a reference of 1. This can be freed using `Object::unref`.
A newly allocated ` Primitive ` with a reference of 1 . This can be freed using ` Object :: unref ` .
context
&Context
mode
VerticesMode
data
&[&VertexP3T2]
`context`
None
`mode`
A `VerticesMode` defining how to draw the vertices
A ` VerticesMode ` defining how to draw the vertices
`n_vertices`
The number of vertices to read from `data` and also
the number of vertices to read when later drawing.
The number of vertices to read from ` data ` and also the number of vertices to read when later drawing .
`data`
An array
of `VertexP3T2` vertices
An array of ` VertexP3T2 ` vertices