From: Brian P. <br...@va...> - 2000-10-05 22:17:33
|
Michael Vance wrote: > > On Thu, Oct 05, 2000 at 11:43:10AM -0600, Brian Paul wrote: > > > glXChooseVisual() really is poorly designed. Serious apps should > > avoid it and use a better visual selection method. > > Such as? For each visual on the display, interogate the GLX attributes with glXGetConfig(). Then rank the visuals according to your app's needs and use the top one. This probably isn't a big deal on PC systems since all the visuals typically have the same color depth, Z size, accum buffer size, etc. But when I was developing for SGI systems I learned that visual selection can be tricky when there's an assortment of color depths, Z sizes, accum sizes, etc. For example, on an Indigo2 with High IMPACT graphics, there's an R-4, G-4, B-4, A-4, double-buffered visual and an R-5, G-5, B-5, A-1, double-buffered visual. If your GLX choose visual attribute list has GLX_RED/GREEN/BLUE/ALPHA_SIZE=1 then it's not clear which of those two visuals you'll get, and it might be really important to the app to get the right one. This was especially complicated on Infinite Reality systems because it offered more than 120 visuals with all kinds of trade-offs between the depths of the color and ancillary buffers. -Brian |