Re: [PyOpenGL-Users] No valid context
Brought to you by:
mcfletch
From: physkets <phy...@tu...> - 2020-04-22 05:26:51
|
> FWIW I can't reproduce the issue here, although I note that line 121 mentioned in the traceback does not correspond to that line in the attached code, so I don't know if the difference matters. > Sorry about that, I added those commented hint lines later, but used the error output from before. Buy it still gives me the same issue. > > Offhand, I am surprised that `glVertexAttribPointer(...)` would be the call to fail; there are plenty of other GL calls that should have failed beforehand, if indeed they didn't fail. GLFW creates a context, and it looks like you're setting it as current. If that code does what it looks like, correctly, then the error especially wouldn't make sense. I would suggest to try validating the context, perhaps creating a debug context. > Can you point me to some resources that explain how I can do that? > What happens if you just try drawing an empty window without the problematic setup code? > It works if I simply set a single colour using `glClearColor()`. There is no crash, and it displays a window with the right color. > Also, why did you comment the context creation hints? > I did not think those ones were important. I assume it will use that latest version of opengl that I have. Is that not true? |