dwmkerr / sharpgl

Use OpenGL in .NET applications. SharpGL wraps all modern OpenGL features and offers a powerful scene graph to aid development.
MIT License
753 stars 300 forks source link

Integration between a WPF application an a C++ rendering engine #139

Open fapablazacl opened 6 years ago

fapablazacl commented 6 years ago

Hi!

I have problems integrating a custom rendering engine written in C++ into a WPF application. In order to integrate this engine into the WPF app, I'm currently developing a wrapper in C++/CLI (to expose a .NET class library). I have no problems with that. When I initialize my engine (at the OpenGLInitialized event), it detects the current GL context correctly and all the GL commands invoked on the native side works as intended. But, the engine fails during its rendering operations (at the OpenGLDraw event), asserting a GL_INVALID_OPERATION error. Im using the HiddenWindow provider, with a OpenGL 3.3 profile (the engine assumes a 3.3 core profile).

Thanks in advande for any clue regarding this problem.

Warms regards.