ScnLib_EnableGPUAcceleration()

ScnLib_EnableGPUAcceleration()

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

  • Parameters
    • Enable [in]
      TRUE: To enable the GPU acceleration feature.
      FALSE: To disable the GPU acceleration feature.
  • Return Value
    None.

  • Remarks
    Windows offers a range of screen capture methods, including GDI screen capture, driver-based capture, DWM (Aero) hooking capture, DXGI desktop duplication, and WindowsGraphicsCapture, among others. GDI screen capture is popular for its simplicity, but it tends to slow down the system and captures at low frame rates, particularly on Windows Vista and newer systems due to the pipeline stall that occurs during the transfer of data from the GPU to system memory.

    To counteract these issues, some screen recording software may disable GPU rendering, also known as DirectX hardware acceleration, throughout the recording. This can reduce lag but often at the cost of user experience.

    Our SDK incorporates advanced techniques to deliver high-frame-rate, lag-free screen recording. It includes optimized methods for different versions of Windows: GDI capture for Windows XP, DWM (Aero) hooking for Windows Vista/7, DXGI duplication for Windows 8 and newer, and WindowsGraphicsCapture for Windows 10 and beyond.

    Our SDK exploits GPU acceleration on Vista and later systems for efficient screen content readback, crucial for smooth capture. It seamlessly combines these techniques, automatically adjusting to the operating system, thereby minimizing CPU usage and maximizing performance. GPU acceleration is enabled by default in the SDK, ensuring optimal recording.

    However, should the need arise to disable GPU acceleration, you can call this function with a FALSE parameter to revert to standard GDI screen capture across all systems, though this is generally not advisable unless you encounter system-specific issues. To check whether GPU acceleration is active, call ScnLib_IsGPUAccelerationEnabled().

  • See Also
    ScnLib_IsGPUAccelerationEnabled()
    ScnLib_EnableVideoVariableFrameRate()

Try the SDK for FREE SDK APIs overview