Skip to content

qian-o/RPRSharp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RPRSharp

This repository is developed based on the C# bindings provided by RadeonProRenderSDK, improving its enums and structs to make the calling method more suitable for C# developers.

The repository code uses ClangSharp to perform semantic analysis and generation on the RadeonProRender_v2.h file, and refactors it using the Camel-Case naming convention.
Note: Some enumerations and structures may have names that do not match their original meanings.

The interface code has been double-checked on the RadeonProRender_v2.h file provided by the RadeonProRenderSDK repository, and all the interfaces have been implemented. The current code version is 3.1.5.

The code is currently in the early stages of development, and it cannot be guaranteed that all interfaces are functional. I will continue to improve the code based on the tutorial examples provided by RadeonProRenderSDK, and I also welcome contributions from the community.

Usage:

Call the Core.Init() function in the program entry point and provide a callback function for registering dependency libraries.

static void Main(string[] _)
{
    Core.Init(RegisterLibrary);

    // code
    Rpr.Create....;
}

private static void RegisterLibrary(Platform platform, out string rprPath)
{
    string dir = Path.Combine(AppContext.BaseDirectory, "AMD Radeon ProRender SDK");

    rprPath = platform switch
    {
        Platform.CentOS => Path.Combine(dir, "binCentOS7", "libRadeonProRender64.so"),
        Platform.Ubuntu => Path.Combine(dir, "binUbuntu20", "libRadeonProRender64.so"),
        Platform.MacOS => Path.Combine(dir, "binMacOS", "libRadeonProRender64.dylib"),
        Platform.Windows => Path.Combine(dir, "binWin64", "RadeonProRender64.dll"),
        _ => string.Empty,
    };
}

About

Radeon Pro Render ported to C# bindings.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages