85bb6b327d
- osg::Texture sets GL_MAX_TEXTURE_LEVEL if image uses fewer mipmaps than number from computeNumberOfMipmaps (and it works!) - DDS fix to read only available mipmaps - DDS fixes to read / save 3D textures with mipmaps ( packing == 1 is required) - Few cosmetic DDS modifications and comments to make code cleaner (I hope) Added _isTextureMaxLevelSupported variable to texture extensions. It could be removed if OSG requires OpenGL version 1.2 by default. Added simple ComputeImageSizeInBytes function in DDSReaderWrites. In my opinion it would be better if similar static method was defined for Image. Then it could be used not only in DDS but other modules as well (I noticed that Texture/Texture2D do similar computations). Also attached is an example test.osg model with DDS without last mipmaps to demonstrate the problem. When loaded into Viewer with current code and moved far away, so that cube occupies 4 pixels, cube becomes red due to the issue I described in earlier post. When you patch DDS reader writer with attched code but no osg::Texture yet, cube becomes blank (at least on my Windows/NVidia) When you also merge osg::Texture patch cube will look right and mipmaps will be correct." |
||
---|---|---|
.. | ||
OpenThreads | ||
osg | ||
osgAnimation | ||
osgDB | ||
osgFX | ||
osgGA | ||
osgIntrospection | ||
osgManipulator | ||
osgParticle | ||
osgShadow | ||
osgSim | ||
osgTerrain | ||
osgText | ||
osgUtil | ||
osgViewer | ||
osgVolume | ||
osgWidget |