internal GraphicsDevice() { PresentationParameters = new PresentationParameters(); PresentationParameters.DepthStencilFormat = DepthFormat.Depth24; Setup(); GraphicsCapabilities = new GraphicsCapabilities(this); GraphicsCapabilities.Initialize(this); Initialize(); }
public GraphicsDevice(GraphicsAdapter adapter, GraphicsProfile graphicsProfile, PresentationParameters presentationParameters) { if (adapter == null) { throw new ArgumentNullException("adapter"); } if (!adapter.IsProfileSupported(graphicsProfile)) { throw new NoSuitableGraphicsDeviceException(string.Format("Adapter '{0}' does not support the {1} profile.", adapter.Description, graphicsProfile)); } if (presentationParameters == null) { throw new ArgumentNullException("presentationParameters"); } Adapter = adapter; PresentationParameters = presentationParameters; _graphicsProfile = graphicsProfile; Setup(); GraphicsCapabilities = new GraphicsCapabilities(this); GraphicsCapabilities.Initialize(this); Initialize(); }