From: Adeel Kazmi Date: Thu, 1 Dec 2016 14:19:33 +0000 (+0000) Subject: Changes after ShaderEffect removal X-Git-Tag: dali_1.2.17~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F10%2F101610%2F1;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git Changes after ShaderEffect removal Change-Id: Id46be222b1866f814056058c0f66e1e155c9882f --- diff --git a/adaptors/emscripten/wrappers/dali-wrapper.cpp b/adaptors/emscripten/wrappers/dali-wrapper.cpp index 9df479b..e4cf675 100644 --- a/adaptors/emscripten/wrappers/dali-wrapper.cpp +++ b/adaptors/emscripten/wrappers/dali-wrapper.cpp @@ -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_("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_("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_>("ShaderEffect") - .constructor(&CreateShaderEffect) - .function("setEffectImage", &Dali::ShaderEffect::SetEffectImage) - .function("__setUniform", &SetUniform) -; - class_>("Actor") .constructor<>(&Dali::Actor::New) .function("add", &Dali::Actor::Add) diff --git a/adaptors/emscripten/wrappers/dali-wrapper.js b/adaptors/emscripten/wrappers/dali-wrapper.js index 55cf579..d9179b6 100644 --- a/adaptors/emscripten/wrappers/dali-wrapper.js +++ b/adaptors/emscripten/wrappers/dali-wrapper.js @@ -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 index bd31159..0000000 --- a/adaptors/emscripten/wrappers/shader-effect-wrapper.cpp +++ /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(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() ); - break; - }; - case Dali::Property::VECTOR2: - { - self.SetUniform( name, propertyValue.Get() ); - break; - }; - case Dali::Property::VECTOR3: - { - self.SetUniform( name, propertyValue.Get() ); - break; - }; - case Dali::Property::VECTOR4: - { - self.SetUniform( name, propertyValue.Get() ); - break; - }; - case Dali::Property::MATRIX: - { - self.SetUniform( name, propertyValue.Get() ); - break; - }; - case Dali::Property::MATRIX3: - { - self.SetUniform( name, propertyValue.Get() ); - 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 index 51f7cf8..0000000 --- a/adaptors/emscripten/wrappers/shader-effect-wrapper.h +++ /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 -#include -#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 diff --git a/build/emscripten/CMakeLists.txt b/build/emscripten/CMakeLists.txt index e163531..91de672 100644 --- a/build/emscripten/CMakeLists.txt +++ b/build/emscripten/CMakeLists.txt @@ -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