🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Hosting OpenGL C++ Window in C# WPF

Started by
1 comment, last by Programmer71 2 years ago

I am following this tutorial on how to host Win32 OpenGL windows in WPF. There is also a Microsoft walkthrough on how to Host a Win32 Control in WPF that is useful as well. The original project is from 2009 and uses managed C++ but doesn't actually render. I have rebuilt the program using the same source code (a few modifications due to debugging) using a C++ CLR Class Library. I use the compiled DLL in C# WPF however, when I run the program I get a blank window as opposed to the triangle in the tutorial.

I was wondering if someone could take a look at my program and see why nothing is rendering. I have tried StackOverflow, Computer Graphics Stack Exchange, and two different subreddits. I am hoping someone here can figure it out.

What the original program should render:

What I am getting:

Here is a link to the source on GitHub. The two files to really look at are OpenGLCpp.h & OpenGLHWND.xaml.cs. If you want to look at the project in your browser here is the StackOverflow post.

Advertisement

If you scroll down in the comments page on codeproject, you see newer comments, maybe you will find them usefull

This topic is closed to new replies.

Advertisement