如何使用 NativeWindowSettings 类使用 .NET Core 5.0 在 OpenTk 4.6.4 中设置 OpenGl 版本?以及如何在这段代码中正确实现它
var nativeWindowSettings = new NativeWindowSettings
{
Size = new Vector2i(width, height),
Title = title,
API = ContextAPI.OpenGL,
Profile = ContextProfile.Core,
// APIVersion = ??
};
最佳答案
您可以设置 APIVersion
属性(另请参阅 OpenTK_hello_triangle。例如:
var nativeWindowSettings = new NativeWindowSettings()
{
// [...]
APIVersion = new System.Version(4, 6)
};
关于c# - 如何在 OpenTK .NET Core 中设置 OpenGL API 版本?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67976008/