Commit 0d64bea31a596e340b188d8b1294dca1c5deb464
Committed by
Gerrit Code Review
Merge "Add render-effects.example" into devel/master
Showing
8 changed files
with
326 additions
and
1 deletions
com.samsung.dali-demo.xml
| ... | ... | @@ -265,6 +265,9 @@ |
| 265 | 265 | <ui-application appid="remote-image-loading.example" exec="/usr/apps/com.samsung.dali-demo/bin/remote-image-loading.example" nodisplay="true" multiple="false" type="c++app" taskmanage="true"> |
| 266 | 266 | <label>Remote Image</label> |
| 267 | 267 | </ui-application> |
| 268 | + <ui-application appid="render-effects.example" exec="/usr/apps/com.samsung.dali-demo/bin/render-effects.example" nodisplay="true" multiple="false" type="c++app" taskmanage="true"> | |
| 269 | + <label>Render Effects</label> | |
| 270 | + </ui-application> | |
| 268 | 271 | <ui-application appid="render-pass-tag.example" exec="/usr/apps/com.samsung.dali-demo/bin/render-pass-tag.example" nodisplay="true" multiple="false" type="c++app" taskmanage="true"> |
| 269 | 272 | <label>Render Pass</label> |
| 270 | 273 | </ui-application> | ... | ... |
demo/dali-demo.cpp
| 1 | 1 | /* |
| 2 | - * Copyright (c) 2023 Samsung Electronics Co., Ltd. | |
| 2 | + * Copyright (c) 2024 Samsung Electronics Co., Ltd. | |
| 3 | 3 | * |
| 4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | 5 | * you may not use this file except in compliance with the License. |
| ... | ... | @@ -59,6 +59,7 @@ int DALI_EXPORT_API main(int argc, char** argv) |
| 59 | 59 | demo.AddExample(Example("renderer-stencil.example", DALI_DEMO_STR_TITLE_RENDERER_STENCIL)); |
| 60 | 60 | demo.AddExample(Example("rendering-skybox.example", DALI_DEMO_STR_TITLE_SKYBOX)); |
| 61 | 61 | demo.AddExample(Example("rendering-basic-pbr.example", DALI_DEMO_STR_TITLE_PBR)); |
| 62 | + demo.AddExample(Example("render-effects.example", DALI_DEMO_STR_TITLE_RENDER_EFFECTS)); | |
| 62 | 63 | #ifdef DALI_SCENE3D_AVAILABLE |
| 63 | 64 | demo.AddExample(Example("scene-view.example", DALI_DEMO_STR_TITLE_SCENE_VIEW)); |
| 64 | 65 | demo.AddExample(Example("scene3d-model.example", DALI_DEMO_STR_TITLE_SCENE3D_MODEL)); | ... | ... |
examples/render-effects/README.md
0 → 100644
examples/render-effects/render-effects-example.cpp
0 → 100644
| 1 | +/* | |
| 2 | + * Copyright (c) 2024 Samsung Electronics Co., Ltd. | |
| 3 | + * | |
| 4 | + * Licensed under the Apache License, Version 2.0 (the "License"); | |
| 5 | + * you may not use this file except in compliance with the License. | |
| 6 | + * You may obtain a copy of the License at | |
| 7 | + * | |
| 8 | + * http://www.apache.org/licenses/LICENSE-2.0 | |
| 9 | + * | |
| 10 | + * Unless required by applicable law or agreed to in writing, software | |
| 11 | + * distributed under the License is distributed on an "AS IS" BASIS, | |
| 12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| 13 | + * See the License for the specific language governing permissions and | |
| 14 | + * limitations under the License. | |
| 15 | + * | |
| 16 | + */ | |
| 17 | + | |
| 18 | +#include <dali-toolkit/dali-toolkit.h> | |
| 19 | + | |
| 20 | +#include <dali/dali.h> | |
| 21 | +#include <devel-api/actors/actor-devel.h> | |
| 22 | +#include <public-api/events/key-event.h> | |
| 23 | + | |
| 24 | +#include <dali-toolkit/devel-api/controls/table-view/table-view.h> | |
| 25 | +#include <dali-toolkit/devel-api/visuals/image-visual-properties-devel.h> | |
| 26 | +#include <dali-toolkit/devel-api/visuals/visual-properties-devel.h> | |
| 27 | + | |
| 28 | +#include <unordered_map> | |
| 29 | + | |
| 30 | +using namespace Dali; | |
| 31 | + | |
| 32 | +namespace | |
| 33 | +{ | |
| 34 | +const char* BACKGROUND_IMAGE(DEMO_IMAGE_DIR "background-3.jpg"); | |
| 35 | +const char* SUN_CLOUD_ICON_IMAGE(DEMO_IMAGE_DIR "light-icon-front.png"); | |
| 36 | +} // namespace | |
| 37 | + | |
| 38 | +class RenderEffectController : public Dali::ConnectionTracker | |
| 39 | +{ | |
| 40 | +public: | |
| 41 | + RenderEffectController(Application& application) | |
| 42 | + : mApplication(application) | |
| 43 | + { | |
| 44 | + mApplication.InitSignal().Connect(this, &RenderEffectController::Create); | |
| 45 | + } | |
| 46 | + | |
| 47 | + ~RenderEffectController() | |
| 48 | + { | |
| 49 | + } | |
| 50 | + | |
| 51 | + void Create(Dali::Application& application) | |
| 52 | + { | |
| 53 | + Window window = application.GetWindow(); | |
| 54 | + Layer backgroundLayer = Layer::New(); | |
| 55 | + | |
| 56 | + Vector2 size = window.GetSize(); | |
| 57 | + | |
| 58 | + // Background image | |
| 59 | + { | |
| 60 | + backgroundLayer.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER); | |
| 61 | + backgroundLayer.SetProperty(Actor::Property::SIZE, size); | |
| 62 | + | |
| 63 | + Toolkit::ImageView backgroundImage = Toolkit::ImageView::New(BACKGROUND_IMAGE); | |
| 64 | + backgroundImage.SetProperty(Actor::Property::SIZE, size); | |
| 65 | + backgroundImage.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER); | |
| 66 | + backgroundLayer.Add(backgroundImage); | |
| 67 | + window.Add(backgroundLayer); | |
| 68 | + } | |
| 69 | + | |
| 70 | + // UI panel | |
| 71 | + float unitSizeWidth = 180.0f; | |
| 72 | + float unitSizeHeight = 180.0f; | |
| 73 | + | |
| 74 | + Toolkit::Control UIPanel = Toolkit::Control::New(); | |
| 75 | + UIPanel.SetProperty(Actor::Property::SIZE, size * 0.8f); | |
| 76 | + UIPanel.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER); | |
| 77 | + window.Add(UIPanel); | |
| 78 | + UIPanel.SetRenderEffect(Toolkit::BackgroundBlurEffect::New(0.4f, 40, 10.0f)); | |
| 79 | + | |
| 80 | + // Welcome message | |
| 81 | + { | |
| 82 | + Toolkit::TextLabel label = SetUpTextLabelProperties("Welcome, You.", Vector4::ONE, "BEGIN", 20.0f); | |
| 83 | + label.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_CENTER); | |
| 84 | + label.SetProperty(Actor::Property::SIZE, Vector2(unitSizeWidth * 2.0f, unitSizeHeight + 20.0f)); | |
| 85 | + label.SetProperty(Actor::Property::POSITION_Y, 50.0f); | |
| 86 | + UIPanel.Add(label); | |
| 87 | + } | |
| 88 | + | |
| 89 | + // Weather panel | |
| 90 | + { | |
| 91 | + Toolkit::Control weatherPanel = Toolkit::Control::New(); | |
| 92 | + weatherPanel.SetProperty(Actor::Property::SIZE, Vector2(unitSizeWidth * 2.0f, unitSizeHeight + 10.0f)); | |
| 93 | + weatherPanel.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_CENTER); | |
| 94 | + weatherPanel.SetProperty(Actor::Property::POSITION, Vector2(0, size.y * 0.15f)); | |
| 95 | + | |
| 96 | + Property::Map colorVisualPropertyMap; | |
| 97 | + colorVisualPropertyMap.Insert(Toolkit::Visual::Property::TYPE, Toolkit::Visual::COLOR); | |
| 98 | + colorVisualPropertyMap.Insert(Toolkit::Visual::Property::MIX_COLOR, Color::BLACK); | |
| 99 | + colorVisualPropertyMap.Insert(Toolkit::Visual::Property::OPACITY, 0.2f); | |
| 100 | + colorVisualPropertyMap.Insert(Toolkit::DevelVisual::Property::CORNER_RADIUS, 30.0f); | |
| 101 | + weatherPanel.SetProperty(Toolkit::Control::Property::BACKGROUND, colorVisualPropertyMap); | |
| 102 | + | |
| 103 | + Toolkit::TextLabel label = SetUpTextLabelProperties("10:21", Color::WHITE, "BEGIN", 36.0f); | |
| 104 | + label.SetProperty(Actor::Property::SIZE_WIDTH, 250.0f); | |
| 105 | + label.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER); | |
| 106 | + label.SetProperty(Actor::Property::POSITION_Y, -10.0f); | |
| 107 | + weatherPanel.Add(label); | |
| 108 | + | |
| 109 | + label = SetUpTextLabelProperties("June 4th, 2024", Color::WHITE, "BEGIN", 13.0f); | |
| 110 | + label.SetProperty(Actor::Property::SIZE_WIDTH, 250.0f); | |
| 111 | + label.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER); | |
| 112 | + label.SetProperty(Actor::Property::POSITION_Y, 30.0f); | |
| 113 | + weatherPanel.Add(label); | |
| 114 | + | |
| 115 | + Toolkit::ImageView weatherIcon = Toolkit::ImageView::New(SUN_CLOUD_ICON_IMAGE); | |
| 116 | + weatherIcon.SetProperty(Actor::Property::SIZE, Vector2(120.0f, 100.0f)); | |
| 117 | + weatherIcon.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER); | |
| 118 | + weatherIcon.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_LEFT); | |
| 119 | + weatherIcon.SetProperty(Actor::Property::POSITION, Vector2(30.0f, 30.0f)); | |
| 120 | + weatherPanel.Add(weatherIcon); | |
| 121 | + | |
| 122 | + label = SetUpTextLabelProperties("18", Color::WHITE, "END", 25.0f); | |
| 123 | + label.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::BOTTOM_LEFT); | |
| 124 | + label.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER); | |
| 125 | + label.SetProperty(Actor::Property::POSITION_X, 100.0f); | |
| 126 | + label.SetProperty(Actor::Property::POSITION_Y, -50.0f); | |
| 127 | + weatherPanel.Add(label); | |
| 128 | + | |
| 129 | + Toolkit::TextLabel unitLabel = SetUpTextLabelProperties("°C", Color::WHITE, "BEGIN"); | |
| 130 | + unitLabel.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_RIGHT); | |
| 131 | + unitLabel.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT); | |
| 132 | + label.Add(unitLabel); | |
| 133 | + | |
| 134 | + UIPanel.Add(weatherPanel); | |
| 135 | + weatherPanel.SetRenderEffect(Toolkit::BackgroundBlurEffect::New(0.4f, 40, 10.0f)); | |
| 136 | + } | |
| 137 | + | |
| 138 | + // Icon mini panels | |
| 139 | + { | |
| 140 | + Vector2 iconPanelSize = Vector2(unitSizeWidth, unitSizeHeight); | |
| 141 | + float x_incrementer = iconPanelSize.x / 2.0f + 10.0f; | |
| 142 | + float y_incrementer = iconPanelSize.y + 20.f; | |
| 143 | + float y_starter = size.y * .33f; | |
| 144 | + | |
| 145 | + Toolkit::Control control = CreateIconPanel("Security", "4 rooms", false, DEMO_IMAGE_DIR "application-icon-7.png", iconPanelSize); | |
| 146 | + control.SetProperty(Actor::Property::POSITION, Vector2(-x_incrementer, y_starter)); | |
| 147 | + control.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_CENTER); | |
| 148 | + UIPanel.Add(control); | |
| 149 | + control.SetRenderEffect(Toolkit::BackgroundBlurEffect::New(0.4f, 40, 10.0f)); | |
| 150 | + | |
| 151 | + control = CreateIconPanel("BlueTooth", "2 devices", true, DEMO_IMAGE_DIR "application-icon-14.png", iconPanelSize); | |
| 152 | + control.SetProperty(Actor::Property::POSITION, Vector2(x_incrementer, y_starter)); | |
| 153 | + control.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_CENTER); | |
| 154 | + UIPanel.Add(control); | |
| 155 | + control.SetRenderEffect(Toolkit::BackgroundBlurEffect::New(0.4f, 40, 10.0f)); | |
| 156 | + | |
| 157 | + control = CreateIconPanel("Wi-Fi", "TizenUIFW", true, DEMO_IMAGE_DIR "application-icon-55.png", iconPanelSize); | |
| 158 | + control.SetProperty(Actor::Property::POSITION, Vector2(-x_incrementer, y_starter + y_incrementer)); | |
| 159 | + control.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_CENTER); | |
| 160 | + UIPanel.Add(control); | |
| 161 | + control.SetRenderEffect(Toolkit::BackgroundBlurEffect::New(0.4f, 40, 10.0f)); | |
| 162 | + | |
| 163 | + control = CreateIconPanel("Lighting", "5 devices", true, DEMO_IMAGE_DIR "application-icon-21.png", iconPanelSize); | |
| 164 | + control.SetProperty(Actor::Property::POSITION, Vector2(x_incrementer, y_starter + y_incrementer)); | |
| 165 | + control.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_CENTER); | |
| 166 | + UIPanel.Add(control); | |
| 167 | + control.SetRenderEffect(Toolkit::BackgroundBlurEffect::New(0.4f, 40, 10.0f)); | |
| 168 | + } | |
| 169 | + | |
| 170 | + // Air conditioner | |
| 171 | + { | |
| 172 | + Toolkit::Control airConPanel = Toolkit::Control::New(); | |
| 173 | + airConPanel.SetProperty(Actor::Property::SIZE, Vector2(unitSizeWidth * 2.0f, unitSizeHeight + 10.0f)); | |
| 174 | + airConPanel.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::BOTTOM_CENTER); | |
| 175 | + airConPanel.SetProperty(Actor::Property::POSITION_Y, -unitSizeHeight + 20.0f); | |
| 176 | + airConPanel.SetProperty(DevelActor::Property::CLIPPING_MODE, ClippingMode::CLIP_CHILDREN); | |
| 177 | + | |
| 178 | + Toolkit::TextLabel label = SetUpTextLabelProperties("Air Conditioner", Color::WHITE, "BEGIN", 15.0f); | |
| 179 | + label.SetProperty(Actor::Property::SIZE_WIDTH, unitSizeWidth * 2.0f - 50.0f); | |
| 180 | + label.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER); | |
| 181 | + label.SetProperty(Actor::Property::POSITION_Y, -unitSizeHeight * 0.3f); | |
| 182 | + airConPanel.Add(label); | |
| 183 | + | |
| 184 | + label = SetUpTextLabelProperties("24", Color::WHITE, "END", 36.0f); | |
| 185 | + label.SetProperty(Actor::Property::SIZE_WIDTH, 36.0f * 2.0f); // maximum two characters | |
| 186 | + label.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER); | |
| 187 | + label.SetProperty(Actor::Property::POSITION_Y, unitSizeHeight * 0.05f); | |
| 188 | + label.SetProperty(Actor::Property::POSITION_X, -unitSizeWidth * 0.75f); | |
| 189 | + airConPanel.Add(label); | |
| 190 | + | |
| 191 | + Toolkit::TextLabel unitLabel = SetUpTextLabelProperties("°C", Color::WHITE, "BEGIN"); | |
| 192 | + unitLabel.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_RIGHT); | |
| 193 | + unitLabel.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT); | |
| 194 | + label.Add(unitLabel); | |
| 195 | + | |
| 196 | + label = SetUpTextLabelProperties("Living room", Color::WHITE, "BEGIN", 13.0f); | |
| 197 | + label.SetProperty(Actor::Property::SIZE_WIDTH, unitSizeWidth * 2.0f - 50.0f); | |
| 198 | + label.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER); | |
| 199 | + label.SetProperty(Actor::Property::POSITION_Y, unitSizeHeight * 0.3f); | |
| 200 | + airConPanel.Add(label); | |
| 201 | + | |
| 202 | + Toolkit::ImageView airConImage = Toolkit::ImageView::New(DEMO_IMAGE_DIR "application-icon-24.png"); | |
| 203 | + airConImage.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER); | |
| 204 | + airConImage.SetProperty(Actor::Property::SIZE, Vector2(unitSizeWidth, unitSizeHeight) * 0.5f); | |
| 205 | + airConImage.SetProperty(Actor::Property::POSITION_X, unitSizeWidth * .5f); | |
| 206 | + airConPanel.Add(airConImage); | |
| 207 | + | |
| 208 | + Property::Map airConPanelDimmer; | |
| 209 | + airConPanelDimmer.Insert(Toolkit::Visual::Property::TYPE, Toolkit::Visual::COLOR); | |
| 210 | + airConPanelDimmer.Insert(Toolkit::Visual::Property::MIX_COLOR, Color::BLACK); | |
| 211 | + airConPanelDimmer.Insert(Toolkit::Visual::Property::OPACITY, 0.2f); | |
| 212 | + airConPanelDimmer.Insert(Toolkit::DevelVisual::Property::CORNER_RADIUS, 30.0f); | |
| 213 | + airConPanel.SetProperty(Toolkit::Control::Property::BACKGROUND, airConPanelDimmer); | |
| 214 | + | |
| 215 | + UIPanel.Add(airConPanel); | |
| 216 | + airConPanel.SetRenderEffect(Toolkit::BackgroundBlurEffect::New(0.4f, 40, 10.0f)); | |
| 217 | + } | |
| 218 | + | |
| 219 | + // lower background layer | |
| 220 | + backgroundLayer.LowerBelow(window.GetRootLayer()); | |
| 221 | + | |
| 222 | + // Connect signals | |
| 223 | + application.GetWindow().KeyEventSignal().Connect(this, &RenderEffectController::OnKeyEvent); | |
| 224 | + } | |
| 225 | + | |
| 226 | + Toolkit::Control CreateIconPanel(std::string title, std::string detail, bool isOn, std::string iconURL, Vector2 size) | |
| 227 | + { | |
| 228 | + Toolkit::Control panel = Toolkit::Control::New(); | |
| 229 | + panel.SetProperty(Actor::Property::SIZE, size); | |
| 230 | + | |
| 231 | + Property::Map colorVisualPropertyMap; | |
| 232 | + colorVisualPropertyMap.Insert(Toolkit::Visual::Property::TYPE, Toolkit::Visual::COLOR); | |
| 233 | + colorVisualPropertyMap.Insert(Toolkit::Visual::Property::OPACITY, 0.3f); | |
| 234 | + colorVisualPropertyMap.Insert(Toolkit::DevelVisual::Property::CORNER_RADIUS, 30.0f); | |
| 235 | + panel.SetProperty(Toolkit::Control::Property::BACKGROUND, colorVisualPropertyMap); | |
| 236 | + | |
| 237 | + // TOP | |
| 238 | + Toolkit::ImageView icon = Toolkit::ImageView::New(iconURL); | |
| 239 | + icon.SetProperty(Actor::Property::SIZE, Vector2(50.0f, 50.0f)); | |
| 240 | + icon.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT); | |
| 241 | + icon.SetProperty(Actor::Property::POSITION, size * 0.05f); | |
| 242 | + panel.Add(icon); | |
| 243 | + | |
| 244 | + Toolkit::TextLabel isOnLabel; | |
| 245 | + if(isOn) | |
| 246 | + { | |
| 247 | + isOnLabel = SetUpTextLabelProperties("On", Vector4::ONE, "END", 13.0f); | |
| 248 | + } | |
| 249 | + else | |
| 250 | + { | |
| 251 | + isOnLabel = SetUpTextLabelProperties("Off", Vector4::ONE, "END", 13.0f); | |
| 252 | + } | |
| 253 | + isOnLabel.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_CENTER); | |
| 254 | + isOnLabel.SetProperty(Actor::Property::POSITION_Y, size.y * 0.15f); | |
| 255 | + isOnLabel.SetProperty(Actor::Property::SIZE_WIDTH, size.x * 0.7f); | |
| 256 | + panel.Add(isOnLabel); | |
| 257 | + | |
| 258 | + // MIDDLE | |
| 259 | + Toolkit::TextLabel textLabel = SetUpTextLabelProperties(title, Vector4::ONE, "BEGIN"); | |
| 260 | + textLabel.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER); | |
| 261 | + textLabel.SetProperty(Actor::Property::PADDING, Vector4(20.0f, 20.0f, 20.0f, 20.0f)); | |
| 262 | + panel.Add(textLabel); | |
| 263 | + | |
| 264 | + Toolkit::TextLabel detailLabel = SetUpTextLabelProperties(detail, Vector4::ONE, "BEGIN", 13.0f); | |
| 265 | + detailLabel.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER); | |
| 266 | + detailLabel.SetProperty(Actor::Property::PADDING, Vector4(20.0f, 20.0f, 20.0f, 20.0f)); | |
| 267 | + detailLabel.SetProperty(Actor::Property::POSITION_Y, 30.0f); | |
| 268 | + panel.Add(detailLabel); | |
| 269 | + | |
| 270 | + return panel; | |
| 271 | + } | |
| 272 | + | |
| 273 | + Toolkit::TextLabel SetUpTextLabelProperties(std::string text, Vector4 color, std::string alignment, float fontSize = 15.0f) | |
| 274 | + { | |
| 275 | + Toolkit::TextLabel label = Toolkit::TextLabel::New(text); | |
| 276 | + label.SetProperty(Toolkit::TextLabel::Property::TEXT_COLOR, color); | |
| 277 | + label.SetProperty(Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, alignment); | |
| 278 | + label.SetProperty(Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER"); | |
| 279 | + label.SetProperty(Toolkit::TextLabel::Property::POINT_SIZE, fontSize); | |
| 280 | + return label; | |
| 281 | + } | |
| 282 | + | |
| 283 | + void OnKeyEvent(const KeyEvent& event) | |
| 284 | + { | |
| 285 | + if(event.GetState() == KeyEvent::DOWN) | |
| 286 | + { | |
| 287 | + if(IsKey(event, DALI_KEY_ESCAPE) || IsKey(event, DALI_KEY_BACK)) | |
| 288 | + { | |
| 289 | + mApplication.Quit(); | |
| 290 | + } | |
| 291 | + } | |
| 292 | + } | |
| 293 | + | |
| 294 | +private: | |
| 295 | + Application& mApplication; | |
| 296 | +}; | |
| 297 | + | |
| 298 | +int DALI_EXPORT_API main(int argc, char** argv) | |
| 299 | +{ | |
| 300 | + Application application = Application::New(&argc, &argv, DEMO_THEME_PATH); | |
| 301 | + RenderEffectController test(application); | |
| 302 | + application.MainLoop(); | |
| 303 | + return 0; | |
| 304 | +} | ... | ... |
examples/render-effects/render-effects.png
0 → 100644
681 KB
resources/po/en_GB.po
| ... | ... | @@ -301,6 +301,9 @@ msgstr "Visual Transitions" |
| 301 | 301 | msgid "DALI_DEMO_STR_TITLE_REMOTE_IMAGE" |
| 302 | 302 | msgstr "Remote Image" |
| 303 | 303 | |
| 304 | +msgid "DALI_DEMO_STR_TITLE_RENDER_EFFECTS" | |
| 305 | +msgstr "Render Effects" | |
| 306 | + | |
| 304 | 307 | msgid "DALI_DEMO_STR_TITLE_RENDER_PASS_TAG" |
| 305 | 308 | msgstr "Render Pass Tag" |
| 306 | 309 | ... | ... |
resources/po/en_US.po
| ... | ... | @@ -310,6 +310,9 @@ msgstr "Visual Transitions" |
| 310 | 310 | msgid "DALI_DEMO_STR_TITLE_REMOTE_IMAGE" |
| 311 | 311 | msgstr "Remote Image" |
| 312 | 312 | |
| 313 | +msgid "DALI_DEMO_STR_TITLE_RENDER_EFFECTS" | |
| 314 | +msgstr "Render Effects" | |
| 315 | + | |
| 313 | 316 | msgid "DALI_DEMO_STR_TITLE_RENDER_PASS_TAG" |
| 314 | 317 | msgstr "Render Pass Tag" |
| 315 | 318 | ... | ... |
shared/dali-demo-strings.h
| ... | ... | @@ -114,6 +114,7 @@ extern "C" |
| 114 | 114 | #define DALI_DEMO_STR_TITLE_REFLECTION dgettext(DALI_DEMO_DOMAIN_LOCAL, "DALI_DEMO_STR_TITLE_REFLECTION") |
| 115 | 115 | #define DALI_DEMO_STR_TITLE_REFRACTION dgettext(DALI_DEMO_DOMAIN_LOCAL, "DALI_DEMO_STR_TITLE_REFRACTION") |
| 116 | 116 | #define DALI_DEMO_STR_TITLE_REMOTE_IMAGE dgettext(DALI_DEMO_DOMAIN_LOCAL, "DALI_DEMO_STR_TITLE_REMOTE_IMAGE") |
| 117 | +#define DALI_DEMO_STR_TITLE_RENDER_EFFECTS dgettext(DALI_DEMO_DOMAIN_LOCAL, "DALI_DEMO_STR_TITLE_RENDER_EFFECTS") | |
| 117 | 118 | #define DALI_DEMO_STR_TITLE_RENDER_PASS_TAG dgettext(DALI_DEMO_DOMAIN_LOCAL, "DALI_DEMO_STR_TITLE_RENDER_PASS_TAG") |
| 118 | 119 | #define DALI_DEMO_STR_TITLE_RENDERING_DRAW_LINE dgettext(DALI_DEMO_DOMAIN_LOCAL, "DALI_DEMO_STR_TITLE_RENDERING_DRAW_LINE") |
| 119 | 120 | #define DALI_DEMO_STR_TITLE_RENDERING_DRAW_TRIANGLE dgettext(DALI_DEMO_DOMAIN_LOCAL, "DALI_DEMO_STR_TITLE_RENDERING_DRAW_TRIANGLE") |
| ... | ... | @@ -237,6 +238,7 @@ extern "C" |
| 237 | 238 | #define DALI_DEMO_STR_TITLE_REFLECTION "Reflection" |
| 238 | 239 | #define DALI_DEMO_STR_TITLE_REFRACTION "Refract Effect" |
| 239 | 240 | #define DALI_DEMO_STR_TITLE_REMOTE_IMAGE "Remote Image" |
| 241 | +#define DALI_DEMO_STR_TITLE_RENDER_EFFECTS "Render Effects" | |
| 240 | 242 | #define DALI_DEMO_STR_TITLE_RENDER_PASS_TAG "Render Pass" |
| 241 | 243 | #define DALI_DEMO_STR_TITLE_RENDERING_DRAW_LINE "Draw Line" |
| 242 | 244 | #define DALI_DEMO_STR_TITLE_RENDERING_DRAW_TRIANGLE "Draw Triangle" | ... | ... |