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

JP LeBreton <[email protected]> Wed, 3 Jan 2018 14:05:34 -0600
Newsgroups gmane.comp.python.opengl.user
Message-ID <CAEBBUWg7Ob4K5=M81Mevb+RkCzu=VZ=Mgvephj+73qd_Ry_fCQ@mail.gmail.com>
--===============6759383064505757341==
Content-Type: multipart/alternative; boundary="001a11429b786387400561e4bf71"

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

I've now tried a few other things, like setting
OpenGL.CONTEXT_CHECKING=3DTrue and forcing an ES 2.0 context specifically,
and experimenting with SDL_GL_CONTEXT_FLAGS, but nothing seems to work.
Debug contexts don't seem supported, they're only core as of 4.3.

Searching this mailing list for "raspberry" returns only this thread so it
seems reasonable to assume that PyOpenGL has never worked on the Pi without
significant modifications; guess I should have searched this list before I
started.

On Wed, Jan 3, 2018 at 12:00 AM, Ian Mallett <[email protected]> wrote:

> 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 larg=
e
>> 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 one=
s
> 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 s=
ome
> 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
>

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

<div dir=3D"ltr"><div>I&#39;ve now tried a few other things, like setting O=
penGL.CONTEXT_CHECKING=3DTrue and forcing an ES 2.0 context specifically, a=
nd experimenting with SDL_GL_CONTEXT_FLAGS, but nothing seems to work. Debu=
g contexts don&#39;t seem supported, they&#39;re only core as of 4.3.<br><b=
r></div>Searching this mailing list for &quot;raspberry&quot; returns only =
this thread so it seems reasonable to assume that PyOpenGL has never worked=
 on the Pi without significant modifications; guess I should have searched =
this list before I started.<br></div><div class=3D"gmail_extra"><br><div cl=
ass=3D"gmail_quote">On Wed, Jan 3, 2018 at 12:00 AM, Ian Mallett <span dir=
=3D"ltr">&lt;<a href=3D"mailto:[email protected]" target=3D"_blank">ian@ge=
ometrian.com</a>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" sty=
le=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div d=
ir=3D"ltr"><div class=3D"gmail_extra"><span class=3D"">On Tue, Jan 2, 2018 =
at 10:44 PM, JP LeBreton <span dir=3D"ltr">&lt;<a href=3D"mailto:jplebreton=
@gmail.com" target=3D"_blank">[email protected]</a>&gt;</span> wrote:<br=
></span><div class=3D"gmail_quote"><span class=3D""><blockquote class=3D"gm=
ail_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 w=
orking fine together for this application on x86[_64] Linux, macOS, and Win=
dows, on Intel and Nvidia GPUs, but I realize the Pi is a fairly different =
environment and drivers play a large role.</div></blockquote></span><div><d=
iv style=3D"font-family:times new roman,serif" class=3D"gmail_default">It i=
s distressingly common (less so, today, but still) to get an application th=
at 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 dri=
ver (I have, for example, several outstanding ones reported on various Linu=
x graphics drivers) making perfect programs break.<br></div></div><span cla=
ss=3D""><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);padding-left:1ex">=
<div dir=3D"ltr">I&#39;ll read up on debugging with glGetError...<br></div>=
</blockquote></span><div><div style=3D"font-family:times new roman,serif;di=
splay:inline" class=3D"gmail_default">=E2=80=8BShortly after I sent my emai=
l, I remembered that PyOpenGL does some amount of its own checking, which I=
IRC includes implicit `glGetError(...)`. Perhaps creating a <a href=3D"http=
s://www.khronos.org/opengl/wiki/Debug_Output" target=3D"_blank">debug conte=
xt</a> would enable more checks, assuming the Pi supports it (which IDR off=
hand). I might also suggest some kind of graphics debugger, like RenderDoc.=
<br><br>Although . . . the error does seem to indicate at least the basic n=
ature of the problem rather clearly. Perhaps the context exists, but is inv=
alid for some reason (Unsupported flags? Invalid version? Invalid size?).<s=
pan class=3D"HOEnZb"><font color=3D"#888888"><br><br>Ian</font></span></div=
></div></div></div></div>
</blockquote></div><br></div>

--001a11429b786387400561e4bf71--


--===============6759383064505757341==
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
--===============6759383064505757341==
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

--===============6759383064505757341==--