Re: No valid context

physkets via PyOpenGL-Users <[email protected]> Wed, 22 Apr 2020 07:26:37 +0200 (CEST)
Newsgroups gmane.comp.python.opengl.user
Message-ID <[email protected]>

> 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?


_______________________________________________
PyOpenGL Homepage
http://pyopengl.sourceforge.net