IGlobalScreenDisplaySettings

735
4
03-20-2012 08:35 PM
BrianWilson
Occasional Contributor II
I need to control hardware acceleration in ArcGIS Engine. I am using C#

This page documents the IGlobalScreenDisplaySettings interface and references the CoClass GlobalScreenDisplaySettings

http://help.arcgis.com/en/sdk/10.0/arcobjects_net/componenthelp/index.html#//001w000003w5000000

but I can't figure out how to use it. There are no examples. Google and forum searches return nothing but references to the above.

(There does not appear to be any ArcGIS Engine forum, sorry if I am posting in the wrong place!)

Thanks

Brian
0 Kudos
4 Replies
BrianWilson
Occasional Contributor II
Answering my own q, I must have been too sleepy last night! Here is a code snippet.


            using ESRI.ArcGIS.Display;

            GlobalScreenDisplaySettings g = new GlobalScreenDisplaySettingsClass();
            bool yes = g.CanEnableHardwareAcceleration();
            if (yes) g.EnableHardwareAcceleration = true;


The funny part is that when I run this, it says it CAN enable acceleration, but the g.EnableHardwareAcceleration property remains FALSE. I am running on a desktop with OpenGL 3.1 compatible card so it should not be a hardware limitation. I will try testing on some more computers.

Brian
0 Kudos
BrooksShannon
New Contributor

The funny part is that when I run this, it says it CAN enable acceleration, but the g.EnableHardwareAcceleration property remains FALSE.


I'm noticing the same thing.  Did you ever figure out if this is specific to a given system, or if it happened on all machines?  (If it was the latter, did you ever determine a resolution?)

Thanks,
Brooks
0 Kudos
TaraHemphill
New Contributor

using ESRI.ArcGIS.Display;

GlobalScreenDisplaySettings g = new GlobalScreenDisplaySettingsClass();
bool yes = g.CanEnableHardwareAcceleration();
if (yes) g.EnableHardwareAcceleration = true;

The funny part is that when I run this, it says it CAN enable acceleration, but the g.EnableHardwareAcceleration property remains FALSE.
Brian


I am having this same issue. Info:
Standalone C#/WinForms app
ArcGIS 10.1 SP1

Tested on two workstations, both with high-end graphics cards with updated drivers. The CanEnableHardwareAcceleration property returns True on both machines, but setting the EnableHardwareAcceleration property does not actually change its value.

Any ideas?
Thanks.
0 Kudos
BrooksShannon
New Contributor
I am having this same issue. Info:
Standalone C#/WinForms app
ArcGIS 10.1 SP1

Tested on two workstations, both with high-end graphics cards with updated drivers. The CanEnableHardwareAcceleration property returns True on both machines, but setting the EnableHardwareAcceleration property does not actually change its value.

Any ideas?
Thanks.


Hey Tara,

I ended up working with ESRI Support on this issue, and they determined that it was related to my video card and their drivers.  My rig is kind of old, so no official drivers actually work: calling CanEnableHardwareAcceleration actually returns false.  However, after installing the latest reference drivers for my graphics card, CanEnableHardwareAcceleration returns true, but setting EnableHardwareAcceleration has no effect.  It's clear that, for me at least, it's related to my card and/or drivers.

I did verify that on some other machines in our office, calling EnableHardwareAcceleration works as expected.  There are graphics cards and/or drivers, then, that simply aren't supported. Depending on the drivers, you might see the behavior that you are currently experiencing.

It's probably not a bad idea to hit up ESRI Support and let them know what graphics card and drivers you're using.  Perhaps they don't support them, but can offer some advice on alternative drivers to use.  (Or they can work on adding support for those drivers in the future.)

Thanks!
Brooks
0 Kudos