xmenu: my first project with xlib - Programming On Unix

Users browsing this thread: 1 Guest(s)
movq
Long time nixers
(15-05-2020, 02:47 AM)venam Wrote:
Quote:What are Xlib pixmaps used for if I can draw directly on windows?
I go into some good explaining of this in this article.

In sum, windows and pixmap are instances of something more abstract called a drawable. The difference is that a window is something on the screen already while a pixmap only lives in a memory buffer. You can then apply the pixmap pixels over some other drawables.

... and one of the main reasons why anyone would want to draw into a pixmap and then copy it to a window is: Double buffering. When you do a lot of drawing operations directly onto a window, it can happen that you see glitches, artifacts, flickering. Even on today's brutally fast machines. So, you first draw an entire frame into a pixmap and then copy the final result to a window. It'll be smoother.


Messages In This Thread
xmenu: my first project with xlib - by seninha - 14-05-2020, 06:45 PM
RE: xmenu: my first project with xlib - by z3bra - 14-05-2020, 07:32 PM
RE: xmenu: my first project with xlib - by venam - 15-05-2020, 02:47 AM
RE: xmenu: my first project with xlib - by z3bra - 15-05-2020, 06:33 AM
RE: xmenu: my first project with xlib - by movq - 15-05-2020, 09:49 AM
RE: xmenu: my first project with xlib - by venam - 15-05-2020, 03:04 PM
RE: xmenu: my first project with xlib - by venam - 19-05-2020, 12:49 AM
RE: xmenu: my first project with xlib - by opfez - 29-07-2020, 01:17 PM