- AMD Device Library eXtra
- 使用 ADLX 进行编程
- 概述
- ADLX 示例
- 概述
- C++ 示例
- 概述
- 显示
- 显示
- Display3DLUT
- DisplayBlanking
- DisplayColorDepth
- DisplayConnectivityExperience
- DisplayCustomColor
- DisplayCustomResolution
- DisplayEvents
- DisplayFreeSync
- DisplayGamma
- DisplayGamut
- DisplayGPUScaling
- DisplayHDCP
- DisplayInfo
- DisplayIntegerScaling
- DisplayPixelFormat
- DisplayScalingMode
- DisplayVariBright
- DisplayVSR
- C 示例
- 概述
- 显示
- 显示
- Display3DLUT
- DisplayBlanking
- DisplayColorDepth
- DisplayConnectivityExperience
- DisplayCustomColor
- DisplayCustomResolution
- DisplayEvents
- DisplayFreeSync
- DisplayGamma
- DisplayGamut
- DisplayGPUScaling
- DisplayHDCP
- DisplayInfo
- DisplayIntegerScaling
- DisplayPixelFormat
- DisplayScalingMode
- DisplayVariBright
- DisplayVSR
- ADLX SDK 参考
- 概述
- ADLX Helpers
- ADLX 接口
- 概述
- 3D 图形
- 3D 图形
- iadlx3danisotropicfiltering
- iadlx3dantialiasing
- iadlx3dframeratetargetcontrol
- iadlx3dimagesharpening
- iadlx3dradeonsuperresolution
- iadlx3dsettingschangedevent
- IADLX3DSettingsChangedEvent
- GetGPU
- IsAnisotropicFilteringChanged
- IsAntiAliasingChanged
- IsAntiLagChanged
- IsBoostChanged
- IsChillChanged
- IsEnhancedSyncChanged
- IsFrameRateTargetControlChanged
- IsImageSharpeningChanged
- IsMorphologicalAntiAliasingChanged
- IsRadeonSuperResolutionChanged
- IsResetShaderCache
- IsTessellationModeChanged
- IsWaitForVerticalRefreshChanged
- iadlx3dsettingschangedhandling
- iadlx3dsettingsservices
- 显示
- 显示
- iadlxdisplay3dlut
- IADLXDisplay3DLUT
- ClearUser3DLUT
- GetAllUser3DLUT
- GetHDRUser3DLUT
- GetSCEDynamicContrast
- GetSCEDynamicContrastRange
- GetSDRUser3DLUT
- GetUser3DLUTIndex
- IsCurrentSCEDisabled
- IsCurrentSCEDynamicContrast
- IsCurrentSCEVividGaming
- IsSupportedSCE
- IsSupportedSCEDynamicContrast
- IsSupportedSCEVividGaming
- IsSupportedUser3DLUT
- SetAllUser3DLUT
- SetHDRUser3DLUT
- SetSCEDisabled
- SetSCEDynamicContrast
- SetSCEVividGaming
- SetSDRUser3DLUT
- iadlxdisplay3dlutchangedevent
- iadlxdisplayblanking
- iadlxdisplaychangedhandling
- IADLXDisplayChangedHandling
- AddDisplay3DLUTEventListener
- AddDisplayGammaEventListener
- AddDisplayGamutEventListener
- AddDisplayListEventListener
- AddDisplaySettingsEventListener
- RemoveDisplay3DLUTEventListener
- RemoveDisplayGammaEventListener
- RemoveDisplayGamutEventListener
- RemoveDisplayListEventListener
- RemoveDisplaySettingsEventListener
- iadlxdisplayconnectivityexperience
- IADLXDisplayConnectivityExperience
- GetDPLinkRate
- GetNumberOfActiveLanes
- GetNumberOfTotalLanes
- GetRelativePreEmphasis
- GetRelativeVoltageSwing
- IsEnabledHDMIQualityDetection
- IsEnabledLinkProtection
- IsSupportedDPLink
- IsSupportedHDMIQualityDetection
- SetEnabledHDMIQualityDetection
- SetRelativePreEmphasis
- SetRelativeVoltageSwing
- iadlxdisplaycustomcolor
- IADLXDisplayCustomColor
- GetBrightness
- GetBrightnessRange
- GetContrast
- GetContrastRange
- GetHue
- GetHueRange
- GetSaturation
- GetSaturationRange
- GetTemperature
- GetTemperatureRange
- IsBrightnessSupported
- IsContrastSupported
- IsHueSupported
- IsSaturationSupported
- IsTemperatureSupported
- SetBrightness
- SetContrast
- SetHue
- SetSaturation
- SetTemperature
- iadlxdisplaycustomresolution
- iadlxdisplaygamma
- IADLXDisplayGamma
- GetGammaCoefficient
- GetGammaRamp
- IsCurrentDeGammaRamp
- IsCurrentReGamma36
- IsCurrentReGammaBT709
- IsCurrentRegammaCoefficient
- IsCurrentReGammaPQ
- IsCurrentReGammaPQ2084Interim
- IsCurrentReGammaRamp
- IsCurrentReGammaSRGB
- IsSupportedReGamma36
- IsSupportedReGammaBT709
- IsSupportedReGammaPQ
- IsSupportedReGammaPQ2084Interim
- IsSupportedReGammaSRGB
- ResetGammaRamp
- SetDeGammaRamp
- SetReGamma36
- SetReGammaBT709
- SetReGammaCoefficient
- SetReGammaPQ
- SetReGammaPQ2084Interim
- SetReGammaRamp
- SetReGammaSRGB
- iadlxdisplaygammachangedevent
- Miscellaneous
- 性能监控
构建 ADLX 的 Python 绑定
导航: 使用 ADLX 进行编程 → ADLX 编程指南 → 快速入门
本指南概述了为 ADLX 构建 Python 绑定包装器的步骤,这是在 Python 应用程序中使用 ADLX 进行编程的先决条件。
先决条件
- 已安装ADLX SDK。
- 已安装Visual Studio 2019。
- 已安装Python 3.9。
- 已安装pybind11。
- Python 3.9 安装的路径已添加到 **PYHOME** 系统环境变量中。
构建 Python 绑定以使用 ADLX
- 为您的 Python ADLX 绑定包装器创建一个文件夹,例如
ADLXPybind。 - 在
ADLXPybind文件夹中创建一个新文件,并将其命名为bind.cpp。 - 编辑
bind.cpp并使用pybind11绑定您希望包装的接口。要为事件通知创建绑定,请继承相应的监听器接口。
例如,继承 IADLXDisplayListChangedListener。
注意: 有关 Python 绑定的示例,请参阅 Python 示例 bind.cpp 文件。
- 创建一个名为
ADLXPybind的 C++ 动态链接库项目,并按如下方式配置该项目 - | 键 | 值 | 说明 | |---|---|---| | 高级 > 目标文件扩展名 | .pyd | 使用 .pyd 作为扩展名 | | VC++ Directories > Include Directories | $(PYHOME)/include
(PYHOME)/Lib/site−packages/pybind11/include∣AddPathofpythonincludeandpathofpybind11include∣∣VC++Directories>LibraryDirectories∣(PYHOME)/libs | 添加 Python 库路径 | | C/C++ > 预编译头 | 不使用预编译头 | 不使用预编译头 | | 链接器 > 输入 | python39.lib | 添加 Python 库 |
- 将
bind.cpp文件添加到项目中 - 将以下文件添加到项目中
SDK/Platform/Windows/WinAPIs.cppSDK/ADLXHelper/Windows/Cpp/ADLXHelper.hSDK/ADLXHelper/Windows/Cpp/ADLXHelper.cpp- 构建项目。
结果: ADLXPybind.pyd 在 "$(SolutionDir)$(Platform)$/(Configuration)/" 文件夹中生成。