jondinham
jondinham

Reputation: 8499

Is it possible for OpenGL to work with .NET form?

I know that OpenGL can work with a classic window created by CreateWindow and handles through device context (GetDC), but is it possible for OpenGL to work with .NET form? I mean turning .NET form into a OpenGL window.

Upvotes: 4

Views: 1202

Answers (1)

Alex F
Alex F

Reputation: 43331

Yes, this is possible. OpenGL requires window handle, which is available through Form.Handle property. To get device context, call GetDC with this handle.

http://www.codeproject.com/KB/miscctrl/OpenGLViewWinForms.aspx

Upvotes: 3

Related Questions