OpenTK 4.8.2 C# Dose not change or swap any buffer frames and dose not change the clear/beggrund color

Hi I’m new to OpenTK but have som good knowledge and experience with C#.
I’m about to make an open source project and want to do it simple by using C#.
I know OpenGL and hav try it out with C++.
I’m was about to make the setup in visual Studio and got so fra that I was able to make a window with a title but when I try to setup the basics of the renderer, I got stuck.
I was following this video step by step and add som stuff by my self. Link to the video that i found

Here is the source code:

using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using OpenTK.Graphics.OpenGL4;
using OpenTK.Windowing.Desktop;
using OpenTK.Windowing.Common;
using OpenTK.Windowing.GraphicsLibraryFramework;
using OpenTK.Mathematics;

namespace BlockyBuild {
    public interface Script {
        /// <summary>
        /// Runs once on the first frame
        /// </summary>
        public void OnStart();

        /// <summary>
        /// Runs once on each frame update
        /// </summary>
        /// <param name="delta"></param>
        public void OnUpdate(float delta);

        /// <summary>
        /// Runs once on each input event
        /// </summary>
        /// <param name="inputEvent"></param>
        public void OnInput(string inputEvent);
    }

    public abstract class GameObject {
        public abstract string UUID { get; set; }
        public abstract Vector3i Position { get; set; }
        public abstract Script Script { get; set; }
        public abstract List<GameObject> Children { get; set; }
    }

    public struct Shader {
        public int id;
    }

    public struct ShaderProgram {
        public int id;
    }

    public static class Game {
        private static List<GameObject> GameObjects = new List<GameObject>();

        // Add a game object to the game object list
        public static void AddGameObject(GameObject gameObject) {
            GameObjects.Add(gameObject);
        }

        // Remove a game object from the game object list
        public static void RemoveGameObject(GameObject gameObject) {
            GameObjects.Remove(gameObject);
        }

        // Load shader from path
        private static Shader LoadShader(string path, ShaderType type) {
            int ID = GL.CreateShader(type);
            try {
                GL.ShaderSource(ID, File.ReadAllText(path));
                GL.CompileShader(ID);
                string infoLog = GL.GetShaderInfoLog(ID);
                if (!string.IsNullOrEmpty(infoLog))
                    throw new Exception(infoLog);
            } catch {
                throw new Exception($"Error: No shader file found on path {path}.");
            }

            return new Shader() { id = ID };
        }

        // Load shader program from string paths
        private static ShaderProgram LoadShaderProgram(string vertexShaderLocation, string fragmentShaderLocation) {
            int id = GL.CreateProgram();

            Shader vertexShader = LoadShader(vertexShaderLocation, ShaderType.VertexShader);
            Shader fragmentShader = LoadShader(fragmentShaderLocation, ShaderType.FragmentShader);

            GL.AttachShader(id, vertexShader.id);
            GL.AttachShader(id, fragmentShader.id);
            GL.LinkProgram(id);
            GL.DetachShader(id, vertexShader.id);
            GL.DetachShader(id, fragmentShader.id);
            GL.DeleteShader(vertexShader.id);
            GL.DeleteShader(fragmentShader.id);

            string infoLog = GL.GetProgramInfoLog(id);
            if (!string.IsNullOrEmpty(infoLog))
                throw new Exception(infoLog);

            return new ShaderProgram() { id = id };
        }

        static void Main(string[] args) {
            // Setup game window

            // set window settings

            GameWindowSettings gws = GameWindowSettings.Default;
            NativeWindowSettings nws = NativeWindowSettings.Default;

            // Set max FPS (0.0 means no limit)
            gws.UpdateFrequency = 0.0;

            // Setup API verson
            nws.APIVersion = Version.Parse("4.1.0");

            nws.ClientSize = new Vector2i(1280, 720);
            nws.Title = "Blocky Build";

            GameWindow window = new GameWindow(gws, nws);

            // Window update frame function
            window.UpdateFrame += (args) => {

            };

            // Load function
            ShaderProgram shaderProgram = new ShaderProgram() { id = 0 };
            window.Load += () => {
                string rootFolder = "../../../Shaders/";
                shaderProgram = LoadShaderProgram(rootFolder + "vertex.glsl", rootFolder + "fragment.glsl");
            };

            // Render frame function
            window.RenderFrame += (args) => {
                GL.UseProgram(shaderProgram.id);

                GL.ClearColor(1.0f, 0, 0, 1.0f);
                GL.Clear(ClearBufferMask.ColorBufferBit);

                window.SwapBuffers();
            };

            window.Run();
        }
    }
}

I’m hoping that some of you can help me and tell me what I’m doing wrong. Thx.

I was trying to make a window with a read backgrund by using OpenTK 4.8.2 to test if i have set it up right.

I got a window with a white screen and a title.

I’m not sure if it is the setup that is wrong or me doing something stupit.

I’m using Visual Studio 2022 and have setup OpenTK by using NuGet.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật