David Reveman
2007-Mar-28 09:06 UTC
[compiz] Re: compiz: Changes to 'master' (Added possibility to load textures with fixed RGBA byte ordering from header files)
On Wed, 2007-03-28 at 06:29 -0700, Danny Baumann wrote:> include/compiz.h | 5 +++-- > src/cursor.c | 3 ++- > src/texture.c | 17 +++++++++++------ > 3 files changed, 16 insertions(+), 9 deletions(-) > > New commits: > commit 8e3b26fe3000602cfad0eaae2242abb1274c2ce3 > Author: Danny Baumann <dannybaumann@web.de> > Date: Wed Mar 28 15:29:42 2007 +0200 > > Added possibility to load textures with fixed RGBA byte ordering from header files. >I find this change pretty ugly. "Bool fixedRGBA" looks like a quick hack to extend the imageToTexture function with some specific functionality. Creating a lower level function that accept a format and a type GLenum seems like a more appropriate solution to me. However, if you're storing textures in header files. I suggest that you store them as png data, in which case you you don't need this functionality in core at all as png plugin will do byte-swapping when necessary. - David
Danny Baumann
2007-Mar-28 09:28 UTC
[compiz] Re: compiz: Changes to 'master' (Added possibility to load textures with fixed RGBA byte ordering from header files)
Hi,> I find this change pretty ugly. "Bool fixedRGBA" looks like a quick hack > to extend the imageToTexture function with some specific functionality. > > Creating a lower level function that accept a format and a type GLenum > seems like a more appropriate solution to me.To be honest, I'm a bit surprised about that. I asked you about adding that kind of functionality before explaining what I'm going to do, and you agreed to that. Besides that, I'm not sure if we really need such an universal loader function. However, I can have a look into it ... do you have any proposal on how an interface (prototype) should look like?> However, if you're storing textures in header files. I suggest that you > store them as png data, in which case you you don't need this > functionality in core at all as png plugin will do byte-swapping when > necessary.Only textures which aren't supposed to be changed and are crucial for the operation of a plugin should be stored in header files. In my opinion, for those important textures we should avoid creating image loader plugin dependencies. Regards, Danny