cogl/auto/
attribute_buffer.rs1use crate::{Context, Object};
2
3use glib::translate::*;
4use std::fmt;
5
6glib_wrapper! {
7 pub struct AttributeBuffer(Object<ffi::CoglAttributeBuffer, AttributeBufferClass>) @extends Object;
8
9 match fn {
10 get_type => || ffi::cogl_attribute_buffer_get_gtype(),
11 }
12}
13
14impl AttributeBuffer {
15 pub fn with_size(context: &Context, bytes: usize) -> AttributeBuffer {
20 unsafe {
21 from_glib_full(ffi::cogl_attribute_buffer_new_with_size(
22 context.to_glib_none().0,
23 bytes,
24 ))
25 }
26 }
27}
28
29impl fmt::Display for AttributeBuffer {
30 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
31 write!(f, "AttributeBuffer")
32 }
33}