Ejemplo n.º 1
0
        //internal GraphicsDevice(GraphicsDeviceInformation gdi)
        //{
        //    if (gdi.PresentationParameters == null)
        //        throw new ArgumentNullException("presentationParameters");
        //    PresentationParameters = gdi.PresentationParameters;
        //    Setup();
        //    GraphicsCapabilities = new GraphicsCapabilities(this);
        //    GraphicsProfile = gdi.GraphicsProfile;
        //    Initialize();
        //}

        internal GraphicsDevice()
        {
            PresentationParameters = new PresentationParameters();
            PresentationParameters.DepthStencilFormat = DepthFormat.Depth24;
            Setup();
            GraphicsCapabilities = new GraphicsCapabilities(this);
            Initialize();
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="GraphicsDevice" /> class.
 /// </summary>
 /// <param name="adapter">The graphics adapter.</param>
 /// <param name="graphicsProfile">The graphics profile.</param>
 /// <param name="presentationParameters">The presentation options.</param>
 /// <exception cref="ArgumentNullException">
 /// <paramref name="presentationParameters"/> is <see langword="null"/>.
 /// </exception>
 public GraphicsDevice(GraphicsAdapter adapter, GraphicsProfile graphicsProfile, PresentationParameters presentationParameters)
 {
     Adapter = adapter;
     if (presentationParameters == null)
     {
         throw new ArgumentNullException("presentationParameters");
     }
     PresentationParameters = presentationParameters;
     Setup();
     GraphicsCapabilities = new GraphicsCapabilities(this);
     GraphicsProfile      = graphicsProfile;
     Initialize();
 }