Changed Texture so that is use lazy updating on texture paramters (Filter/Wrap)
mode by using a _texParamtersDirty flag in combination with an applyTexParamters(State&) method which does the paramters setting in one tidy bundle. This new implementations replaces the CompileFlags submitted yesterday. Simplified NodeCallback by remove osg::NodeCallback::Requirements as they are no longer needed. Fixed comments in Drawable. Put guards around cosf definations so that they are only used under Win32/Mac. Fixed warning in CullVisitor.
This commit is contained in:
@@ -174,6 +174,7 @@ bool Texture_matchWrapStr(const char* str,Texture::WrapMode& wrap)
|
||||
{
|
||||
if (strcmp(str,"CLAMP")==0) wrap = Texture::CLAMP;
|
||||
else if (strcmp(str,"CLAMP_TO_EDGE")==0) wrap = Texture::CLAMP_TO_EDGE;
|
||||
else if (strcmp(str,"CLAMP_TO_BORDER")==0) wrap = Texture::CLAMP_TO_BORDER;
|
||||
else if (strcmp(str,"REPEAT")==0) wrap = Texture::REPEAT;
|
||||
else if (strcmp(str,"MIRROR")==0) wrap = Texture::MIRROR;
|
||||
else return false;
|
||||
@@ -187,6 +188,7 @@ const char* Texture_getWrapStr(Texture::WrapMode wrap)
|
||||
{
|
||||
case(Texture::CLAMP): return "CLAMP";
|
||||
case(Texture::CLAMP_TO_EDGE): return "CLAMP_TO_EDGE";
|
||||
case(Texture::CLAMP_TO_BORDER): return "CLAMP_TO_BORDER";
|
||||
case(Texture::REPEAT): return "REPEAT";
|
||||
case(Texture::MIRROR): return "MIRROR";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user