Example #1
0
 public void LoadResources(Direct3DDevice9 device)
 {
     if (device == null || Texture != null)
     {
         return;
     }
     using (var stream = m_iconDesc.GetImageStream())
     {
         Texture = D3DX9.CreateTextureFromStream(device, stream);
     }
 }
Example #2
0
 public void LoadResources(Device device)
 {
     if (device == null || Texture != null)
     {
         return;
     }
     using (var stream = m_iconDesc.GetImageStream())
     {
         Texture = TextureLoader.FromStream(device, stream);
     }
 }