On Wed, Jan 27, 2010 at 3:30 AM, Florian Bösch <[email protected]> wrote:

> Look, you haven't read me right. If I disable everything (drawing,
> shaders etc.) and do nothing else then the copying, that's how I get
> out at 75MB/s. That means the card does barely anything else, it
> doesn't do clipping, drawing, overdraw, shaders, etc. *that* is *why*
> it is an *utter* disaster, and it goes on to prove my point that
> something is wrong in the OpenGL3 "we do everything with buffers and
> get magic performance" land.


As I have mentioned many, many times now, it isn't OpenGL which is broken
here - it is wave.py.

In particular, GPU-to-GPU glReadPixels is only supported for some particular
pixel formats, and GL_RGB (which you are using) is not one of them.

If you had profiled wave.py, you would have noticed that all the time was
spent in Buffer.copy_from(), which should have been issuing an asynchronous
call to glReadPixels. Instead, because of the unsupported pixel format,
glReadPixels was triggering a readback into main memory, followed by a CPU
format conversion, and a re-upload to GPU memory.

Switching the texture formats to GL_RGBA32F, the glReadPixels mode to
GL_RGBA, and switching the vertex buffers to 4 elements per vertex brings
the application above 30 fps for a map size of 1024x1024.

-- 
Tristam MacDonald
http://swiftcoder.wordpress.com/

-- 
You received this message because you are subscribed to the Google Groups 
"pyglet-users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/pyglet-users?hl=en.

Reply via email to