开发者

F# and OpenTK in Windows Forms

Does anyone know a good tutorial of using F# and OpenTK in Windows Forms?

These links I've already seen: http://fsxplat.codeplex.com/releases/view/55463 http://www.opentk.com/node/1889

开发者_JS百科

Thank you!


I believe the examples in the fsxplat project should be a decent starting point. There are two ways you can use OpenTK with WinForms.

  • If you're creating an application that has just one OpenTK window, then you can inherit from GameWindow and implement your logic in OnRenderFrame. Then you just create an instance of your object and call Run. This approach is used for example in the cube tutorial.

  • If you want to use OpenTK as part of a larger application, you can create a standard Form and add GLControl (from OpenTK.GLControl.dll), which is a standard WinForms control that renders content using OpenTK. You can find an example in DrawingForm type here.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜