sunnlok
Topic Author
Posts: 30
Joined: 04 Jul 2017, 17:45

Usage from other dynamic libraries

04 Apr 2020, 00:53

Is it possible to use noesis from different dynamic libraries than the one which initializes it?
Ofc they will be static linked against noesis, but i am wondering if i can just create elements and use reflection from dll plugins that are loaded afterwards.

Another point of interest would be if this could also work for managed noesis, where the engine loads and initializes noesis and the render device, and then allows usage of noesis from within the mono runtime the engine is already hosting.
 
User avatar
jsantos
Site Admin
Posts: 2959
Joined: 20 Jan 2012, 17:18
Contact:

Re: Usage from other dynamic libraries

04 Apr 2020, 14:30

Yes, all those scenarios are supported and they should be working fine.
 
sunnlok
Topic Author
Posts: 30
Joined: 04 Jul 2017, 17:45

Re: Usage from other dynamic libraries

04 Apr 2020, 17:50

How would i go about using noesis from c#?
Just import the managed library?
 
User avatar
jsantos
Site Admin
Posts: 2959
Joined: 20 Jan 2012, 17:18
Contact:

Re: Usage from other dynamic libraries

04 Apr 2020, 21:31

The C# SDK is a separate download, it provides many samples. It is available in the Downloads section.
 
sunnlok
Topic Author
Posts: 30
Joined: 04 Jul 2017, 17:45

Re: Usage from other dynamic libraries

15 Apr 2020, 16:51

So how exactly would i go about using noesis in my project that gets loaded by an engine implementing a render device alread?
The sdk just seems to contain samples which reference nuget packages. I am unsure what dependencies i need to add to my project.
Do i just add the Noesis.GUI nuget package?
 
User avatar
jsantos
Site Admin
Posts: 2959
Joined: 20 Jan 2012, 17:18
Contact:

Re: Usage from other dynamic libraries

15 Apr 2020, 16:57

Yes, you only need Noesis.GUI. MonoGame wrapper is exactly doing that.
 
sunnlok
Topic Author
Posts: 30
Joined: 04 Jul 2017, 17:45

Re: Usage from other dynamic libraries

15 Apr 2020, 17:17

Neat.
Are there any plans to use c# annotations in the future for things like properties and binding?
The current way seems a bit cumbersome with manually calling property changed events.
Might be nice to have as an extra layer of abstraction.
 
User avatar
jsantos
Site Admin
Posts: 2959
Joined: 20 Jan 2012, 17:18
Contact:

Re: Usage from other dynamic libraries

15 Apr 2020, 17:24

By the way, I forgot to say that in C# we are not exposing the abstract class RenderDevice to implement your own device. D3D11 and GL implementations come by default. This is something we are going to change in the future.
Neat.
Are there any plans to use c# annotations in the future for things like properties and binding?
The current way seems a bit cumbersome with manually calling property changed events.
Might be nice to have as an extra layer of abstraction.
yes, this is planned.
Also there doesnt seem to be a NuGet package for 3.0.b yetm does it still work with the old version?
Yes, latest 3.0 beta is on Nuget. You can download the samples from the sticky thread.
 
sunnlok
Topic Author
Posts: 30
Joined: 04 Jul 2017, 17:45

Re: Usage from other dynamic libraries

15 Apr 2020, 18:46

By the way, I forgot to say that in C# we are not exposing the abstract class RenderDevice to implement your own device. D3D11 and GL implementations come by default. This is something we are going to change in the future.
This is why i asked if it will use the render device already created in the native and loaded engine plugin. I dont care about the device implementation on the managed side since thats loaded by the engines embedded mono runtime.
 
sunnlok
Topic Author
Posts: 30
Joined: 04 Jul 2017, 17:45

Re: Usage from other dynamic libraries

16 Apr 2020, 17:31

From the looks of it, this doesnt work since none of the classes defined in c# get picked up.

It seems like there is no way to make it aware of the already existing noesis instance in the loaded Noesis.dll and manually create a reference to that in managed code and invoke the component registration. Calling init from c# again will just crash.

Who is online

Users browsing this forum: No registered users and 9 guests