Changed COLOUR to COLOR to be consistent with OpenGL spelling

This commit is contained in:
Robert Osfield 2012-11-13 13:32:01 +00:00
parent 92975a01fd
commit 933baf5db4
6 changed files with 14 additions and 14 deletions

View File

@ -589,10 +589,10 @@ int main( int argc, char **argv )
while(arguments.read("--r_maxTextureSize",r_maximumTextureSize)) {}
// set up colour space operation.
osg::ColorSpaceOperation colourSpaceOperation = osg::NO_COLOUR_SPACE_OPERATION;
osg::ColorSpaceOperation colourSpaceOperation = osg::NO_COLOR_SPACE_OPERATION;
osg::Vec4 colourModulate(0.25f,0.25f,0.25f,0.25f);
while(arguments.read("--modulate-alpha-by-luminance")) { colourSpaceOperation = osg::MODULATE_ALPHA_BY_LUMINANCE; }
while(arguments.read("--modulate-alpha-by-colour", colourModulate.x(),colourModulate.y(),colourModulate.z(),colourModulate.w() )) { colourSpaceOperation = osg::MODULATE_ALPHA_BY_COLOUR; }
while(arguments.read("--modulate-alpha-by-colour", colourModulate.x(),colourModulate.y(),colourModulate.z(),colourModulate.w() )) { colourSpaceOperation = osg::MODULATE_ALPHA_BY_COLOR; }
while(arguments.read("--replace-alpha-with-luminance")) { colourSpaceOperation = osg::REPLACE_ALPHA_WITH_LUMINANCE; }
while(arguments.read("--replace-rgb-with-luminance")) { colourSpaceOperation = osg::REPLACE_RGB_WITH_LUMINANCE; }
@ -936,7 +936,7 @@ int main( int argc, char **argv )
}
if (colourSpaceOperation!=osg::NO_COLOUR_SPACE_OPERATION)
if (colourSpaceOperation!=osg::NO_COLOR_SPACE_OPERATION)
{
for(Images::iterator itr = images.begin();
itr != images.end();

View File

@ -163,9 +163,9 @@ extern OSG_EXPORT osg::Image* createSpotLightImage(const osg::Vec4& centerColour
enum ColorSpaceOperation
{
NO_COLOUR_SPACE_OPERATION,
NO_COLOR_SPACE_OPERATION,
MODULATE_ALPHA_BY_LUMINANCE,
MODULATE_ALPHA_BY_COLOUR,
MODULATE_ALPHA_BY_COLOR,
REPLACE_ALPHA_WITH_LUMINANCE,
REPLACE_RGB_WITH_LUMINANCE
};

View File

@ -293,7 +293,7 @@ public:
cutoffValue(0.1),
sampleDensityValue(0.005),
sampleDensityWhenMovingValue(0.0),
colorSpaceOperation(osg::NO_COLOUR_SPACE_OPERATION),
colorSpaceOperation(osg::NO_COLOR_SPACE_OPERATION),
colorModulate(1.0f,1.0f,1.0f,1.0f)
{
region[0] = region[1] = region[2] = 0.0f;

View File

@ -615,9 +615,10 @@ osg::Image* createSpotLightImage(const osg::Vec4& centerColour, const osg::Vec4&
}
struct ModulateAlphaByColourOperator
struct ModulateAlphaByColorOperator
{
ModulateAlphaByColourOperator(const osg::Vec4& colour):_colour(colour) { _lum = _colour.length(); }
ModulateAlphaByColorOperator(const osg::Vec4& colour):_colour(colour) { _lum = _colour.length(); }
osg::Vec4 _colour;
float _lum;
@ -650,10 +651,10 @@ osg::Image* colorSpaceConversion(ColorSpaceOperation op, osg::Image* image, cons
osg::modifyImage(image, ModulateAlphaByLuminanceOperator());
return image;
}
case (MODULATE_ALPHA_BY_COLOUR):
case (MODULATE_ALPHA_BY_COLOR):
{
OSG_NOTICE<<"doing conversion MODULATE_ALPHA_BY_COLOUR"<<std::endl;
osg::modifyImage(image, ModulateAlphaByColourOperator(colour));
osg::modifyImage(image, ModulateAlphaByColorOperator(colour));
return image;
}
case (REPLACE_ALPHA_WITH_LUMINANCE):

View File

@ -1105,10 +1105,9 @@ void ReaderWriterP3DXML::parseVolume(osgPresentation::SlideShowConstructor& cons
std::string operation;
if (getProperty(cur, "colorSpaceOperation", operation) || getProperty(cur, "colourSpaceOperation", operation))
{
osg::ColorSpaceOperation colorOp = osg::NO_COLOUR_SPACE_OPERATION;
if (operation=="NO_COLOUR_SPACE_OPERATION") volumeData.colorSpaceOperation = osg::NO_COLOUR_SPACE_OPERATION;
if (operation=="NO_COLOR_SPACE_OPERATION") volumeData.colorSpaceOperation = osg::NO_COLOR_SPACE_OPERATION;
else if (operation=="MODULATE_ALPHA_BY_LUMINANCE") volumeData.colorSpaceOperation = osg::MODULATE_ALPHA_BY_LUMINANCE;
else if (operation=="MODULATE_ALPHA_BY_COLOUR") volumeData.colorSpaceOperation = osg::MODULATE_ALPHA_BY_COLOUR;
else if (operation=="MODULATE_ALPHA_BY_COLOR") volumeData.colorSpaceOperation = osg::MODULATE_ALPHA_BY_COLOR;
else if (operation=="REPLACE_ALPHA_WITH_LUMINANCE") volumeData.colorSpaceOperation = osg::REPLACE_ALPHA_WITH_LUMINANCE;
else if (operation=="REPLACE_RGB_WITH_LUMINANCE") volumeData.colorSpaceOperation = osg::REPLACE_RGB_WITH_LUMINANCE;
}

View File

@ -2082,7 +2082,7 @@ void SlideShowConstructor::addVolume(const std::string& filename, const Position
if (!image && !volume) return;
if (volumeData.colorSpaceOperation!=osg::NO_COLOUR_SPACE_OPERATION)
if (volumeData.colorSpaceOperation!=osg::NO_COLOR_SPACE_OPERATION)
{
OSG_NOTICE<<"Doing colour space conversion"<<std::endl;
osg::ref_ptr<osg::Image> converted_image = osg::colorSpaceConversion(volumeData.colorSpaceOperation, image.get(), volumeData.colorModulate);