XShape example?

Matthias Hopf mhopf at suse.de
Mon Oct 31 06:33:12 PST 2005


On Oct 29, 05 20:42:48 +1000, Russell Shaw wrote:
> I've already tried doing drawing programs with client-side rendering.
> The scrolling and zooming performance is complete and utter crap, just as slow as
> doing all the graphics in gtk.

Then you're doing something wrong. OpenGL is faster than all 2D
acceleration functions (and as CPU based code anyway). At least on
halfway modern cards.

Perhaps you have been using the image pipeline (glCopyPixels) with pixel
zoom != 1.0 or convolution or anything else activated. That is known to
not be implemented efficiently on almost all OpenGL implementations.

As PixelZoom only does nearest neighbor lookup (eek!) you want to do
something different: use glCopyTexSubImage2D to copy a framebuffer
region to a texture, and draw a resized textured quad afterwards.

> > opengl is quite "iffy" for 2d - especcially if u want to use textures on pilys
> > for replacements of pixmaps - different ogl implementations will round texture
> > co-ords diddfernly so u may not end up with precisely the same output on every
> > driver - and sometimes the output is less than desireable.

Not true. There are specific offsets that - together with nearest
neighbor interpolation - are pixel exact on every platform.

> The only way to get snappy zooming and scrolling in a drawing program
> is to use OpenGL display lists.

I wonder what display lists would help here. You don't have much data
transfer over the bus. If you have, you do something wrong.

Or I completely misread you.

Matthias

-- 
Matthias Hopf <mhopf at suse.de>       __        __   __
Maxfeldstr. 5 / 90409 Nuernberg    (_   | |  (_   |__         mat at mshopf.de
Phone +49-911-74053-715            __)  |_|  __)  |__  labs   www.mshopf.de



More information about the xorg mailing list