Seeking decent python opengl information.

A forum for general discussion of the Python programming language.

Seeking decent python opengl information.

Postby Mekire » Fri Mar 22, 2013 6:28 am

So, I am trying to tackle OpenGL (via pyOpenGL) and it is proving to be quite challenging. Mostly this is due to me honestly not being able to find much in the way of good resources. I have so far found the NeHe tutorials, but upon investigation I find that they are rampant with deprecated legacy code (i.e. glBegin and glEnd). The same goes for William McGugan's site.

One thing I found that seemed promising were the OpenGLContext Python tutorials. These have a lot of good information, but they are also hiding a lot of inner workings that I really want to look at within the OpenGLContext package itself. This is meant to make things more accessible, but honestly it really bugs me. I find myself suddenly able to navigate around the object I construct using the arrow keys, but they don't so much as mention anything about the transformations they are doing beneath the surface to make this happen. I can and have tried to look through the module code itself, but as it is designed to work with multiple python APIs it is not proving very easy to find what I want/need.

Aside from this I have found this online book, Learning Modern 3D Graphics Programming, which seems very good, but as it is aimed at graphics programming in general, by necessity all of the samples are given in C++.

So... should I just bite the bullet and go through the C++ tutorials (something I feel I could, but would really rather not, do). Or does anyone know of somewhere I can find decent, non-deprecated code (preferably which doesn't try to force me to use GLUT).


(Edit: Oops. I meant to put this in general discussions; not coding help. Feel free to move it there.)
Last edited by Yoriz on Fri Mar 22, 2013 6:49 am, edited 1 time in total.
Reason: Moved to general discussions
New Users, Read This
  • Use code tags when posting code.
  • Include any errors with your post (in code tags).
  • Describe your problem; not your chosen solution.
  • Make examples the minimum length to demonstrate your issue.
User avatar
Posts: 1711
Joined: Thu Feb 07, 2013 11:33 pm
Location: Tucson, Arizona

Re: Seeking decent python opengl information.

Postby setrofim » Fri Mar 22, 2013 8:21 am

pyglet is what you want to be using to do OpenGL stuff in Python. It pretty much exposes the C APIs so you can use any OpenGL tutorial with it (the pyglet docs will show you how to invoke the APIs -- the translation from C to Python is pretty straight forward). The Learning Modern 3D Programming book that you've linked is very good, and is probably the best free resource you're going to find on the subject.
Posts: 288
Joined: Mon Mar 04, 2013 7:52 pm

Return to General Discussions

Who is online

Users browsing this forum: Bing [Bot] and 7 guests