pygame - importing GL - very bad...
newsboost at gmail.com
Wed Jan 2 00:49:04 CET 2013
On 01/01/2013 12:13 PM, Chris Angelico wrote:
> On Tue, Jan 1, 2013 at 10:00 PM, someone <newsboost at gmail.com> wrote:
>> See this code (understand why I commented out first line):
>> # from OpenGL.GL import *
>> from OpenGL.GL import glEnable, GL_DEPTH_TEST, \
>> glShadeModel, GL_SMOOTH, glClearColor, \
>> GL_CULL_FACE, GL_BLEND, glBlendFunc, \
>> GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, \
>> glClear, GL_COLOR_BUFFER_BIT, GL_DEPTH_BUFFER_BIT, \
>> glLoadIdentity, glTranslate, glRotate, \
>> glMultMatrixf, glPushMatrix, glCallList, \
>> glPopMatrix, glDisable, GL_LIGHTING
>> Any good / clever solution to this problem, so I avoid this nasty crappy
> You could simply
> import OpenGL.GL as GL
> and then use all those names as GL.glPopMatrix, GL.GL_LIGHTING, etc. I
> don't know if that's better or worse.
You're right - but I forgot to write that even though this maybe
should/is recommended many places then I've seen a lot of opengl code on
the internet and IMHO NOBODY does that and it'll be a lot slower to type
that in front of all the opengl commands...
So this solution is not something I like too... But I can see some other
people came up with good solutions, which I didn't knew about..
More information about the Python-list