|
Hello again, I'm running into a Runtime problem (Windows 10 - VS2019 pro ) Here is my code However, on the last line, I get a Runtime exception : I tried openning a window first with GLFW, and creating the context in various ways, but no luck. Thanks ! |
Answered by
Perksey
Apr 23, 2021
Replies: 2 comments 8 replies
|
Anyone with a working example of Silk.NET GLFW + OpenGL ? |
0 replies
var gl = GL.GetApi(glfw.Context);You're trying to use the context we use to load GLFW to load OpenGL functions, which won't work. Instead, you need to create a context which hooks into var gl = GL.GetApi(glfw, myCoolWindowPointer);Where myCoolWindowPointer is obtained by |
8 replies
Answer selected by
Perksey
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You're trying to use the context we use to load GLFW to load OpenGL functions, which won't work. Instead, you need to create a context which hooks into
glfwGetProcAddress. Luckily, we've already done this for you. Try this line:Where myCoolWindowPointer is obtained by
glfw.CreateWindow. You can't create aGlfwContextuntil you have a window on-screen.