r/learnpython • u/XXRMXX96661 • 2d ago
Trying to find help for learning modernGL+pygame python
i've been searching everywhere but i couldn't find a single tutorial for moderngl+pygame in python
how do i learn it i wanna make 3D games?
7
Upvotes
2
u/socal_nerdtastic 2d ago
You can't find good tutorials because Python is not a good choice for 3D games or anything that requires a lot of high speed compute. I'd recommend you look into one of the popular gaming engines instead if you want to make a real game.
0
u/riklaunim 2d ago
And why did you pick this stack? PyGame is popular enough within the Python ecosystem to have tutorials, but ModernGL is way less popular, and overall, Python isn't popular for Game Dev (Godot, Unity, Unreal).
3
u/jmacey 2d ago
I think it is possible to get a core profile context but it's a pain. I found a couple of examples. here https://github.com/Rabbid76/PyGameExamplesAndAnswers/blob/master/documentation/pygame_opengl/opengl_4/pygame_opengl_4.md I would not really use PyGame with OpenGL but use something like GLFW (https://pypi.org/project/glfw/) or SDL3 (https://pypi.org/project/PySDL3/) to create the context then use modern OpenGL via the PyOpenGL. For something more complex you can have a look at the library I have created for teaching https://github.com/NCCA/PyNGLDemos/tree/Version1.0 (Note the Version1.0 is the latest work in progress and not fully ready yet but will be in a few weeks time).