Closed geohuz closed 2 years ago
It looks like your issue is with openGL not Nim. What OS and version are you running. What is your graphics hardware? It needs to support openGL 4.1 for boxy to work. If you are on linux what does your glxinfo
say?
I'm using macos big sur, version 11.6, Graphics AMD Radeon PRO 5500m
What does your openGL version say?
echo "GL_VERSION: ", cast[cstring](glGetString(GL_VERSION))
echo "GL_VENDOR: ", cast[cstring](glGetString(GL_VENDOR))
echo "GL_RENDERER: ", cast[cstring](glGetString(GL_RENDERER))
Do you have 4.1? Mac does not give you 4.1 by default you need to ask it. But it should give that to you.
with GLFW:
windowHint(CONTEXT_VERSION_MAJOR, 4)
windowHint(CONTEXT_VERSION_MINOR, 1)
I'm not sure if I've done right, I just installed glfw and glew using homebrew:
brew install glfw3
brew install glew
Oh I copied your code into the example code and it runs successfully!
...
if init() == 0:
quit("Failed to Initialize GLFW.")
windowHint(RESIZABLE, false.cint)
windowHint(CONTEXT_VERSION_MAJOR, 4)
windowHint(CONTEXT_VERSION_MINOR, 1)
...
Just compiled with nim 1.6(released), got the following error: