PDA

View Full Version : how to derermine if FBO format is supported ?



addmx
06-11-2009, 09:22 AM
Hi

is there any way to determine/query if given color/depth attachment format is supported for fbo ?

(of course without creating fbo and texture/renderbuffer and then checking if status is GL_FRAMEBUFFER_UNSUPPORTED_EXT or GL_FRAMEBUFFER_COMPLETE_EXT)

basicaly i need to know in advance if format will be supported before i create texture, so i could chose supported format.

Brolingstanz
06-11-2009, 10:31 AM
For GL3.0+ you can check the core spec for a list of required renderbuffer color and depth formats.

addmx
06-11-2009, 11:43 AM
... and if I use GL2.1 + extensions ? - i am doomed ?
that same for antialiasing modes (and number of samples) for each possible format ?

Brolingstanz
06-11-2009, 12:17 PM
Well, my read is that the table of req'd formats in the spec together with the wording around RenderbufferStorageMultisample and MAX_SAMPLES pretty well rounds out a fairly compelling basis to go on.

Dunno about pre GL3 (other that what you might glean from the relevant spec), but that's not on my menu...

dletozeun
06-11-2009, 12:51 PM
The presence of some extensions should guarantee the support of various texture formats and in worst cases, the driver should use the closest texture format supported but not crash.

addmx
06-11-2009, 02:52 PM
sadly the driver (to be specific 185.85 (latest) on nvidia GF 7800 under vista x64) returns GL_FRAMEBUFFER_UNSUPPORTED_EXT for (GL_LUMINANCE, GL_LUMINANCE16F_ARB, GL_HALF_FLOAT_ARB) format.
But under directX i could use D3DFMT_R16F as a rendertarget - so one channel 16bit float rendertargets are supported on the hardware.

That's why i'm asking about the query - to se what singlechannel half float format i could use in my opengl app for FBO on that particular hardware.

What are the hardware requirements for OpenGL 3.0 to work ?
What nvidia hardware is minimum for openGL 3.0 to work ?
It is 6xxx series, 7xxx series or the first one is 8xxx series
(i could create opengl 3.0 context on gf 8800 GT - so 8xxx series works fine - but my app needs to run on 6xxx series too - i do not own for example gf 6800 to check if it could handle gl 3.0)

From the programmer point of view there realy should be some extension (or better standard :)) to query hardware capabilities about what formats are supported for FBO

martinsm
06-11-2009, 03:48 PM
With Nvidia and ATI gl3 is only supported on DX10 class videocards. So that means GF 8xxx (and up) or ATI HDxxxx cards.

dletozeun
06-11-2009, 04:28 PM
(GL_LUMINANCE, GL_LUMINANCE16F_ARB, GL_HALF_FLOAT_ARB) format.


All these require your hardware to support these extensions with OpenGL 2.1:

ARB_half_float_pixel (http://www.nvidia.com/dev_content/nvopenglspecs/GL_ARB_half_float_pixel.txt)
ARB_color_buffer_float (http://oss.sgi.com/projects/ogl-sample/registry/ARB/color_buffer_float.txt)
ARB_texture_float (http://www.opengl.org/registry/specs/ARB/texture_float.txt)