- AMD Device Library eXtra
- Programming with ADLX
- Overview
- ADLX Programming Guide
- ADLX Samples
- Overview
- C++ Samples
- Overview
- Display
- Display
- Display3DLUT
- DisplayBlanking
- DisplayColorDepth
- DisplayConnectivityExperience
- DisplayCustomColor
- DisplayCustomResolution
- DisplayEvents
- DisplayFreeSync
- DisplayGamma
- DisplayGamut
- DisplayGPUScaling
- DisplayHDCP
- DisplayInfo
- DisplayIntegerScaling
- DisplayPixelFormat
- DisplayScalingMode
- DisplayVariBright
- DisplayVSR
- Performance Monitoring
- Receiving Events Notifications
- C Samples
- Overview
- Display
- Display
- Display3DLUT
- DisplayBlanking
- DisplayColorDepth
- DisplayConnectivityExperience
- DisplayCustomColor
- DisplayCustomResolution
- DisplayEvents
- DisplayFreeSync
- DisplayGamma
- DisplayGamut
- DisplayGPUScaling
- DisplayHDCP
- DisplayInfo
- DisplayIntegerScaling
- DisplayPixelFormat
- DisplayScalingMode
- DisplayVariBright
- DisplayVSR
- Performance Monitoring
- Receiving Events Notifications
- ADLX SDK References
- Overview
- ADLX Helpers
- ADLX Interfaces
- Overview
- 3D Graphics
- 3D Graphics
- iadlx3danisotropicfiltering
- iadlx3dantialiasing
- iadlx3dframeratetargetcontrol
- iadlx3dimagesharpening
- iadlx3dradeonsuperresolution
- iadlx3dsettingschangedevent
- IADLX3DSettingsChangedEvent
- GetGPU
- IsAnisotropicFilteringChanged
- IsAntiAliasingChanged
- IsAntiLagChanged
- IsBoostChanged
- IsChillChanged
- IsEnhancedSyncChanged
- IsFrameRateTargetControlChanged
- IsImageSharpeningChanged
- IsMorphologicalAntiAliasingChanged
- IsRadeonSuperResolutionChanged
- IsResetShaderCache
- IsTessellationModeChanged
- IsWaitForVerticalRefreshChanged
- iadlx3dsettingschangedhandling
- iadlx3dsettingsservices
- Display
- Display
- 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
- Performance Monitoring
- Legal Information and Compliance/Disclaimers
Building C# bindings for ADLX
Navigation: Programming with ADLX → ADLX Programming Guide → Quick Start
This guide outlines the steps to build a C# binding wrapper for ADLX, a prerequisite to programming with ADLX in a C# application.
Prerequisite(s)
- ADLX SDK is installed.
- Visual Studio 2019 is installed.
- swigwin 4.0.2 is installed, and the path to the swigwin 4.0.2 installation is added to the Path user environment variable.
To build ADLX bindings in C#
- Create and name a folder for the C# ADLX binding wrapper, for example
ADLXCSharpBind. - Create a new file in the
ADLXCSharpBindfolder and title itADLXCSharpBind.i. - Edit
ADLXCSharpBind.iand add the SDK header files for the interfaces you wish to wrap by using the SWIG input format. To create bindings for event notifications, turn on thedirectorwrapping callback for respective listener interfaces.
For example,
feature("director") IADLXDisplayListChangedListener; Note: Refer to the C# samples ADLXCSharpBind.i file for an example of a C# binding.
- Create a C++ Dynamic Link Library project named
ADLXCSharpBindand configure the project as follows: - | Key | Value | Observations | |---|---|---| | C/C++ > Precompiled Header | Not Using Precompiled Headers | Do not use precompiled headers |
- Add the
ADLXCSharpBind.ifile to the project. - Right-click the
ADLXCSharpBind.ifile, and select Properties from the menu. In the Properties dialog select Configuration Properties > General > Item Type > Custom Build Tool.
Set the configuration as follows:
- | Key | Value | Observations |
|---|---|---|
| Command Line | if not exist (SolutionDir)outmkdir(SolutionDir)out swig.exe -c++ -csharp -dllimport ADLXCSharpBind -outdir ../out/ ADLXCSharpBind.i | Invoke SWIG.exe to build
ADLXCSharpBind.ifile | | Outputs | %(Filename)_wrap.cxx | Set output file name format | - Build the project.
Result: The following files are added to the ADLXCSharpBind project output folder:
ADLXCSharpBind_wrap.hfile.ADLXCSharpBind_wrap.cxxfile.- All *.cs files that correspond to the additional interfaces in the
ADLXCSharpBind.ifile. - Add the following files to the project:
ADLXCSharpBind_wrap.hADLXCSharpBind_wrap.cxxSDK/Platform/Windows/WinAPIs.cppSDK/ADLXHelper/Windows/Cpp/ADLXHelper.hSDK/ADLXHelper/Windows/Cpp/ADLXHelper.cpp- Rebuild the project.
Result: The ADLXCSharpBind.dll is built in the "$(SolutionDir)$(Platform)$/(Configuration)/" folder.
See Also: ADLXCSharpBind