[Mesa-dev] [PATCH v2 15/18] extensions: enable EXT_color_buffer_float for ES2/ES3

Ian Romanick idr at freedesktop.org
Mon Jan 14 15:11:27 PST 2013


On 01/14/2013 01:01 PM, Jordan Justen wrote:
> On Mon, Jan 14, 2013 at 11:13 AM, Matt Turner <mattst88 at gmail.com> wrote:
>> On Sat, Jan 12, 2013 at 8:11 PM, Jordan Justen
>>> diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
>>> index a219398..abb9f34 100644
>>> --- a/src/mesa/main/fbobject.c
>>> +++ b/src/mesa/main/fbobject.c
>>> @@ -1217,21 +1217,27 @@ _mesa_base_fbo_format(struct gl_context *ctx, GLenum internalFormat)
>>>                ctx->Extensions.ARB_framebuffer_object ? GL_ALPHA : 0;
>>>      case GL_R16F:
>>>      case GL_R32F:
>>> -      return (_mesa_is_desktop_gl(ctx) &&
>>> -             ctx->Extensions.ARB_texture_rg &&
>>> -             ctx->Extensions.ARB_texture_float) ? GL_RED : 0;
>>> +      return ((_mesa_is_desktop_gl(ctx) &&
>>> +               ctx->Extensions.ARB_texture_rg &&
>>> +               ctx->Extensions.ARB_texture_float) ||
>>> +              (ctx->API == API_OPENGLES2) /* EXT_color_buffer_float */ )
>>> +         ? GL_RED : 0;
>>
>> I wonder if there is any hardware that can do ES 2 but not
>> floating-point color buffers?
>
> Whoops. Ian recommended I use the ARB_texture_float flag for this extension.

I just noticed that EXT_color_buffer_float says "Requires OpenGL ES 
3.0."  We'll have to do something a little different to enable the 
string, and we'll need to check

	(_mesa_is_desktop_gl(ctx) || _mesa_is_gles3(ctx)) &&
         ctx->Extensions.ARB_texture_rg &&
         ctx->Extensions.ARB_texture_float



More information about the mesa-dev mailing list