I am attempting to make a unity plugin for rendering to opengl natively.
I have been able to get a mac version working but bridging c++ to Objective c is simple. I am now attempting to bridge a c++ dll to my C# code and am having little to no luck.
I am able to use every exported method except the rendering methods.
The Header
extern "C" void __declspec(dllexport) UnitySetGraphicsDevice (void* device, int deviceType, int eventType);
extern "C" void __declspec(dllexport) UnityRenderEvent (int eventID);
And Code File
void UnitySetGraphicsDevice (void* device, int deviceType, int eventType){
}
void UnityRenderEvent (int eventID){
}
Both of these methods cause unity to crash
However if I omit these two methods, everything else seems to run without a hitch.
Since i really need these methods to be functioning, I would like to know what I am doing wrong.
here is an example of a dll export that is working
Header
void __declspec(dllexport) SetImageParams(void* textureID, int width, int height, const char * pluginsPath, const char * videoURL);
Code
void SetImageParams(void *textureID, int width, int height, const char * pluginsPath, const char * videoURL){
}
I am running this in VMWare Fusion on Windows 7