From: Brian P. <br...@va...> - 2001-03-20 15:26:26
|
Gareth Hughes wrote: > > Brian, what do you want to do about the triangle functions that are > doing things like: > > ... > const GLchan *texture = (const GLchan *) obj->Image[b]->Data; > ... > rgb[i][RCOMP] = texture[pos]; > rgb[i][GCOMP] = texture[pos+1]; > rgb[i][BCOMP] = texture[pos+2]; > ... > > A quick inspection indicates at least simple_textured_triangle(), > simple_z_textured_triangle() and affine_textured_triangle() in > swrast/s_triangle.c are all guilty of this. Those triangle functions should only be chosen if the texture is GL_RGB (or GL_RGBA) with GLubyte components. The "choose" function should make all the necessary checks. -Brian |