Package: python-opengl
Version: 2.0.1.09.dfsg.1-0.2
--- Please enter the report below this line. ---
I also noticed heavy performance problems with python-opengl 3.
I tried 3.0.0~b3-1 from sid and 3.0.0~b5-1 from experimental.
With the attached test-script I get about 5.7 frames per second.
Then I built and installed the etch package 2.0.1.09.dfsg.1-0.2
and reached about 100 frames per second.
(The script draws 300 rectangles and calculates the average fps
during 5 seconds)
There is also a similar bugreport for Ubuntu:
https://bugs.launchpad.net/ubuntu/+source/pyopengl/+bug/135736
They also report that version 2.0.1.09 is running fine.
--- System information. ---
Architecture: i386
Kernel: Linux 2.6.25-2-686
Debian Release: lenny/sid
500 unstable www.debian-multimedia.org
500 unstable ftp.de.debian.org
1 experimental ftp2.de.debian.org
--- Package information. ---
Depends (Version) | Installed
==================================-+-============
python (<< 2.6) | 2.5.2-2
python (>= 2.4) | 2.5.2-2
python-central (>= 0.6.7) | 0.6.8
python-numeric (>= 24.2-3) | 24.2-9
xlibmesa-gl |
OR libgl1 |
xlibmesa-glu |
OR libglu1 |
libglut3 |
ttf-bitstream-vera | 1.10-7
#!/usr/bin/python
from OpenGL.GL import *
from OpenGL.GLU import *
from OpenGL.GLUT import *
import time
import random
random.seed();
oldTime = time.time();
frameCount = 0;
def calcFps():
global oldTime, frameCount;
frameCount += 1;
currentTime = time.time();
diff = currentTime - oldTime;
if diff >= 5.0:
fps = frameCount / diff;
oldTime = currentTime;
frameCount = 0;
print "FPS:", fps
def display():
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
gluPerspective(45.0, 1.0, 0.1, 100.0);
glClearColor(0.0, 0.0, 0.0, 0.0);
glClear(GL_COLOR_BUFFER_BIT);
glColor(1.0, 1.0, 1.0);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
glTranslate(-3.0, 0.0, -3.0);
for i in range(300):
glBegin(GL_POLYGON);
glVertex(0.0, 0.0, 0.0);
glVertex(1.0, 0.0, 0.0);
glVertex(1.0, 1.0, 0.0);
glVertex(0.0, 1.0, 0.0);
glEnd();
glTranslate(1.0, 0.0, 0.0);
glutSwapBuffers();
calcFps();
def idle():
glutPostRedisplay();
def keyhandler(key, x, y):
if key == 'q':
exit(0);
glutInit([]);
glutInitDisplayMode(GLUT_RGBA | GLUT_DOUBLE);
glutInitWindowSize(200, 200);
glutCreateWindow("Test");
glutIdleFunc(idle);
glutDisplayFunc(display);
glutKeyboardFunc(keyhandler);
glutMainLoop();_______________________________________________
Python-modules-team mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/python-modules-team