Reputation: 195
I am trying to set up some very simple graphic windows which I also have to use on MacOS version Big Sur unfortunately. I am using the F# programming language and the OpenTK package.
This is the code I have at the moment.
open OpenTK.Windowing.Desktop
open OpenTK.Mathematics
open OpenTK.Windowing.Common
open OpenTK.Graphics
[<EntryPoint>]
let main argv =
let prof = ContextProfile.Compatability
let windowSettings = NativeWindowSettings()
windowSettings.Size <- Vector2i(800, 600)
windowSettings.Title <- "OpenTK Window"
windowSettings.Profile <- prof
windowSettings.APIVersion <- Version "3.3"
use window = new GameWindow(GameWindowSettings.Default, windowSettings)
//window.MakeCurrent()
//window.Run ()
0
Whenever I run this I get:
Unhandled exception. OpenTK.Windowing.GraphicsLibraryFramework.GLFWException: NSGL: The targeted version of macOS only supports forward-compatible core profile contexts for OpenGL 3.2 and above
at OpenTK.Windowing.Desktop.GLFWProvider.<>c.<.cctor>b__5_0(ErrorCode errorCode, String description)
I have tried every single configuration possible but I am stumped, is there anyone that can give me a pointer on how to set the compatibility for this?
Upvotes: 1
Views: 695
Reputation: 162164
Change this
let prof = ContextProfile.Compatability
to
let prof = ContextProfile.Core
Upvotes: 1