I read several different tutorials on how to get rendering to work from a C++/CLI to C#/WPF bridge using either OpenGL or DirectX, but I can only get the Grid area to clear and not draw geometry.
I have a custom game engine that has a dual-renderer (i.e. OpenGL 4.1 and DirectX 11) that works perfectly in a native C++ application. I tried to bridge the gap by creating a managed wrapper DLL for all the various functions and renderer.
I have checked the memory locations of each variable to ensure I was getting consistent results, and found that each and every variable all pointed to the correct location. Still only clears. Will not draw.
So, I figured that I would try to render something using the basic functions of OpenGL, i.e. glVertex3f(), etc. Still only clears.
To give a better idea of what I am doing specifically, I inherit from HwndHost to create a window that possesses a handle that I can then plug into the renderer to initialize it. I am able to load the various shaders, backbuffer, depth stencil, and viewport without any problems.
I am creating my own wrapper and refuse to use Tao, SharpDX, SharpGL, etc. to accomplish my needs as I prefer to use the engine's functions.
So my question is, what other ideas does anyone have about why a WPF window handle (grid) would not render geometry, but would otherwise clear?