Remove SetTextureAffectsTransparency as it is not needed 40/50740/3
authorKimmo Hoikka <kimmo.hoikka@samsung.com>
Fri, 30 Oct 2015 11:56:12 +0000 (11:56 +0000)
committerKimmo Hoikka <kimmo.hoikka@samsung.com>
Fri, 30 Oct 2015 13:16:35 +0000 (13:16 +0000)
Change-Id: Idff1a07f187ab36df69ec541d5ff7c2aa6b1d420

dali-toolkit/internal/controls/model3d-view/model3d-view-impl.cpp
dali-toolkit/internal/controls/model3d-view/obj-loader.cpp
plugins/dali-script-v8/src/rendering/material-api.cpp
plugins/dali-script-v8/src/rendering/material-api.h
plugins/dali-script-v8/src/rendering/material-wrapper.cpp

index 9405ec0..f1f7a39 100644 (file)
@@ -629,8 +629,7 @@ void Model3dView::LoadTextures()
     Image tex0 = ResourceImage::New( imgUrl );
     if( tex0 )
     {
     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)
     {
     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 )
     {
     Image tex2 = ResourceImage::New( imgUrl );
     if( tex2 )
     {
-      size_t index = mMaterial.AddTexture( tex2, "sGloss" );
-      mMaterial.SetTextureAffectsTransparency(index, false );
+      mMaterial.AddTexture( tex2, "sGloss" );
     }
   }
 }
     }
   }
 }
index c950b9d..f0450f1 100644 (file)
@@ -548,7 +548,6 @@ Geometry ObjLoader::CreateGeometry(Toolkit::Model3dView::IlluminationType illumi
   }
 
   surface.SetRequiresDepthTesting(true);
   }
 
   surface.SetRequiresDepthTesting(true);
-  //surface.SetProperty(Geometry::Property::GEOMETRY_HALF_EXTENTS, GetSize() * 0.5);
 
   vertices.Clear();
   verticesExt.Clear();
 
   vertices.Clear();
   verticesExt.Clear();
index 8b2d0f9..cb173fa 100644 (file)
@@ -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
  * Retrive the index of a texture given its uniform name
  * @method getTextureIndex
  * @for Material
index 326b22c..314ba2a 100644 (file)
@@ -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 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 );
    void GetTextureIndex( const v8::FunctionCallbackInfo< v8::Value >& args );
    void GetNumberOfTextures( const v8::FunctionCallbackInfo< v8::Value >& args );
    void SetFaceCullingMode( const v8::FunctionCallbackInfo< v8::Value >& args );
index 4fc5a77..2ebdb81 100644 (file)
@@ -52,7 +52,6 @@ const ApiFunction MaterialFunctionTable[]=
    { "SetTextureImage"                 , MaterialApi::SetTextureImage },
    { "SetTextureSampler"               , MaterialApi::SetTextureSampler },
    { "SetTextureUniformName"           , MaterialApi::SetTextureUniformName },
    { "SetTextureImage"                 , MaterialApi::SetTextureImage },
    { "SetTextureSampler"               , MaterialApi::SetTextureSampler },
    { "SetTextureUniformName"           , MaterialApi::SetTextureUniformName },
-   { "SetTextureAffectsTransparency"   , MaterialApi::SetTextureAffectsTransparency },
    { "GetTextureIndex"                 , MaterialApi::GetTextureIndex },
    { "GetNumberOfTextures"             , MaterialApi::GetNumberOfTextures },
    { "SetFaceCullingMode"              , MaterialApi::SetFaceCullingMode },
    { "GetTextureIndex"                 , MaterialApi::GetTextureIndex },
    { "GetNumberOfTextures"             , MaterialApi::GetNumberOfTextures },
    { "SetFaceCullingMode"              , MaterialApi::SetFaceCullingMode },