glXChooseFBConfig vs glXChooseVisual

What are the advantages of using glXChooseFBConfig over glXChooseVisual?

You can create pbuffers with it. Possibly, you get some additional controls, but I am not shure. I think FBConfig is more flexible then visuals - anyway, glXChooseVisual is deprecated

OK, I see.
Another question: what should I do if there is no associated visual for the FBConfig, ie glXGetVisualFromFBConfig fails? I’m trying to use this code: http://publib.boulder.ibm.com/infocenter…oseFBConfig.htm

Conversion to visual for some FBConfigs fails probably because it has GLX_RGBA_FLOAT_BIT set in GLX_RENDER_TYPE, and there is no such visual. How do I create a wnidow and all the rest then?

You can’t :slight_smile: There are no GPUs that can draw floating-point images directly to the screen.

But you can create a pbuffer with such format and render off-screen. The best way for you though is to create a usual RGBA window(fidex-point) and use the FBO extension to render to a floating-point texture, if you must. Then you can use this texture to compose the image in your window(using shaders). You can’t use floating-point images in fixed pipeline anyway!

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.