Question

i want to start to learning 3d programming in python

i found pyopengl for use opengl in python and i found pyglet and i like that because says "No external dependencies" and i heard this is better for make something like game engine or game and etc.

but i have a problem i can't find any 3d example of pyglet and i read some say : pyglet is good 2d this like pygame and ....., and on the other side some say, this is good opengl framework for just 2d another say just 3d and ......

now i want to know is really pyglet have all opengl skills for use in 3d game engine or make a 3d game or not pyglet only for 2d work and nothing more if this i should go to pyopengl for my work

thanks a lot

Was it helpful?

Solution

I believe you're asking whether pyglet has complete bindings for OpenGL or not.

In the documentation, The OpenGL interface says yes:

pyglet provides an interface to OpenGL and GLU… You can access this interface directly; using it is much like using OpenGL from C… The interface is a "thin-wrapper" around [OpenGL]… it is always up-to-date with the latest version and almost all extensions.

However, as that page warns, the wrapper is very thin, and "you will need a good knowledge of OpenGL, C and ctypes." If that's a problem:

You may prefer to use … PyOpenGL. PyOpenGL provides similar functionality with a more "Pythonic" interface, and will work with pyglet without any modification.


So, you have two choices:

  • Use just pyglet, if you understand (and like) OpenGL and C-style interfaces.
  • Use pyglet and PyOpenGL together if you prefer nicer interfaces to OpenGL.

Either way, you will have full access to all of the power of OpenGL.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top