Mathias Fröhlich a écrit :

...

But that means we could at the point where the warning happens compute the mipmap levels on the cpu in the loader thread. osg::gluScaleImage could be used to do this I think (or something similar not requireing a context). This one is an imported version of the original glu function that is included in osg for running on an EGL stack which no longer provides GLU.

That is take the image scale this to the 1st mipmap, take the 1.st mipmap and scale this to the 2. mipmap and so forth.

This would have the advantage that the png's do not deviate from the dds files over time.


gluScaleImage does the usual job of blurring the texture to compute the mipmaps. The advantage of pre computed mipmaps (inside .dds or not) is that we can use better algorithms (http://en.wikipedia.org/wiki/Bicubic_interpolation or http://en.wikipedia.org/wiki/Lanczos_resampling) to generate them. Perhaps gluScaleImage could be upgraded with some more algorithms ; the original code was trying to be fast but this is perhaps useless nowadays if the code runs in a separate thread.


HJ.

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to