From: Brian P. <br...@va...> - 2000-11-13 14:54:50
|
"Jacob (=Jouk) Jansen" wrote: > > br...@va... wrote on 13-NOV-2000 08:41:11.07 > >"Jacob (=Jouk) Jansen" wrote: > >> In teximage.c from the main CVS branche at line 2201 texImage is used without > >> any initialization. My compiler chokes on it and I do think the initialization > >> is missing. > >> In a previous version this happened by > >> texImage = _mesa_select_tex_image(ctx, texUnit, target, level); > >> Just above line 2201. > >> Should this line be reinserted??? > > > >Yes, I think I made a cut&paste error when I was working on that code. > >Namely, I forgot to to do the paste! > Now your code reads: > > texUnit = &(ctx->Texture.Unit[ctx->Texture.CurrentUnit]); > texObj = _mesa_select_tex_object(ctx, texUnit, target); > if (!texObj || !texImage || > target == GL_PROXY_TEXTURE_1D || > target == GL_PROXY_TEXTURE_2D || > target == GL_PROXY_TEXTURE_3D) { > gl_error(ctx, GL_INVALID_ENUM, "glGetTexImage(target)"); > return; > } > > texImage = _mesa_select_tex_image(ctx, texUnit, target, level); > if (!texImage) { > /* invalid mipmap level, not an error */ > return; > } > > Should the > if (!texObj || !texImage || > be replaced by > if (!texObj || It should be if (!texObj || !texUnit || Sorry. I'll fix it ASAP. -Brian |