Pyglet's OpenGL bindings should support very recent versions. (If not, please file a bug so that they can be updated).
Internally, Pyglet only uses "classic" OpenGL. This older OpenGL is much simpler, and is enough for most simple games and applications. This is what the pyglet text, sprite, and graphics modules are based on. Modern OpenGL can be used by simply requesting a newer OpenGL context when creating the window. However, you have to give up on the sprite and graphics modules because they will try to call some older OpenGL functions that may not be available with a newer context. Working with shaders does require knowing some ctypes, but there is a nice library here that hides that: https://github.com/gabdube/pyshaders I also wrote a very basic shader program wrapper here: https://bitbucket.org/treehousegames/pyglet/src/28d33a50ba8c1f140613ca90de7791260a3d9daa/pyglet/graphics/shader.py?at=shader_class&fileviewer=file-view-default I would probably not recommend the one i wrote, but it might give you an idea of the ctypes involved. Ctypes is actually very easy to use, but if you don't understand the basic C concepts it will be challenging. On Sunday, December 4, 2016 at 9:33:27 PM UTC+9, [email protected] wrote: > > I can use from pyglet.gl import * to use OpenGL, in docs, it is said > that *pyglet provides an interface to OpenGL and GLU. To use it you will > need a good knowledge of OpenGL, C and ctypes. *To be honest, I know > nothing about OpenGL, but I knew OpenGL has its own versions, and which > version is used in pyglet? It seemed that there are modern OpenGL (OpenGL 3 > and 4) , and “old” OpenGL (OpenGL 1 and 2). Is there much difference > between them? Could I use pyglet to learn OpenGL, or only C++ is fine? > -- You received this message because you are subscribed to the Google Groups "pyglet-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/pyglet-users. For more options, visit https://groups.google.com/d/optout.
