From: Gareth H. <ga...@va...> - 2001-03-27 20:10:48
|
Brian Paul wrote: > > This code in texutil.c: > > #define CONVERT_TEXEL_DWORD( src ) \ > ({ GLuint s = *(GLuint *)src; \ > s = (((s & 0xfffefffe) >> 1) | \ > ((s & 0x00010001) << 15)); s; }) > > is not ANSI-legal. > > I'll fix it up. If possible, can you do it without changing the template file? Thanks. Inline functions should do the trick. And I just built standalone Mesa and discovered this fact, not that I'm surprised or anything :-) > With these latest changes it appears to me that the Format and Type > fields in gl_texture_image are redundant with respect to the BaseFormat > and BaseType fields in the gl_texture_format struct. I'd like to > remove Format and Type from the former and use the later instead. > I'll work on that too. I'm still trying to work out the best way to handle format and type info for the hardware-format images. So far, I've used types like GL_UNSIGNED_SHORT_5_6_5 and so on, but kept the base format as one of the original legal base format values (ie. I'm not using GL_BGRA combined with the *_REV types). I'm ultra-busy with other stuff, so feel free to do this. I guess my biggest aim here is to remove all the massive case statements that check the format and type info. It might be worth storing the number of components in gl_texture_format as well, for instance. -- Gareth |