Toggle Hardware acceleration vb.net, C#

This is a discussion on Toggle Hardware acceleration vb.net, C# within the Windows Programming forums, part of the Platform Specific Boards category; Trying to integrate a toggle for XP and 7. "To disable hardware acceleration: [HKEY_CURRENT_USER\Software\Microsoft\Avalon.Graphi cs] "DisableHWAcceleration"=dword:00000001 To enable hardware acceleration: ...

  1. #1
    Registered User
    Join Date
    Jul 2013
    Posts
    3

    Toggle Hardware acceleration vb.net, C#

    Trying to integrate a toggle for XP and 7.
    "To disable hardware acceleration:


    [HKEY_CURRENT_USER\Software\Microsoft\Avalon.Graphi cs] "DisableHWAcceleration"=dword:00000001 To enable hardware acceleration:

    [HKEY_CURRENT_USER\Software\Microsoft\Avalon.Graphi cs] "DisableHWAcceleration"=dword:00000000"

    The next step might be enumdisplaydevices, and the reset.
    Reset: http://www.drunkenhyena.com/cgi-bin/...r=2;article=10
    Other: http://msdn.microsoft.com/en-us/library/windows/desktop/bb147355%28v=vs.85%29.aspx

    I tried converting directx (video device reset) C++ code to C# or vb.net and it blacked the
    screen for a second, similar to the XP hardware acceleration window. It did not successfully toggle it, the system still recognizes that it is still in it's former acceleration setting.

    Windows 7:
    http://stackoverflow.com/questions/1...n-on-windows-7

    Has anyone ever been able to toggle hardware acceleration in a .net language?
    Last edited by init3d; 07-03-2013 at 04:00 PM.

  2. #2
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,596
    What are you trying to do? Hardware acceleration inside of DirectX has nothing to do with hardware acceleration inside of Aero or some other desktop application. You can disable hardware acceleration in Windows 7 via settings in the Control Panel. You can also toggle said settings via code and usage of Win32. I am not sure if .NET supports this or not. You can disable hardware acceleration in WPF through the settings file but this would only be done if certain WPF features did not work properly on the various platforms and hardware configurations that your software must support. This happens more often than one might think.

    To disable hardware acceleration inside of DirectX 9 you either create a device with hardware transform and lighting disabled (via a flag when the device is created) or create a reference device (which is awful). Since Direct3D 10 and 11 no longer support the fixed function pipeline I am not sure if they support disabling the hardware transform and lighting. I seriously doubt they do since all of this is done via shaders and the use of shaders implies and necessitates hardware acceleration since the shaders run on the GPU.

    Video device reset in DirectX does not disable hardware acceleration....although it can be used to do so. A video device reset is performed when the device has been lost due to a task switch (ALT-TAB) or to set certain devices settings. One could disable hardware T&L in DirectX 9 via a device reset but this would only be done in response to a user request. More often than not this option is not supported because it has very little use.

    The toggle you wish to create is already readily available in the OS.

  3. #3
    Registered User
    Join Date
    Jul 2013
    Posts
    3
    Quote Originally Posted by VirtualAce View Post
    What are you trying to do? Hardware acceleration inside of DirectX has nothing to do with hardware acceleration inside of Aero or some other desktop application. You can disable hardware acceleration in Windows 7 via settings in the Control Panel. You can also toggle said settings via code and usage of Win32. I am not sure if .NET supports this or not. You can disable hardware acceleration in WPF through the settings file but this would only be done if certain WPF features did not work properly on the various platforms and hardware configurations that your software must support. This happens more often than one might think.

    To disable hardware acceleration inside of DirectX 9 you either create a device with hardware transform and lighting disabled (via a flag when the device is created) or create a reference device (which is awful). Since Direct3D 10 and 11 no longer support the fixed function pipeline I am not sure if they support disabling the hardware transform and lighting. I seriously doubt they do since all of this is done via shaders and the use of shaders implies and necessitates hardware acceleration since the shaders run on the GPU.

    Video device reset in DirectX does not disable hardware acceleration....although it can be used to do so. A video device reset is performed when the device has been lost due to a task switch (ALT-TAB) or to set certain devices settings. One could disable hardware T&L in DirectX 9 via a device reset but this would only be done in response to a user request. More often than not this option is not supported because it has very little use.

    The toggle you wish to create is already readily available in the OS.
    I'm just trying to create a button to toggle hardware acceleration, with a hotkey. It's better than having to go through the properties menu and several different menus just for a task like this.

  4. #4
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,596
    Hardware acceleration for what? That makes no sense.

  5. #5
    Registered User
    Join Date
    Jul 2013
    Posts
    3
    Video acceleration for graphics.
    Some games require graphics cards with 3d acceleration. Hardware acceleration helps with 3d drawing and other things.

    Case and point:In order to switch to full or no acceleration, you have to literally do all this-
    Right click, properties,right-click,settings tab,advanced button, troubleshoot tab, to get to a slider and hit apply.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. 2D Acceleration/Velocity Processing
    By SMurf in forum Game Programming
    Replies: 2
    Last Post: 11-17-2010, 01:10 AM
  2. Video acceleration
    By jeffcobb in forum Tech Board
    Replies: 12
    Last Post: 01-26-2010, 04:11 AM
  3. Acceleration and time delta
    By anon in forum Game Programming
    Replies: 8
    Last Post: 10-19-2009, 04:32 PM
  4. Hardware acceleration on a secondary monitor
    By Night_Blade in forum Game Programming
    Replies: 2
    Last Post: 08-29-2007, 07:24 AM
  5. dos acceleration
    By variable in forum Game Programming
    Replies: 14
    Last Post: 02-17-2005, 10:03 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21