[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[pygame] Whose fault? IDLE,PyGame or TKinter? (OpenGL situation)
Another interesting situation, can anyone explain it?
>>> import pygame; from pygame.locals import *; from pygame import draw;
from OpenGL.GL import *
>>> pygame.init();pygame.display.set_mode((640,480),OPENGL|DOUBLEBUF)
>>> glMatrixMode(GL_PROJECTION);glLoadIdentity();glOrtho(0,640,0,480,-1,1)
>>> glMatrixMode(GL_MODELVIEW); glLoadIdentity(); glColor3f ( 255.0, 0.0,
0.0 )
>>> glBegin (GL_TRIANGLES);glVertex2i (200, 100);glVertex2i (320,
300);glVertex2i (440, 100);glEnd()
Now for the weird thing:
>>> while(1): pygame.display.flip(); print "1",
works, however
>>> while(1): pygame.display.flip();
locks up IDLE, and you can't do a Ctrl-C or Ctrl-Break.
Nor does it seem to be a question of delay. A
time.sleep() or time.clock() or for delay inserted
after flip() still introduces the lockup. Only
the print works.
I hope it hasn't escaped your notice how
Python/PyGame/PyOpenGL/IDLE virtually turns OpenGL from
an API into a scripting 3D Graphics language! If all
the kinks were ironed out, this would be awesome!!!
____________________________________
pygame mailing list
pygame-users@seul.org
http://pygame.seul.org