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 inOnRenderFrame
. Then you just create an instance of your object and callRun
. 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 addGLControl
(fromOpenTK.GLControl.dll
), which is a standard WinForms control that renders content using OpenTK. You can find an example inDrawingForm
type here.
精彩评论