Hi,
I have seen in python`s help (the .chm file) that in the opengl section it has a code like this:
import gl, GL, time

def main():
gl.foreground()
gl.prefposition(500, 900, 500, 900)
w = gl.winopen('CrissCross')
gl.ortho2(0.0, 400.0, 0.0, 400.0)
gl.color(GL.WHITE)
gl.clear()
gl.color(GL.RED)
gl.bgnline()
gl.v2f(0.0, 0.0)
gl.v2f(400.0, 400.0)
gl.endline()
gl.bgnline()
gl.v2f(400.0, 0.0)
gl.v2f(0.0, 400.0)
gl.endline()
time.sleep(5)

main()

i have downloaded the pyopengl but i cant find any method or class or anything like the "gl" that is imported,but i think i have some methods like GLU,GLUT,...
where is the problem???

Make sure that the package name is OpenGL for PyOpenGL and probably import this way:

from OpenGL.GL import GL

I don't knowwhere the code in the .chm would have been executed, but I haven't run across any simple 'import gl'...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.