Every type and function ignored, when generating bingings for LuxCoreRenderer SDK

Open
#1,664 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
cpp, csharp
Domain
devtools

Research direction

Start with the C# ILibrary setup shown in the issue, the listed LuxCore and luxrays headers, and the verbose “ignored due to ignored type” messages. Compare those messages with the generated Std.cs and Std-symbols.cpp outputs to identify where LuxCore declarations stop being processed. Done means a documented configuration or minimal working example that generates useful LuxCore-related C# bindings.

Written by the indexing model from the issue text.

Description

I am looking for tool that will help me generate bindings for LuxCoreRenderer SDK (https://github.com/LuxCoreRender/LuxCore).

I downloaded sdk build for Win64 (luxcorerender-v2.6-win64-sdk.zip)

Then setup simple cs program:

using CppSharp;
using CppSharp.AST;
using CppSharp.Generators;

public class LuxCoreLib : ILibrary
{
    public void Setup(Driver driver)
    {
        var lux_path = $"C:/Users/{...}/Desktop/luxcore";
        
        var options = driver.Options;
        options.GeneratorKind = GeneratorKind.CSharp;
        driver.ParserOptions.AddArguments("-fcxx-exceptions");
        options.Verbose = true;
        
        var module = options.AddModule("LuxCore");
        module.SharedLibraryName = "luxcore.dll";
        module.IncludeDirs.Add($"{lux_path}/include");
        
        module.Headers.Add("luxcore/cfg.h");
        module.Headers.Add("luxcore/luxcore.h");
        module.Headers.Add("luxrays/utils/exportdefs.h");
        module.Headers.Add("luxrays/utils/ocl.h");
        module.Headers.Add("luxrays/utils/oclerror.h");
        module.Headers.Add("luxrays/utils/properties.h");
        module.Headers.Add("luxrays/utils/utils.h");
        module.Headers.Add("luxrays/utils/cyhair/cyHairFile.h");
        
        module.LibraryDirs.Add($"{lux_path}/lib");
        module.Libraries.Add("luxcore.lib");
    }

    public void SetupPasses(Driver driver) { }
    public void Preprocess(Driver driver, ASTContext ctx) { }
    public void Postprocess(Driver driver, ASTContext ctx) { }
}

public static class prog { public static void Main(string[] args) => ConsoleDriver.Run(new LuxCoreLib()); }

As output I got Std.cs and Std-symbols.cpp, which doesn't looks like that they are contain any useful cs bingings.

Also output was full of was ignored due to ignored type messages, which did contained some ::luxrays.

And at this point I completely do not understand what I should do next. Why things was just "ignored". Should I somehow set paths to win sdk or something like that? Or LuxCore such a project that couldn't be easily binded via automated tools like CppSharp?

I'll appreciate any guidance, or maybe some minimal, maybe no fully valid, but working example which generate some luxcore related bingings.

Dominant language
C#
Stars
3.4k
Forks
541
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from mono/CppSharp

All issues in mono/CppSharp

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.