From: Gareth H. <ga...@va...> - 2001-03-07 02:16:15
|
Brian Paul wrote: > > With 3.5 drivers can implement _any_ format or type of texture images they > want. They just have to provide the appropriate FetchTexel() functions > so the software fallbacks can operate. FetchTexel() should return GLchan > values. > > But yes, the s/w Mesa teximage routines should be written with the GLchan > type so that 16-bit and float color components will be possible. texImage->TexFormat can't be NULL, so there has to be texure formats for the s/w texture images. I'm trying to make this as clean as possible, as the old "Mesa formats" were based on GLubyte per channel only. > Originally, the "Mesa formats" and texutil.[ch] were just helper routines > for drivers; core Mesa knew nothing about them. It sounds like you're > bringing that into core Mesa. I'm not sure of all the ramifications of > that. Only the texture format stuff. The texutil code is used by drivers to convert into hardware-friendly texture formats, but the texstore utilities need to have corresponding gl_texture_format structures for tightly-packed GLchan images. Now, the gl_texture_image structure has a pointer to a gl_texture_format structure that defines the internal format of the image. The gl_texture_format has the component sizes, bytes per texel, and custom FetchTexel routines that are plugged into the main gl_texture_image structure. > It was compiling about a month ago. I started testing OSMesa with 16-bit > color channels but didn't do any verification. It's definitely not > ready for prime time yet. Okay, I was just wondering if it was possible to test it out. Some of the colormac.h macros look a little wrong, particularly this one at 16 bits: #define UBYTE_TO_CHAN(b) ((GLchan) (((b) << 8) | (b))) -- Gareth |