Re: Using PyopenGL with GLArea
Oly <[email protected]> Sun, 05 Mar 2017 17:28:08 +0000
| Newsgroups | gmane.comp.python.opengl.user |
|---|---|
| Message-ID | <CAPZowhwQr1Of16mSp-r-r2peFdgcH-ExdNEhdhmhfY8RCmP-kA@mail.gmail.com> |
--===============9015828595138955019== Content-Type: multipart/alternative; boundary=001a11491d7ed67e110549ff1a6e --001a11491d7ed67e110549ff1a6e Content-Type: text/plain; charset=UTF-8 Thanks for the offer not sure how i missed your reply. Anyway i made some progress, yes my issue is with linux and gtk specifically I have also found out it has something todo with wayland. Running the example i can get it to work with my intel and nvidia graphics (optimus card) on x11 but if i am using wayland then i get the error above. Not sure why wayland would effect what available to me anyone seen anything similar ? Seems it i graphics card related. I did not know about this trick PYOPENGL_PLATFORM="osmesa" so thats useful to know but it does not help unfortunately. On Sun, 12 Feb 2017 at 20:20 Matti Kariluoma <[email protected]> wrote: > I tried to have a look at your code, but I don't have the `gi' package > on my machine, and `pip install gi' can't find it either. > > 1) Would you accept help in the form of a program that starts with > `from OpenGL import GLUT' , or does your problem require gi? > > As for the error you posted, looking at https://mesamatrix.net/ I see > that glGenVertexArrays is a part of OpenGL 3.0, extension > GL_ARB_vertex_array_object which seems to have broad support. > > 2) Maybe your graphics device (or its driver) is ancient? > > Since your gist seems to indicate you are using GTK, I assume you are > running this under Linux. You may want to look into running PyOpenGL > under mesa, using one of their software renderers if for whatever > reason you don't have OpenGL3.0 support. > > Using the mesa CPU renderer under Linux: > > http://www.mattikariluoma.com/blog/Headless%20Rendered%20OpenGL%20Scenes.html > > >From: Oliver Marks <oly@di...> - 2017-02-11 22:40:09 > > > >Thought i would have a stab at trying to make this work, I cant find any > >existing working examples. > > > >I have linked a gist if any one want to try. > > > >currently I am getting this error. > > > >OpenGL.error.NullFunctionError: Attempt to call an undefined function > >glGenVertexArrays, check for bool(glGenVertexArrays) before calling > > > >Which to me sounds like its not available to the context, GLArea is > >supplying the context so i am unsure why this would be ? > > > >Any ideas or can anyone give me some pointers ? > > > >https://gist.github.com/olymk2/5b3e49ac83130e580bd9983f2e5d49c3 > > > > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, SlashDot.org! http://sdm.link/slashdot > _______________________________________________ > PyOpenGL Homepage > http://pyopengl.sourceforge.net > _______________________________________________ > PyOpenGL-Users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/pyopengl-users > --001a11491d7ed67e110549ff1a6e Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div><div><div><div><div>Thanks for the offer not sure how= i missed your reply.<br><br></div>Anyway i made some progress, yes my issu= e is with linux and gtk specifically I have also found out it has something= todo with wayland.<br><br></div>Running the example i can get it to work w= ith my intel and nvidia graphics (optimus card) on x11 but if i am using wa= yland then i get the error above.<br><br></div>Not sure why wayland would e= ffect what available to me anyone seen anything similar ?<br><br></div>Seem= s it i graphics card related.<br><br></div>I did not know about this trick = PYOPENGL_PLATFORM=3D"osmesa" so thats useful to know but it does = not help unfortunately.<br><div><div><div><div><br></div></div></div></div>= </div><br><div class=3D"gmail_quote"><div dir=3D"ltr">On Sun, 12 Feb 2017 a= t 20:20 Matti Kariluoma <<a href=3D"mailto:[email protected]">ma= [email protected]</a>> wrote:<br></div><blockquote class=3D"gmail_= quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1= ex">I tried to have a look at your code, but I don't have the `gi' = package<br class=3D"gmail_msg"> on my machine, and `pip install gi' can't find it either.<br class= =3D"gmail_msg"> <br class=3D"gmail_msg"> 1) Would you accept help in the form of a program that starts with<br class= =3D"gmail_msg"> `from OpenGL import GLUT' , or does your problem require gi?<br class= =3D"gmail_msg"> <br class=3D"gmail_msg"> As for the error you posted, looking at <a href=3D"https://mesamatrix.net/"= rel=3D"noreferrer" class=3D"gmail_msg" target=3D"_blank">https://mesamatri= x.net/</a> I see<br class=3D"gmail_msg"> that glGenVertexArrays is a part of OpenGL 3.0, extension<br class=3D"gmail= _msg"> GL_ARB_vertex_array_object which seems to have broad support.<br class=3D"g= mail_msg"> <br class=3D"gmail_msg"> 2) Maybe your graphics device (or its driver) is ancient?<br class=3D"gmail= _msg"> <br class=3D"gmail_msg"> Since your gist seems to indicate you are using GTK, I assume you are<br cl= ass=3D"gmail_msg"> running this under Linux. You may want to look into running PyOpenGL<br cla= ss=3D"gmail_msg"> under mesa, using one of their software renderers if for whatever<br class= =3D"gmail_msg"> reason you don't have OpenGL3.0 support.<br class=3D"gmail_msg"> <br class=3D"gmail_msg"> Using the mesa CPU renderer under Linux:<br class=3D"gmail_msg"> <a href=3D"http://www.mattikariluoma.com/blog/Headless%20Rendered%20OpenGL%= 20Scenes.html" rel=3D"noreferrer" class=3D"gmail_msg" target=3D"_blank">htt= p://www.mattikariluoma.com/blog/Headless%20Rendered%20OpenGL%20Scenes.html<= /a><br class=3D"gmail_msg"> <br class=3D"gmail_msg"> >From: Oliver Marks <oly@di...> - 2017-02-11 22:40:09<br class=3D"= gmail_msg"> ><br class=3D"gmail_msg"> >Thought i would have a stab at trying to make this work, I cant find an= y<br class=3D"gmail_msg"> >existing working examples.<br class=3D"gmail_msg"> ><br class=3D"gmail_msg"> >I have linked a gist if any one want to try.<br class=3D"gmail_msg"> ><br class=3D"gmail_msg"> >currently I am getting this error.<br class=3D"gmail_msg"> ><br class=3D"gmail_msg"> >OpenGL.error.NullFunctionError: Attempt to call an undefined function<b= r class=3D"gmail_msg"> >glGenVertexArrays, check for bool(glGenVertexArrays) before calling<br = class=3D"gmail_msg"> ><br class=3D"gmail_msg"> >Which to me sounds like its not available to the context, GLArea is<br = class=3D"gmail_msg"> >supplying the context so i am unsure why this would be ?<br class=3D"gm= ail_msg"> ><br class=3D"gmail_msg"> >Any ideas or can anyone give me some pointers ?<br class=3D"gmail_msg"> ><br class=3D"gmail_msg"> ><a href=3D"https://gist.github.com/olymk2/5b3e49ac83130e580bd9983f2e5d4= 9c3" rel=3D"noreferrer" class=3D"gmail_msg" target=3D"_blank">https://gist.= github.com/olymk2/5b3e49ac83130e580bd9983f2e5d49c3</a><br class=3D"gmail_ms= g"> ><br class=3D"gmail_msg"> <br class=3D"gmail_msg"> ---------------------------------------------------------------------------= ---<br class=3D"gmail_msg"> Check out the vibrant tech community on one of the world's most<br clas= s=3D"gmail_msg"> engaging tech sites, SlashDot.org! <a href=3D"http://sdm.link/slashdot" rel= =3D"noreferrer" class=3D"gmail_msg" target=3D"_blank">http://sdm.link/slash= dot</a><br class=3D"gmail_msg"> _______________________________________________<br class=3D"gmail_msg"> PyOpenGL Homepage<br class=3D"gmail_msg"> <a href=3D"http://pyopengl.sourceforge.net" rel=3D"noreferrer" class=3D"gma= il_msg" target=3D"_blank">http://pyopengl.sourceforge.net</a><br class=3D"g= mail_msg"> _______________________________________________<br class=3D"gmail_msg"> PyOpenGL-Users mailing list<br class=3D"gmail_msg"> <a href=3D"mailto:[email protected]" class=3D"gmail_msg"= target=3D"_blank">[email protected]</a><br class=3D"gma= il_msg"> <a href=3D"https://lists.sourceforge.net/lists/listinfo/pyopengl-users" rel= =3D"noreferrer" class=3D"gmail_msg" target=3D"_blank">https://lists.sourcef= orge.net/lists/listinfo/pyopengl-users</a><br class=3D"gmail_msg"> </blockquote></div> --001a11491d7ed67e110549ff1a6e-- --===============9015828595138955019== 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 --===============9015828595138955019== 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 --===============9015828595138955019==--