Std EditionPro EditionMax Edition
__declspec(dllimport) void __stdcall ScnLib_EnableGPUAcceleration(BOOL bEnable);
[DllImport("ScnLib.dll")] public static extern void ScnLib_EnableGPUAcceleration(bool Enable);
Public Declare Sub ScnLib_EnableGPUAcceleration Lib "ScnLib.dll" (ByVal Enable As Boolean)
procedure ScnLib_EnableGPUAcceleration(Enable: LongBool); stdcall; external 'ScnLib.dll';
  • Description
    Enable/Disable the GPU accelerated screen capture feature.

  • Parameters
    • Enable [in]
      TRUE: Enable the GPU acceleration feature.
      FALSE: Disable the GPU acceleration feature.
  • Return Value

  • Remarks
    There are various kinds of screen capture techniques available for Windows, such as GDI screen capture, driver-based screen capture, DWM(Aero) hooking capture, DXGI desktop duplication and so on. The most widely used technique is GDI screen capture and it's the simplest one too. But the GDI screen capture lags system very badly and can only capture screen in a low frame rate, especially on Windows Vista / 7 / 8 / 8.1 / 10 because of the poor readback performance from graphics card RAM to system RAM on these GPU rendered systems. Some screen recording software may need to temporarily disable GPU rendering (a.k.a DirectX hardware acceleration) in the whole recording process in order to eliminate the system lags, obviously that results a poor user experience. Our SDK utilizes the most advanced screen capture techniques which can provide a lag-free high-frame-rate screen recording experience, including DWM(Aero) hooking capture for Windows Vista / 7, DXGI desktop duplication for Windows 8 / 8.1 / 10, and GDI screen capture for Windows XP. We implemented the driver-based screen capture for Windows XP many years ago but soon realized installing an extra driver could be another poor user experience, so we finally utilize the standard GDI screen capture for Windows XP and it works fine because Windows XP is not a GPU rendered system after all. The DWM(Aero) hooking capture and DXGI desktop duplication can utilize the GPU to accelerate the readback of the screen content on Windows Vista / 7 / 8 / 8.1 / 10, that is the key to lag-free screen capture. Our SDK integrates these techniques seamlessly, hiding all the complex things behind, adapting to different Windows systems automatically, providing unbelievable screen recording performance with minimum CPU usage. That's the biggest advantage of this SDK. The GPU acceleration feature is enabled by default. However, the SDK also provides you a way to switch to non-GPU acceleration mode: call this function with a FALSE parameter, then the SDK will only utilize the standard GDI screen capture technique for all systems. Doing this is not recommended unless you experience problems with specific systems. To check if the GPU acceleration feature is currently enabled or not, call ScnLib_IsEnabledGPUAcceleration().

  • See Also
    ScnLib_IsEnabledGPUAcceleration(), ScnLib_EnableVideoVariableFrameRate()

ZD Soft Screen Recorder SDK APIs Overview