Hi Wojtek,

On a cursory read of your email it does sound like glTexParameter
GL_TEXTURE_MAX_LEVEL would be worth setting.  It'd be interesting if
this along with changes to the dds plugin would solve the problems you
are seeing.

Robert.

2009/6/3 Wojciech Lewandowski <[email protected]>:
> Hi Robert,
>
> I believe I have found a bug in DDS loader. DDS images can have lower number
> of mipmaps than it would require. But current DDS loader allocates storage
> for all mipmap offsets but only reads mipmaps that are stored in
> DDS. Offsets for missing mipmaps are set to 0. One could say thats this is
> correct but I cannot agree. Full length mipmap offsets vector is a reason
> that Image::getNumMipmapLevels() returns number showing that mipmap chain is
> full. This in effect is a reason that Texture apply attempts to load  these
> missing mipmaps. Next step is a pair of Image::getMipmapData &
> Image::getMipmapOffset functions which return addres and offset of main
> image for missing mipmaps. So in effect missing mipmaps will be incorrectly
> loaded from main image pixels.
>
> But the story does not end here. When I tried to fix the loader to allocate
> and read only available mipmaps I encountered a strange problem.
> Textures using such incomplete mipmap chains were drawn blank (all white). I
> started digging and I have found that if not all mipmaps are loaded for
> texture then mipmap filters may not work. In my case it was more extreme
> because this particular texture was completely not working, but I expect
> that if code was incorrect  driver did not need to behave predictably. Then
> I found that it is allowed to use lower number of mipmaps in OpenGL but one
> has to set glTexParameter GL_TEXTURE_MAX_LEVEL to last available mipmap
> index. I did a search in OSG and currently this parameter is not set. May we
> add this ?
>
> Cheers,
> Wojtek
> _______________________________________________
> osg-submissions mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
>
>
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to