Re: "Attempt to retrieve context when no valid context" when calling glVertexAttribPointer in GL ES 2

Ian Mallett <[email protected]> Tue, 2 Jan 2018 23:00:58 -0700
Newsgroups gmane.comp.python.opengl.user
Message-ID <CAG4NV=u7zwsR_-mZi4M=JUzJnpdbvryRBECaW9DFkg=BCCJQAw@mail.gmail.com>
--===============6668428497671810112==
Content-Type: multipart/alternative; boundary="94eb2c0725b058fc3b0561d8f12d"

--94eb2c0725b058fc3b0561d8f12d
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Tue, Jan 2, 2018 at 10:44 PM, JP LeBreton <[email protected]> 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...
>
=E2=80=8BShortly after I sent my email, I remembered that PyOpenGL does som=
e 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

--94eb2c0725b058fc3b0561d8f12d
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div class=3D"gmail_extra">On Tue, Jan 2, 2018 at 10:44 PM=
, JP LeBreton <span dir=3D"ltr">&lt;<a href=3D"mailto:[email protected]"=
 target=3D"_blank">[email protected]</a>&gt;</span> wrote:<br><div class=
=3D"gmail_quote"><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px =
0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir=
=3D"ltr">PySDL2 and PyOpenGL have been working fine together for this appli=
cation 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 larg=
e role.</div></blockquote><div><div style=3D"font-family:times new roman,se=
rif" class=3D"gmail_default">It is distressingly common (less so, today, bu=
t still) to get an application that works perfectly on a variety of (arch/P=
CI, GPU, OS, driver) tuples, but is actually incorrect. It is also possible=
 to have bugs, usually in the driver (I have, for example, several outstand=
ing ones reported on various Linux graphics drivers) making perfect program=
s break.<br></div></div><div>=C2=A0</div><blockquote class=3D"gmail_quote" =
style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);pa=
dding-left:1ex"><div dir=3D"ltr">I&#39;ll read up on debugging with glGetEr=
ror...<br></div></blockquote><div><div style=3D"font-family:times new roman=
,serif;display:inline" class=3D"gmail_default">=E2=80=8BShortly after I sen=
t my email, I remembered that PyOpenGL does some amount of its own checking=
, which IIRC includes implicit `glGetError(...)`. Perhaps creating a <a hre=
f=3D"https://www.khronos.org/opengl/wiki/Debug_Output">debug context</a> wo=
uld enable more checks, assuming the Pi supports it (which IDR offhand). I =
might also suggest some kind of graphics debugger, like RenderDoc.<br><br>A=
lthough . . . 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?).<br><br>Ian=
</div></div></div></div></div>

--94eb2c0725b058fc3b0561d8f12d--


--===============6668428497671810112==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
--===============6668428497671810112==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
PyOpenGL Homepage
http://pyopengl.sourceforge.net
_______________________________________________
PyOpenGL-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pyopengl-users

--===============6668428497671810112==--