簡體   English   中英

如何在 OpenTK .NET Core 中設置 OpenGL API 版本?

[英]How to set OpenGL API version in OpenTK .NET Core?

如何使用 .NET Core 5.0 使用 NativeWindowSettings class 在 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)
};

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM