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
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 .
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.