PyOpenGL and graphics card support
Mike C. Fletcher
mcfletch at vrplumber.com
Thu Oct 1 12:57:54 EDT 2009
jefm wrote:
> these are the imports I use:
>
> from OpenGL.GL import *
> from OpenGL.GLUT import *
> from OpenGL.GLU import *
>
PyOpenGL will use the default OpenGL renderer for your system, however,
before you have an OpenGL context (rendering window) the system can
report whatever the heck it wants to for the various values (in this
case looks like it is reporting the generic microsoft renderer until you
ask for a context). Try this instead:
from OpenGL.GL import *
from OpenGL.GLUT import *
from OpenGL.GLU import *
resX,resY = (400,300 )
if __name__ == "__main__":
glutInit([])
glutInitDisplayMode(GLUT_RGBA | GLUT_DOUBLE | GLUT_DEPTH)
glutInitWindowSize(resX, resY)
glutInitWindowPosition(0, 0)
window = glutCreateWindow("hello")
for name in
(GL_VENDOR,GL_RENDERER,GL_SHADING_LANGUAGE_VERSION,GL_EXTENSIONS):
print name,glGetString(name)
HTH,
Mike
--
________________________________________________
Mike C. Fletcher
Designer, VR Plumber, Coder
http://www.vrplumber.com
http://blog.vrplumber.com
More information about the Python-list
mailing list