XShape example?

Russell Shaw rjshaw at netspace.net.au
Mon Oct 31 07:41:56 PST 2005


Matthias Hopf wrote:
> 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.

Yeah, that's what i said/meant (that opengl is best for panning and zoom).

> 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.

Drawings i do usually have hundreds if not thousands of primitives
such as lines, arcs, etc. It is very sluggish for panning and zooming
to resend all those drawing commands over the X link. Display lists
are stored in the server and can be replayed with a single X command.



More information about the xorg mailing list