On Thu, 31 Oct 2002 [EMAIL PROTECTED] wrote:

>  
> > > 2.If both the Xserver and the client are on the same machine then which
> > one
> > > gives better performance ie in terms of speed ...Pixmaps or shared memory
> > > pixmaps.Are pixmaps stored directly in the video RAM?????
> > 
> >    That's too open-ended to answer.  It all depends what you are
> > trying to do.
> 
> probably i was not clear on this.
> I have to display a number of pic files one after the other.So i want to 
> optimise the delay for the display.
> Right now i am just creating images and then making a shared memory pixmap.
> I do a Xputimage and Xcopyarea to display a picture.

   I assume you mean XShmPutImage.  XShmPutImage is considerably
faster than XPutImage when the connection is local.

> For this kind of application is Pixmap better or shared memory pixmap.
> 

   The fastest way to move image data to a Window is to do XShmPutImage
of the XImage into the Window.  Making the XImage data into a shared memory
pixmap and then calling XCopyArea is a round-about way of doing the
same thing, only more complicated and probably slower.

   The OpenGL equivalent would be to do glDrawPixels into the Window.
For double buffering, it would be glDrawPixels into the back buffer and
then glXSwapBuffers.  Some implementations may sync glXSwapBuffers to
the vertical retrace.  With NVIDIA's binary Linux drivers setting
the environment variable __GL_SYNC_TO_VBLANK = 1 would turn vblank on
syncing.

   You could double buffer in X by XShmPutImage into a Pixmap and
then XCopyArea from the Pixmap into the Window.  Having the Pixmap
NOT be in shared memory would be fastest there.  Unfortunately,
this will not sync to the vblank and there is no way to make it
so.

                                Mark. 
_______________________________________________
Xpert mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/xpert

Reply via email to