pygame - importing GL - very bad...
Chris Angelico
rosuav at gmail.com
Tue Jan 1 06:13:59 EST 2013
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
> work-around?
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.
ChrisA
More information about the Python-list
mailing list