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.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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