Ejemplo n.º 1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="GraphicsAdapter" /> class.
        /// </summary>
        /// <param name="defaultFactory">The default factory.</param>
        /// <param name="adapterOrdinal">The adapter ordinal.</param>
        internal GraphicsAdapter(Factory1 defaultFactory, int adapterOrdinal)
        {
            this.adapterOrdinal = adapterOrdinal;
            adapter = defaultFactory.GetAdapter1(adapterOrdinal).DisposeBy(this);
            description = adapter.Description1;
            //var nativeOutputs = adapter.Outputs;

            var count = adapter.GetOutputCount();
            outputs = new GraphicsOutput[count];
            for (var i = 0; i < outputs.Length; i++)
                outputs[i] = new GraphicsOutput(this, i).DisposeBy(this);
        }