Re: [osg-users] [osgPlugins] DDS Texture vanish with LINEAR_MIPMAP_LINEAR

2013-01-11 Thread Lukasz Izdebski
Hi,

I have a question. Why while reading dds file, to set number of mipmaps it is 
using function osg::Image::computeNumberOfMipmapLevels( s, t, r ) but not what 
is written in dds file header ?
I think that dds file knows better how many mipmaps it has inside.

Thank you!

Cheers,
Lukasz

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=51911#51911





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [osgPlugins] DDS Texture vanish with LINEAR_MIPMAP_LINEAR

2013-01-11 Thread Lukasz Izdebski
Hi,

But for example we have 512x512 dds texture compressed with DXT1 and in header 
we have 4 mipmaps.
In this example is meaningless to compute number of mipmaps, because OpenGL 
,with my knowledge, does not generate mipmaps for compressed textures. So 
setting bigger number of mipmaps is wrong.

I didn't find a program which generate dds and write wrong number of mipmaps. 
If it does change the program :).

Thank you!

Cheers,
Lukasz

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=51914#51914





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [osgPlugins] DDS Texture vanish with LINEAR_MIPMAP_LINEAR

2012-12-20 Thread Lukasz Izdebski
Hi,
i probably have solution for this problem, i have found a bug in dds plugin
ReaderWriterDDS.cpp
Line 633
unsigned numMipmaps = osg::Image::computeNumberOfMipmapLevels( s, t, r );

when compute numMipmaps returns wrong number. this number is less then number 
of mipmaps in dds file( ddsd.dwMipMapCount ) . This bug makes that when dds 
mipmaps are loaded to opengl last mipmap (4x4) isn't loaded. and with 
combination with LINEAR_MIPMAP_LINEAR make this bug.


the numMipmaps should be taken form ddsd.dwMipMapCount


in attachment i send a corrected version of file.
... 

Thank you!

Cheers,
Lukasz

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=51653#51653




Attachments: 
http://forum.openscenegraph.org//files/readerwriterdds_204.cpp


___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org