我正在尝试设置一些非常简单的图形窗口,不幸的是,我也不得不在MacOS版本的大苏尔上使用它们。我使用的是F#编程语言和OpenTK包。
这是我目前拥有的代码。
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每当我运行这个命令时,我都会得到:
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)我已经尝试了所有可能的配置,但我被难住了,有没有人可以给我一个如何设置兼容性的指针?
发布于 2021-01-20 01:29:10
改变这一点
let prof = ContextProfile.Compatability
至
let prof = ContextProfile.Corehttps://stackoverflow.com/questions/65793794
复制相似问题