Exemple #1
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="minLevel"></param>
 public D3D10(Direct3D10.FeatureLevel minLevel)
 {
     m_device = DeviceUtil.Create10(DeviceCreationFlags.BgraSupport, minLevel);
     if (m_device == null)
     {
         throw new NotSupportedException();
     }
 }
Exemple #2
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="a"></param>
 public D3D11(Adapter a)
 {
     if (a == null)
     {
         m_device = DeviceUtil.Create11(DeviceCreationFlags.BgraSupport, FeatureLevel.Level_11_0);
         if (m_device == null)
         {
             throw new NotSupportedException();
         }
     }
     m_device = new Device(a);
 }
Exemple #3
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="dev"></param>
 public D3D10(Device dev)
 {
     if (dev != null)
     {
         //dev.AddReference();
         this.m_device = dev;
     }
     else
     {
         m_device = DeviceUtil.Create10(DeviceCreationFlags.BgraSupport);
         if (m_device == null)
         {
             throw new NotSupportedException();
         }
     }
 }
Exemple #4
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="dev"></param>
 public D3D11(Device dev)
 {
     // REMARK: SharpDX.Direct3D.DriverType.Warp works without graphics card!
     if (dev != null)
     {
         //dev.AddReference();
         m_device = dev;
     }
     else
     {
         m_device = DeviceUtil.Create11(DeviceCreationFlags.BgraSupport);
         if (m_device == null)
         {
             throw new NotSupportedException();
         }
     }
 }