Re: Beginner Questions About XCB - xcb_alloc_color is too slow

2021-02-23 Thread Ilya Anfimov
On Sat, Feb 20, 2021 at 06:37:38PM -0800, Mark Solomonik wrote: >Hello, Godd day. [skipped] > Is this an appropriate way to set the color? Is there a more efficient way > to do so? Well, you have mostly good answers to this question. (I personally disagree with the one that

Re: Beginner Questions About XCB - xcb_alloc_color is too slow

2021-02-23 Thread Carsten Haitzler
On Mon, 22 Feb 2021 23:30:27 -0600 Chris Sorenson said: > Around 25 years ago, before the X Render Extension, Eric Foster-Johnson > wrote a great article on the topic of using color in X, for the "Cross > Thoughts" column in Unix Review Magazine. I've kept a copy ever since: > > When the X

Re: Beginner Questions About XCB - xcb_alloc_color is too slow

2021-02-23 Thread Carsten Haitzler
On Mon, 22 Feb 2021 21:24:46 -0500 Sam Varshavchik said: > On Sun, Feb 21, 2021 at 4:47 PM Carsten Haitzler wrote: > > > > Use Xlib. Or just use a toolkit higher up the stack. XCB really is for > > people who already know X backwards. It can buy some speedups in some > > corner-cases by

Beginner Questions About XCB - xcb_alloc_color is too slow

2021-02-23 Thread Chris Sorenson
Around 25 years ago, before the X Render Extension, Eric Foster-Johnson wrote a great article on the topic of using color in X, for the "Cross Thoughts" column in Unix Review Magazine. I've kept a copy ever since: When the X Window system became popular, particularly on UNIX workstations, you

Re: Beginner Questions About XCB - xcb_alloc_color is too slow

2021-02-22 Thread Sam Varshavchik
On Sun, Feb 21, 2021 at 4:47 PM Carsten Haitzler wrote: > > Use Xlib. Or just use a toolkit higher up the stack. XCB really is for people > who already know X backwards. It can buy some speedups in some corner-cases by > avoiding round trips to the server and back and putting the job of doing it

Re: Beginner Questions About XCB - xcb_alloc_color is too slow

2021-02-21 Thread Carsten Haitzler
On Sat, 20 Feb 2021 18:37:38 -0800 Mark Solomonik said: > Hello, > I am trying to implement a 3D engine from scratch with XCB. To do this, I > have to set the color of every individual pixel before drawing it. > > I noticed that calling xcb_alloc_color and xcb_alloc_color_reply are >

Re: Beginner Questions About XCB - xcb_alloc_color is too slow

2021-02-21 Thread Carsten Haitzler
On Sat, 20 Feb 2021 22:08:21 -0500 Sam Varshavchik said: > On Sat, Feb 20, 2021 at 9:37 PM Mark Solomonik > wrote: > > > > Hello, > > I am trying to implement a 3D engine from scratch with XCB. To do this, I > > have to set the color of every individual pixel before drawing it. > > > > I

Re: Beginner Questions About XCB - xcb_alloc_color is too slow

2021-02-20 Thread Sam Varshavchik
On Sat, Feb 20, 2021 at 9:37 PM Mark Solomonik wrote: > > Hello, > I am trying to implement a 3D engine from scratch with XCB. To do this, I > have to set the color of every individual pixel before drawing it. > > I noticed that calling xcb_alloc_color and xcb_alloc_color_reply are >

Beginner Questions About XCB - xcb_alloc_color is too slow

2021-02-20 Thread Mark Solomonik
Hello, I am trying to implement a 3D engine from scratch with XCB. To do this, I have to set the color of every individual pixel before drawing it. I noticed that calling xcb_alloc_color and xcb_alloc_color_reply are bottlenecking the program and making it slow to draw individual triangles.