pub fn update_constant_buffer<N, T>(&mut self, name: N, data: &T, enc: &mut Encoder)
    where
        N: AsRef<str>,
        T: Std140,
    {
        match self.const_bufs.get(name.as_ref()) {
            Some(i) => {
                let raw = &self.data.const_bufs[*i];
                enc.update_constant_buffer::<T>(unsafe { mem::transmute(raw) }, &data)
            }
            None => {
                warn!(
                    "Buffer update for effect failed! Buffer not found: {:?}",
                    name.as_ref()
                );
            }
        }
    }
/// FIXME: Update raw buffer without transmute.
Update raw buffer without transmute.
Update raw buffer without transmute .
pub fn update_constant_buffer<N, T>(&mut self, name: N, data: &T, enc: &mut Encoder)
    where
        N: AsRef<str>,
        T: Std140,
    {
        match self.const_bufs.get(name.as_ref()) {
            Some(i) => {
                let raw = &self.data.const_bufs[*i];
                enc.update_constant_buffer::<T>(unsafe { mem::transmute(raw) }, &data)
            }
            None => {
                warn!(
                    "Buffer update for effect failed! Buffer not found: {:?}",
                    name.as_ref()
                );
            }
        }
    }
pub fn update_constant_buffer < N , T > ( & mut self , name : N , data : & T , enc : & mut Encoder ) where N : AsRef < str > , T : Std140 , { match self . const_bufs . get ( name . as_ref ( ) ) { Some ( i ) => { let raw = & self . data . const_bufs [ * i ] ; enc . update_constant_buffer :: < T > ( unsafe { mem :: transmute ( raw ) } , & data ) } None => { warn ! ( " " name as_ref ( ) ) ; } } }
FIXME: Update raw buffer without transmute.
FIXME : Update raw buffer without transmute .
&mut self
name
N
data
&T
enc
&mut Encoder
&mut self
name
N
data
&T
enc
&mut Encoder