Changes after ShaderEffect removal 10/101610/1
authorAdeel Kazmi <adeel.kazmi@samsung.com>
Thu, 1 Dec 2016 14:19:33 +0000 (14:19 +0000)
committerAdeel Kazmi <adeel.kazmi@samsung.com>
Thu, 1 Dec 2016 14:19:33 +0000 (14:19 +0000)
Change-Id: Id46be222b1866f814056058c0f66e1e155c9882f

adaptors/emscripten/wrappers/dali-wrapper.cpp
adaptors/emscripten/wrappers/dali-wrapper.js
adaptors/emscripten/wrappers/shader-effect-wrapper.cpp [deleted file]
adaptors/emscripten/wrappers/shader-effect-wrapper.h [deleted file]
build/emscripten/CMakeLists.txt

index 9df479b..e4cf675 100644 (file)
@@ -43,7 +43,6 @@
 #include "property-buffer-wrapper.h"
 #include "property-value-wrapper.h"
 #include "render-task-wrapper.h"
-#include "shader-effect-wrapper.h"
 #include "signal-holder.h"
 #include "type-info-wrapper.h"
 
@@ -845,16 +844,6 @@ EMSCRIPTEN_BINDINGS(dali_wrapper)
     .value("MAP", Dali::Property::MAP)
 ;
 
-  enum_<Dali::ShaderEffect::GeometryHints>("GeometryHints")
-    .value("HINT_NONE", Dali::ShaderEffect::HINT_NONE)
-    .value("HINT_GRID_X", Dali::ShaderEffect::HINT_GRID_X)
-    .value("HINT_GRID_Y", Dali::ShaderEffect::HINT_GRID_Y)
-    .value("HINT_GRID", Dali::ShaderEffect::HINT_GRID)
-    .value("HINT_DEPTH_BUFFER", Dali::ShaderEffect::HINT_DEPTH_BUFFER)
-    .value("HINT_BLENDING", Dali::ShaderEffect::HINT_BLENDING)
-    .value("HINT_DOESNT_MODIFY_GEOMETRY", Dali::ShaderEffect::HINT_DOESNT_MODIFY_GEOMETRY)
-;
-
   enum_<Dali::Shader::Hint::Value>("ShaderHints")
     .value("NONE",                      Dali::Shader::Hint::NONE)
     .value("OUTPUT_IS_TRANSPARENT",     Dali::Shader::Hint::OUTPUT_IS_TRANSPARENT)
@@ -1125,14 +1114,6 @@ EMSCRIPTEN_BINDINGS(dali_wrapper)
     .function("SetTextures", &Dali::Renderer::SetTextures)
 ;
 
-  class_<Dali::ShaderEffect, base<Dali::Handle>>("ShaderEffect")
-    .constructor<const std::string&, const std::string&,
-                 const std::string&, const std::string&,
-                 int >(&CreateShaderEffect)
-    .function("setEffectImage", &Dali::ShaderEffect::SetEffectImage)
-    .function("__setUniform", &SetUniform)
-;
-
   class_<Dali::Actor, base<Dali::Handle>>("Actor")
     .constructor<>(&Dali::Actor::New)
     .function("add", &Dali::Actor::Add)
index 55cf579..d9179b6 100644 (file)
@@ -1736,19 +1736,6 @@ dali.Actor = function() {
 
 //------------------------------------------------------------------------------
 //
-// ShaderEffect Module
-//
-//------------------------------------------------------------------------------
-dali.__ShaderEffectConstructor = dali.ShaderEffect;
-dali.ShaderEffect = function() {
-  "use strict";
-  var a = new dali.__PathConstructor();
-  dali.internalSetupProperties(a);
-  return a;
-};
-
-//------------------------------------------------------------------------------
-//
 // New Mesh Module
 //
 //------------------------------------------------------------------------------
@@ -3447,7 +3434,6 @@ dali.init = function() {
                       Path: 1, Animation: 1,
                       Handle: 1, Actor: 1,
                       PropertyMap: 1, PropertyBuffer: 1,
-                      ShaderEffect: 1,
                       Image: 1, BufferImage: 1, EncodedBufferImage: 1,
                       Geometry: 1, Material: 1, Shader: 1, Sampler: 1, Renderer: 1
                     };
diff --git a/adaptors/emscripten/wrappers/shader-effect-wrapper.cpp b/adaptors/emscripten/wrappers/shader-effect-wrapper.cpp
deleted file mode 100644 (file)
index bd31159..0000000
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-#include "handle-wrapper.h"
-
-// EXTERNAL INCLUDES
-
-// INTERNAL INCLUDES
-#include "shader-effect-wrapper.h"
-#include "emscripten-utils.h"
-
-namespace Dali
-{
-namespace Internal
-{
-namespace Emscripten
-{
-
-Dali::ShaderEffect CreateShaderEffect( const std::string& vertexPrefix, const std::string& vertex,
-                                       const std::string& fragmentPrefix, const std::string& fragment,
-                                       int geometryHints )
-{
-  Dali::ShaderEffect e = Dali::ShaderEffect::NewWithPrefix(vertexPrefix, vertex,
-                                                           fragmentPrefix, fragment,
-                                                           static_cast<Dali::ShaderEffect::GeometryHints>(geometryHints));
-
-  return e;
-}
-
-
-void SetUniform( Dali::ShaderEffect& self, const std::string& name, Dali::Property::Value& propertyValue )
-{
-  switch(propertyValue.GetType())
-  {
-    case Dali::Property::FLOAT:
-    {
-      self.SetUniform( name, propertyValue.Get<float>() );
-      break;
-    };
-    case Dali::Property::VECTOR2:
-    {
-      self.SetUniform( name, propertyValue.Get<Dali::Vector2>() );
-      break;
-    };
-    case Dali::Property::VECTOR3:
-    {
-      self.SetUniform( name, propertyValue.Get<Dali::Vector3>() );
-      break;
-    };
-    case Dali::Property::VECTOR4:
-    {
-      self.SetUniform( name, propertyValue.Get<Dali::Vector4>() );
-      break;
-    };
-    case Dali::Property::MATRIX:
-    {
-      self.SetUniform( name, propertyValue.Get<Dali::Matrix>() );
-      break;
-    };
-    case Dali::Property::MATRIX3:
-    {
-      self.SetUniform( name, propertyValue.Get<Dali::Matrix3>() );
-      break;
-    };
-    case Dali::Property::NONE:
-    case Dali::Property::BOOLEAN:
-    case Dali::Property::INTEGER:
-    case Dali::Property::ROTATION:
-    case Dali::Property::RECTANGLE:
-    case Dali::Property::STRING:
-    case Dali::Property::ARRAY:
-    case Dali::Property::MAP:
-    {
-      break;
-    }
-  }
-}
-
-
-}; // namespace Emscripten
-}; // namespace Internal
-}; // namespace Dali
diff --git a/adaptors/emscripten/wrappers/shader-effect-wrapper.h b/adaptors/emscripten/wrappers/shader-effect-wrapper.h
deleted file mode 100644 (file)
index 51f7cf8..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-#ifndef __DALI_SHADER_EFFECT_WRAPPER_H__
-#define __DALI_SHADER_EFFECT_WRAPPER_H__
-
-/*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-// EXTERNAL INCLUDES
-#include <dali/public-api/dali-core.h>
-#include <dali/devel-api/shader-effects/shader-effect.h>
-#include "emscripten/emscripten.h"
-#include "emscripten/bind.h"
-
-// INTERNAL INCLUDES
-
-namespace Dali
-{
-namespace Internal
-{
-namespace Emscripten
-{
-
-/**
- * Creates a Dali shder effect
- *
- * @param[in] vertexPrefix The ShaderEffect vertexPrefix
- * @param[in] vertex The ShaderEffect vertex
- * @param[in] fragmentPrefix The ShaderEffect fragmentPrefix
- * @param[in] fragment The ShaderEffect fragment
- * @param[in] geometryHints The Geometry hints; an integer for Emscripten embind (additive enum)
- *
- * @returns The ShaderEffect
- *
- */
-Dali::ShaderEffect CreateShaderEffect( const std::string& vertexPrefix, const std::string& vertex,
-                                       const std::string& fragmentPrefix, const std::string& fragment,
-                                       int geometryHints );
-
-/**
- * Gets a property by name
- *
- * @param[in] self The ShaderEffect
- * @param[in] name The uniform name
- * @param[in] propertyValue The PropertyValue
- *
- */
-void SetUniform( Dali::ShaderEffect& self, const std::string& name, Dali::Property::Value& propertyValue );
-
-}; // namespace Emscripten
-}; // namespace Internal
-}; // namespace Dali
-
-#endif // header
index e163531..91de672 100644 (file)
@@ -26,7 +26,6 @@ set(SRCS
   ${CMAKE_SOURCE_DIR}/../../adaptors/emscripten/wrappers/property-buffer-wrapper.cpp
   ${CMAKE_SOURCE_DIR}/../../adaptors/emscripten/wrappers/property-value-wrapper.cpp
   ${CMAKE_SOURCE_DIR}/../../adaptors/emscripten/wrappers/render-task-wrapper.cpp
-  ${CMAKE_SOURCE_DIR}/../../adaptors/emscripten/wrappers/shader-effect-wrapper.cpp
   ${CMAKE_SOURCE_DIR}/../../adaptors/emscripten/wrappers/type-info-wrapper.cpp
   ${CMAKE_SOURCE_DIR}/../../adaptors/base/separate-update-render/frame-time.cpp
   ${CMAKE_SOURCE_DIR}/../../adaptors/base/time-service.cpp