Bug fixes to osgText to handle the osgUtil::Optimizer being used on a scene
graph containing text. Fixed warning in MD2 plugin.
This commit is contained in:
@@ -81,6 +81,27 @@ void Image::deallocateData()
|
||||
}
|
||||
}
|
||||
|
||||
int Image::compare(const Image& rhs) const
|
||||
{
|
||||
if (getFileName()<rhs.getFileName()) return -1;
|
||||
else if (getFileName()>rhs.getFileName()) return 1;
|
||||
|
||||
// need to test against image contents here...
|
||||
COMPARE_StateAttribute_Parameter(_s)
|
||||
COMPARE_StateAttribute_Parameter(_t)
|
||||
COMPARE_StateAttribute_Parameter(_internalTextureFormat)
|
||||
COMPARE_StateAttribute_Parameter(_pixelFormat)
|
||||
COMPARE_StateAttribute_Parameter(_dataType)
|
||||
COMPARE_StateAttribute_Parameter(_packing)
|
||||
COMPARE_StateAttribute_Parameter(_modifiedTag)
|
||||
|
||||
// still need implement checks for
|
||||
// _data
|
||||
// _mipmapData
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void Image::setFileName(const std::string& fileName)
|
||||
{
|
||||
_fileName = fileName;
|
||||
|
||||
@@ -212,7 +212,8 @@ void State::apply(const StateSet* dstate)
|
||||
//pushStateSet(dstate);
|
||||
//apply();
|
||||
//popStateSet();
|
||||
|
||||
//return;
|
||||
|
||||
if (dstate)
|
||||
{
|
||||
|
||||
|
||||
@@ -50,8 +50,8 @@ int Texture1D::compare(const StateAttribute& sa) const
|
||||
{
|
||||
if (rhs._image.valid())
|
||||
{
|
||||
if (_image->getFileName()<rhs._image->getFileName()) return -1;
|
||||
else if (_image->getFileName()>rhs._image->getFileName()) return 1;;
|
||||
int result = _image->compare(*rhs._image);
|
||||
if (result!=0) return result;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -52,8 +52,8 @@ int Texture2D::compare(const StateAttribute& sa) const
|
||||
{
|
||||
if (rhs._image.valid())
|
||||
{
|
||||
if (_image->getFileName()<rhs._image->getFileName()) return -1;
|
||||
else if (_image->getFileName()>rhs._image->getFileName()) return 1;;
|
||||
int result = _image->compare(*rhs._image);
|
||||
if (result!=0) return result;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -57,8 +57,8 @@ int Texture3D::compare(const StateAttribute& sa) const
|
||||
{
|
||||
if (rhs._image.valid())
|
||||
{
|
||||
if (_image->getFileName()<rhs._image->getFileName()) return -1;
|
||||
else if (_image->getFileName()>rhs._image->getFileName()) return 1;;
|
||||
int result = _image->compare(*rhs._image);
|
||||
if (result!=0) return result;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -129,8 +129,8 @@ int TextureCubeMap::compare(const StateAttribute& sa) const
|
||||
{
|
||||
if (rhs._images[n].valid())
|
||||
{
|
||||
if (_images[n]->getFileName()<rhs._images[n]->getFileName()) return -1;
|
||||
else if (_images[n]->getFileName()>rhs._images[n]->getFileName()) return 1;;
|
||||
int result = _images[n]->compare(*rhs._images[n]);
|
||||
if (result!=0) return result;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user