#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"
.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)
.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)
//------------------------------------------------------------------------------
//
-// ShaderEffect Module
-//
-//------------------------------------------------------------------------------
-dali.__ShaderEffectConstructor = dali.ShaderEffect;
-dali.ShaderEffect = function() {
- "use strict";
- var a = new dali.__PathConstructor();
- dali.internalSetupProperties(a);
- return a;
-};
-
-//------------------------------------------------------------------------------
-//
// New Mesh Module
//
//------------------------------------------------------------------------------
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
};
+++ /dev/null
-/*
- * 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
+++ /dev/null
-#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
${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