Re: [PyOpenGL-Users] "Attempt to retrieve context when no valid context" when calling glVertexAttri
Brought to you by:
mcfletch
From: Ian M. <ia...@ge...> - 2018-01-03 06:01:20
|
On Tue, Jan 2, 2018 at 10:44 PM, JP LeBreton <jpl...@gm...> wrote: > PySDL2 and PyOpenGL have been working fine together for this application > on x86[_64] Linux, macOS, and Windows, on Intel and Nvidia GPUs, but I > realize the Pi is a fairly different environment and drivers play a large > role. > It is distressingly common (less so, today, but still) to get an application that works perfectly on a variety of (arch/PCI, GPU, OS, driver) tuples, but is actually incorrect. It is also possible to have bugs, usually in the driver (I have, for example, several outstanding ones reported on various Linux graphics drivers) making perfect programs break. > I'll read up on debugging with glGetError... > Shortly after I sent my email, I remembered that PyOpenGL does some amount of its own checking, which IIRC includes implicit `glGetError(...)`. Perhaps creating a debug context <https://www.khronos.org/opengl/wiki/Debug_Output> would enable more checks, assuming the Pi supports it (which IDR offhand). I might also suggest some kind of graphics debugger, like RenderDoc. Although . . . the error does seem to indicate at least the basic nature of the problem rather clearly. Perhaps the context exists, but is invalid for some reason (Unsupported flags? Invalid version? Invalid size?). Ian |