From: Kimmo Hoikka Date: Fri, 30 Oct 2015 11:56:12 +0000 (+0000) Subject: Remove SetTextureAffectsTransparency as it is not needed X-Git-Tag: dali_1.1.9~6 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a23ba360cc88e815f0db1118236e082c7391005b;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git Remove SetTextureAffectsTransparency as it is not needed Change-Id: Idff1a07f187ab36df69ec541d5ff7c2aa6b1d420 --- diff --git a/dali-toolkit/internal/controls/model3d-view/model3d-view-impl.cpp b/dali-toolkit/internal/controls/model3d-view/model3d-view-impl.cpp index 9405ec0..f1f7a39 100644 --- a/dali-toolkit/internal/controls/model3d-view/model3d-view-impl.cpp +++ b/dali-toolkit/internal/controls/model3d-view/model3d-view-impl.cpp @@ -629,8 +629,7 @@ void Model3dView::LoadTextures() Image tex0 = ResourceImage::New( imgUrl ); if( tex0 ) { - size_t index = mMaterial.AddTexture( tex0, "sDiffuse" ); - mMaterial.SetTextureAffectsTransparency(index, false ); + mMaterial.AddTexture( tex0, "sDiffuse" ); } } @@ -642,8 +641,7 @@ void Model3dView::LoadTextures() Image tex1 = ResourceImage::New( imgUrl ); if (tex1) { - size_t index = mMaterial.AddTexture( tex1, "sNormal" ); - mMaterial.SetTextureAffectsTransparency(index, false ); + mMaterial.AddTexture( tex1, "sNormal" ); } } @@ -655,8 +653,7 @@ void Model3dView::LoadTextures() Image tex2 = ResourceImage::New( imgUrl ); if( tex2 ) { - size_t index = mMaterial.AddTexture( tex2, "sGloss" ); - mMaterial.SetTextureAffectsTransparency(index, false ); + mMaterial.AddTexture( tex2, "sGloss" ); } } } diff --git a/dali-toolkit/internal/controls/model3d-view/obj-loader.cpp b/dali-toolkit/internal/controls/model3d-view/obj-loader.cpp index c950b9d..f0450f1 100644 --- a/dali-toolkit/internal/controls/model3d-view/obj-loader.cpp +++ b/dali-toolkit/internal/controls/model3d-view/obj-loader.cpp @@ -548,7 +548,6 @@ Geometry ObjLoader::CreateGeometry(Toolkit::Model3dView::IlluminationType illumi } surface.SetRequiresDepthTesting(true); - //surface.SetProperty(Geometry::Property::GEOMETRY_HALF_EXTENTS, GetSize() * 0.5); vertices.Clear(); verticesExt.Clear(); diff --git a/plugins/dali-script-v8/src/rendering/material-api.cpp b/plugins/dali-script-v8/src/rendering/material-api.cpp index 8b2d0f9..cb173fa 100644 --- a/plugins/dali-script-v8/src/rendering/material-api.cpp +++ b/plugins/dali-script-v8/src/rendering/material-api.cpp @@ -326,40 +326,6 @@ void MaterialApi::SetTextureUniformName( const v8::FunctionCallbackInfo< v8::Val } /** - * Establish if a given texture will affect the transparency of the material ( true by default ) - * @method setTextureAffectsTransparency - * @for Material - * @param {integer} index The index of the texture in the array of textures - * @param {string} affectsTransparency True if the texture affects transparency, false otherwise - */ -void MaterialApi::SetTextureAffectsTransparency( const v8::FunctionCallbackInfo< v8::Value >& args ) -{ - v8::Isolate* isolate = args.GetIsolate(); - v8::HandleScope handleScope( isolate ); - - Material material = GetMaterial( isolate, args ); - - bool found( false ); - int index = V8Utils::GetIntegerParameter( PARAMETER_0, found, isolate, args, 0 /* default */); - if( !found ) - { - DALI_SCRIPT_EXCEPTION( isolate, "invalid index parameter" ); - return; - } - - found = false; - bool affectsTransparency = V8Utils::GetBooleanParameter( PARAMETER_1, found, isolate, args ); - if( !found ) - { - DALI_SCRIPT_EXCEPTION( isolate, "invalid affectsTransparency parameter" ); - } - else - { - material.SetTextureAffectsTransparency(index, affectsTransparency); - } -} - -/** * Retrive the index of a texture given its uniform name * @method getTextureIndex * @for Material diff --git a/plugins/dali-script-v8/src/rendering/material-api.h b/plugins/dali-script-v8/src/rendering/material-api.h index 326b22c..314ba2a 100644 --- a/plugins/dali-script-v8/src/rendering/material-api.h +++ b/plugins/dali-script-v8/src/rendering/material-api.h @@ -64,7 +64,6 @@ namespace MaterialApi void SetTextureImage( const v8::FunctionCallbackInfo< v8::Value >& args ); void SetTextureSampler( const v8::FunctionCallbackInfo< v8::Value >& args ); void SetTextureUniformName( const v8::FunctionCallbackInfo< v8::Value >& args ); - void SetTextureAffectsTransparency( const v8::FunctionCallbackInfo< v8::Value >& args ); void GetTextureIndex( const v8::FunctionCallbackInfo< v8::Value >& args ); void GetNumberOfTextures( const v8::FunctionCallbackInfo< v8::Value >& args ); void SetFaceCullingMode( const v8::FunctionCallbackInfo< v8::Value >& args ); diff --git a/plugins/dali-script-v8/src/rendering/material-wrapper.cpp b/plugins/dali-script-v8/src/rendering/material-wrapper.cpp index 4fc5a77..2ebdb81 100644 --- a/plugins/dali-script-v8/src/rendering/material-wrapper.cpp +++ b/plugins/dali-script-v8/src/rendering/material-wrapper.cpp @@ -52,7 +52,6 @@ const ApiFunction MaterialFunctionTable[]= { "SetTextureImage" , MaterialApi::SetTextureImage }, { "SetTextureSampler" , MaterialApi::SetTextureSampler }, { "SetTextureUniformName" , MaterialApi::SetTextureUniformName }, - { "SetTextureAffectsTransparency" , MaterialApi::SetTextureAffectsTransparency }, { "GetTextureIndex" , MaterialApi::GetTextureIndex }, { "GetNumberOfTextures" , MaterialApi::GetNumberOfTextures }, { "SetFaceCullingMode" , MaterialApi::SetFaceCullingMode },