Пример #1
0
 private void Load(Bitmap bitmap)
 {
     m_bitmap  = bitmap;
     m_texture = TextureUtil.CreateTextureFromBitmap(bitmap, m_filter, m_wrap);
     m_width   = bitmap.Width;
     m_height  = bitmap.Height;
 }
Пример #2
0
 private void Load(IFileStore store)
 {
     using (var stream = store.OpenFile(m_path))
     {
         m_bitmap  = new Bitmap(stream);
         m_texture = TextureUtil.CreateTextureFromBitmap(m_bitmap, m_filter, m_wrap);
         m_width   = m_bitmap.Width;
         m_height  = m_bitmap.Height;
     }
 }