Faster than glReadPixels() ??

Faster than glReadPixels() ??

Post by el_lla.. » Wed, 26 May 1999 04:00:00



I'd like to get the RGB image buffer without using
the glReadPixels() routine which is too slow..

Is there a faster way to do it ?

Thanks

--== Sent via Deja.com http://www.deja.com/ ==--
---Share what you know. Learn what you don't.---

 
 
 

Faster than glReadPixels() ??

Post by Phil Frisbie, Jr » Wed, 26 May 1999 04:00:00



> I'd like to get the RGB image buffer without using
> the glReadPixels() routine which is too slow..

> Is there a faster way to do it ?

No, glReadPixels is it, but it may not be as slow as you think.

Most 3D hardware have command buffers that can store rendering commands
when the hardware is busy. This gives an overall speed boost since most
rendering commands return quickly. But calling glReadPixels stalls
because you must wait for all those buffered rendering commands to
finish before you can perform the read. For screen shots, I do the
glReadPixels right after the buffer swap.

Also, glReadPixels will do color depth conversion, so if you are running
with a 16 bit color buffer, each packed 16 bit pixel will be converted
to a 24/32 bit value. So for best speed, make sure you are running with
a 24/32 bit color buffer.

Phil Frisbie, Jr.
Hawk Software
http://www.hawksoft.com

 
 
 

Faster than glReadPixels() ??

Post by Paul Mart » Wed, 26 May 1999 04:00:00



>I'd like to get the RGB image buffer without using
>the glReadPixels() routine which is too slow..

>Is there a faster way to do it ?

Any algorithm for reading a framebuffer off a graphics device will be
limited by the rate at which pixels can be sent across the system bus. What
rate are you currently getting? Is it close to the maximum rate allowed by
your system bus? If so, you will not be able to find a faster method, under
any graphics API.

If your current rate is much slower than your bus bandwidth max, then you
might experiment with different type and format parameters to the
glReadPixels call. You want to match the framebuffer format as close as
possible to avoid per-pixel reformatting which would otherwise occur and
kill your performance.

If you are simply trying to get the memory address of your framebuffer, no
this is not possible under OpenGL as it would preclude architectures which
do not support memory mapped framebuffers.

   -Paul Martz
    Hewlett Packard Workstation Systems Lab
    To reply, remove "DONTSPAM" from email address.

 
 
 

Faster than glReadPixels() ??

Post by Paul Mart » Wed, 26 May 1999 04:00:00



>Also, glReadPixels will do color depth conversion, so if you are running
>with a 16 bit color buffer, each packed 16 bit pixel will be converted
>to a 24/32 bit value. So for best speed, make sure you are running with
>a 24/32 bit color buffer.

With a 16 bit color buffer (565 RGB), glReadPixels should support a fast
path when the type parameter is set to GL_UNSIGNED_SHORT_5_6_5 (under OpenGL
1.2, or append "_EXT" if using GL_EXT_packed_pixels).

   -Paul Martz
    Hewlett Packard Workstation Systems Lab
    To reply, remove "DONTSPAM" from email address.

 
 
 

Faster than glReadPixels() ??

Post by Samuel Pai » Wed, 26 May 1999 04:00:00



> I'd like to get the RGB image buffer without using
> the glReadPixels() routine which is too slow..

Many OpenGL implementations have slow paths through
the read/write pixel routines, and you have to get
the right state settings to get to the fast path.
Muck around with them.

You are also welcome to use whatever non-portable API
that is available on the systems you use.
--
Samuel S. Paik | http://www.webnexus.com/users/paik/
3D and multimedia, architecture and implementation
Solyent Green is kitniyot!

 
 
 

Faster than glReadPixels() ??

Post by Christoph Fuenfzi » Wed, 02 Jun 1999 04:00:00


Hi!

I am very interested in fast(er) read/write pixelrectangle routines, too.

Could you please give an example of a system specific API
available for this.

Christoph.


...

Quote:> Many OpenGL implementations have slow paths through
> the read/write pixel routines, and you have to get
> the right state settings to get to the fast path.
> Muck around with them.

> You are also welcome to use whatever non-portable API
> that is available on the systems you use.
> --
> Samuel S. Paik | http://www.webnexus.com/users/paik/
> 3D and multimedia, architecture and implementation
> Solyent Green is kitniyot!

 
 
 

1. Is there something faster than GLReadPixels.

I need to get an image from an inventor window and am using glReadPixels.
This call seems to be very slow.  Is there a better (Faster) way to write
the window contents into memory.

Any help would be appreciated.

Scott Walker

2. bug in max

3. faster than glReadPixels???

4. Universal Transparency Scanner Adaptor??

5. Fast glReadPixels ???

6. vertex buffer with FVF used with programmable vertex shader

7. seeking fastest glReadPixels (Linux preferred)

8. I can't net render in win 95...HELP!!!!

9. Fast glReadPixels ???

10. Fast,faster,fastest!!!

11. info on upgrades for FAST 2.1b and FAST 1.0

12. How Fast is Fast ?

13. fast scaling-?faster