Re: Using PyopenGL with GLArea

Matti Kariluoma <[email protected]> Sun, 12 Feb 2017 14:19:59 -0600
Newsgroups gmane.comp.python.opengl.user
Message-ID <CAFXmeZ4dbCZpuk+VP3fAunxy=_+i1Cs5q++ELT5yT9UNFrB06A@mail.gmail.com>
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