Rendering OpenGL in a Window with C#

Started by
1 comment, last by soconne 18 years, 10 months ago
I'm writing a particle engine, where I have a window to render the effect, along with a side panel that has the controls on it used to adjust the parameters. The way I'm doing it right now is with a timer, and rendering whenever it ticks. This way seems to be running really slowly, and I'm wondering how to do it better. I know how to do it in Win32, but just not familiar enough with using OpenGL with .Net. Anyone have any ideas? Thanks -Shane
Advertisement
If you look at the examples folder, in the TAO sources, you'll find some NeHe examples translated in C#/TAO... there you'll see how to avoid using the
Application.Run(new Form1());
method (that enables GDI main loop), using a custom application loop that, if I have understood, is what you need... you'll se that it's exactly like C++ examples... :D
Its basically the EXACT same as Win32 except you replace hWnd with the form's HANDLE when initializing OpenGL. Its that simple. You don't need any third party library. At least this is how to do it with C++ VC 2005 using WinForms.
Author Freeworld3Dhttp://www.freeworld3d.org

This topic is closed to new replies.

Advertisement