Re: [clutter] [patches] re-enable ARB_texture_rectangle



Hi;

On Wed, 2008-11-05 at 18:54 -0500, Owen Taylor wrote:
> 
> OK, here's a stab at this. The first two patches (one for clutter, one
> for metacity-clutter) basically simply revert the removal of
> ARB_texture_rectangle support from clutter.
> 
> However, that leaves two problems:
> 
>  - texture_rectangle might unexpectedly be used in places that
>    clutter-0.8 code won't expect, breaking compatibility.
> 
>  - for texture_from_pixmap, I want a way to actually force
>    texture_rectangle to be used, to deal with driver bugs.
>    (The current proprietary NVIDIA drivers are buggy this way;
>    and I think also older Intel drivers.)
> 
> So, the second two patches add:
> 
>  cogl_texture_new_with_size_and_options()
>  cogl_texture_new_from_data_and_options()
>  cogl_texture_new_from_file_and_options() // for completeness 
> 
> Where auto_mipmap is replaced with a flags field. (If breaking cogl
> compat, you'd just want to change existing functions.) texture_rectangle
> is not used by default, but you can pass:
> 
>  COGL_TEXTURE_ALLOW_RECTANGLE: allow it to be used
>  COGL_TEXTURE_FORCE_RECTANGLE: use in preference to NPOT textures
> 
> And ClutterGLXPixmapTexture supports an environment variable 
> CLUTTER_PIXMAP_TEXTURE_RECTANGLE=[force|disable].
> 
> The default is to allow - there's a good argument that it should default
> to 'force' instead, considering the widespread presence of such buggy
> drivers.
> 

Ah sorry replied to previous mail before seeing this - I think suggested
simple cogl addition to hopefully cover what the above is doing could be
simpler and easier managed long term. Maybe some downsides there Im
missing though - let me know what you think.

  == Matthew

-- 
Matthew Allum, Intel Open Source Technology Center



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]