1

I'm working on a software renderer, and I need a way to draw the resulting bitmap to an X11 window. On Windows I'm drawing the bitmap directly to a window using StretchDIBits. Is there any similar way to do it using XLib?

I'm aware of this answer, but I'm wondering how to go about updating the pixmap every frame? Deleting it and creating a new one each frame seems like it would be slow.

veridis_quo_t
  • 342
  • 3
  • 14
  • 1
    "seems like it would be slow." You should measure it, then decide if it will be slow. – matt Sep 15 '21 at 10:21

1 Answers1

0

If you are considering updating in realtime a bitmap, then you should operate in the server, and make the server do the modifications for you. Or just request a pixmap extension (in the form of some shared memory segment between server and client) and limit yourself to run client and server on the same machine (in a way that they both, share the frame buffer memory). X11 is basically a network protocol, so anything you have to update on your pixmap (a pixmap is an object that resides in the server side) has to go over a network connection and so, is subject to network delivery delays.

Luis Colorado
  • 10,974
  • 1
  • 16
  • 31