/// <summary>
        ///		Default constructor.
        /// </summary>
        public Driver(D3D.AdapterInformation adapterInfo)
        {
            this.desktopMode = adapterInfo.CurrentDisplayMode;
            this.name        = adapterInfo.Information.DriverName;
            this.description = adapterInfo.Information.Description;
            this.adapterNum  = adapterInfo.Adapter;

            videoModeList = new VideoModeCollection();
        }
Beispiel #2
0
        public DisplayAdapter(Microsoft.DirectX.Direct3D.AdapterInformation adapterInfo)
        {
            this.ordinal = adapterInfo.Adapter;
            this.details = adapterInfo.Information;

            // Get list of all display modes on this adapter.
            // Also build a temporary list of all display adapter formats.
            foreach (DisplayMode displayMode in adapterInfo.SupportedDisplayModes)
            {
                this.displayModes.Add(displayMode);
            }

            DisplayModeComparer dmc = new DisplayModeComparer();

            this.displayModes.Sort(dmc);

            RefreshDisplayDevices();
        }
Beispiel #3
0
        private static void EnumerateAdapters()
        {
            log.BeginRegion("Display adapters");

            for (int i = 0; i < D3d.Manager.Adapters.Count; i++)
            {
                log.BeginRegion("Adapter");

                log.BeginMessage(Proteus.Kernel.Diagnostics.LogLevel.Info);
                D3d.AdapterInformation ai = D3d.Manager.Adapters[i];

                log.MessageContent("Adapter Ordinal: {0}", ai.Adapter);
                log.MessageContent("Current display mode: {0}", ai.CurrentDisplayMode);
                log.MessageContent("Description: {0}", ai.Information.Description);
                log.MessageContent("Id: {0}", ai.Information.DeviceId);
                log.MessageContent("Identifier: {0}", ai.Information.DeviceIdentifier);
                log.MessageContent("Name: {0}", ai.Information.DeviceName);
                log.MessageContent("Driver: {0}", ai.Information.DriverName);
                log.MessageContent("Driver version: {0}", ai.Information.DriverVersion);
                log.MessageContent("Revision: {0}", ai.Information.Revision);
                log.MessageContent("Subsystem: {0}", ai.Information.SubSystemId);
                log.MessageContent("Vendor: {0}", ai.Information.VendorId);

                log.EndMessage();

                log.BeginRegion("Supported display modes:");

                log.BeginMessage(Proteus.Kernel.Diagnostics.LogLevel.Info);

                foreach (D3d.DisplayMode m in ai.SupportedDisplayModes)
                {
                    log.MessageContent("{0}", m);
                }

                log.EndMessage();

                log.EndRegion();
                log.EndRegion();
            }

            log.EndRegion();
        }