#oh ok so basically im trying to get an
1 messages · Page 1 of 1 (latest)
i haven't tried that, usually it wants it to be name specific or it gets upset, but that was for structs, not typedefs, so i suppose it might work, ill try that and report back, thanks!
Please do report back. I'm curious about how that works too.
In case you're not aware, "int" and "unsigned int" are not standard sizes across languages (and not even within c++).
huh that is fascinating, thanks
sorry for taking a while, before i can even use the function that requires the uint i have to first get nvidia context working, and it is being a pain currently
keeps on giving me this error, which i cant seem to find any solutions to online
Probably means that there's no corresponding method in the dll.
that seems unlikely considering how it was used in the demo app in the flow github
although should there be any easy way of checking the methods a dll contains, i would happilly check
Well, if you need further help, you'll have to share your code(at least where the error points) and the code of the demo app you're referring to. Or the source code of the dll.
nvidia flow is closed source, but i can send the link to the github demo app they have
might want to specify the relevant file code line too.
As well as share your own code
ok sure
The whole repository is in c/c++, so I'm not sure how you can use it as a reference for accessing methods in c#
the methods they use are from the dll, so im hopeful that it can be used in c# using equivalent means
my code: ```csharp
[DllImport("NvFlowLibRelease_win64")]
extern static unsafe AppGraphCtx* AppGraphCtxCreate(int deviceID);
void Start()
{
NVIDIA.Initialize();
Debug.Log(NVIDIA.ChipsetInfo.DeviceId);
unsafe
{
my_app_graph = AppGraphCtxCreate(NVIDIA.ChipsetInfo.DeviceId);
}
}
the errors out on the my app graph line
any ideas?
I can't see any "AppGraphCtxCreate" method being called in the file that you linked
what do you mean?
it isnt being called sure
but it still is being existed there
How do you know that?
where did you find that exact name "AppGraphCtxCreate"?
line 34
Don't see it there
NV_FLOW_API NvFlowContext* NvFlowInteropCreateContext(AppGraphCtx* appctx);
oh whoops wrong one then
brb while i recheck where on earth it was
https://github.com/NVIDIAGameWorks/Flow/blob/master/demo/DemoApp/appGraphCtx.h line 41 sorry lol, sometimes i mix things up lol
any ideas?
Hmm
lol
i could always try older versions of nvidia flow incase the newest version for somereason doesn't have the functions?
try
[DllImport("NvFlowLibRelease_win64.dll")]
?🤔
Not sure if that's the issue
oh ok ill try that, brb!
gives me the same error as usual
weird
Might want to check the things mentioned here
https://docs.microsoft.com/en-us/dotnet/api/system.entrypointnotfoundexception?view=net-6.0
Also...
checked arround there, couldn't get anything there working
althoug the dumpbin was interesting, as it showed no decorated function names
weird
just regular
ill send it here brb
there
Maybe it's the AppGraphCtx definition...🤔
What if you just use int for the return type?
how so?
oh, ok ill try that
i am also in the process of making noodles, so if my replies are late i apologise
still errors
Welp no clue then. Honestly I don't have that much experience with using C dlls in C#
i believe it to be a c++ dll personally, but it is ok, thanks for trying though!
From this dump it doesn't seem like there's a method that you're trying to call
oh, that is interesting then... but why in the demo app does it use it?
Donno. This "C" might indicate that the library is in C. Not 100% sure though
#define NV_FLOW_API extern "C" __declspec(dllexport)
No clue.
Maybe that's from a different library?
nah, the extern c stuff is to stop mangling of parameters during interop
perhaps, ill look around and see if i can see any other imports
as i dont think i can really go without this function, as almost all nvidia flow functions require nvidia flow context, to create context you need app graph ctx
weird, i do wonder how the many app's that use nv flow managed to create context then...
perhaps i could find the code they use to interface with nv flow?
Do you have any example of apps written in C#? It seems to be way more compatible with unreal/C++.
unfortunately i do not
Looking at this file makes me think, that there's a lot more to it than just importing the AppGraphCtxCreate function.
https://github.com/NVIDIAGameWorks/Flow/blob/master/demo/DemoApp/appGraphCtxLoaderGenerated.h
perhaps
really wish unity had a better way of interacting with dll's, but i suppose it is more to do with c# than unity
Might as well write your own liquid simulation at this point hahah
lol, so much math though lol, id rather deal with the pain of interop than deal with math and physics lol
perhaps i can find some other fluid simulation api that has better documentation, that i can try get working with unity
google has some fascinating ones, although almost all are in js
sorry for late reply, but after enough trial and error i can confirm that just passing uint in seems to work fine, thanks so much!