summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBil Bas (Spooner) <bil.bagpuss@gmail.com>2015-02-01 20:29:11 +0000
committerBil Bas (Spooner) <bil.bagpuss@gmail.com>2015-02-01 20:29:11 +0000
commit2c1a3dfed6f9a474ace9123b46edca77be548d3e (patch)
treee1cd0db9257a5a241a1db3906041dbb9c1295c74
parentaf7c8bdf236b7c572bc33a44e3bb64fecdaa99d9 (diff)
parent67d357191ff74b2cfc80015941363a97e7ee19fd (diff)
Merge branch 'master' of https://github.com/okamstudio/godot into add_sprintf
-rw-r--r--.gitignore1
-rw-r--r--SConstruct4
-rw-r--r--core/bind/core_bind.cpp2
-rw-r--r--core/color.cpp2
-rw-r--r--core/int_types.h2
-rw-r--r--core/object_type_db.cpp11
-rw-r--r--core/os/input.cpp2
-rw-r--r--core/variant_op.cpp24
-rw-r--r--demos/2d/kinematic_char/colworld.scnbin5090 -> 6367 bytes
-rw-r--r--demos/2d/kinematic_char/player.gd5
-rw-r--r--demos/2d/kinematic_char/player.scnbin1511 -> 1728 bytes
-rw-r--r--demos/2d/platformer/stage.xml681
-rw-r--r--demos/2d/polygon_path_finder_demo/.fscache4
-rw-r--r--demos/2d/polygon_path_finder_demo/engine.cfg5
-rw-r--r--demos/2d/polygon_path_finder_demo/icon.pngbin0 -> 3639 bytes
-rw-r--r--demos/2d/polygon_path_finder_demo/icon.png.flags1
-rw-r--r--demos/2d/polygon_path_finder_demo/new_scene_poly_with_holes.scnbin0 -> 2609 bytes
-rw-r--r--demos/2d/polygon_path_finder_demo/polygonpathfinder.gd80
-rw-r--r--drivers/gl_context/context_gl.cpp2
-rw-r--r--drivers/gl_context/context_gl.h2
-rw-r--r--drivers/gles1/SCsub5
-rw-r--r--drivers/gles1/rasterizer_gles1.cpp5986
-rw-r--r--drivers/gles1/rasterizer_gles1.h1256
-rw-r--r--drivers/gles2/rasterizer_gles2.cpp508
-rw-r--r--drivers/gles2/rasterizer_gles2.h19
-rw-r--r--drivers/gles2/shader_compiler_gles2.cpp109
-rw-r--r--drivers/gles2/shader_compiler_gles2.h11
-rw-r--r--drivers/gles2/shaders/canvas.glsl145
-rw-r--r--drivers/gles2/shaders/material.glsl1
-rw-r--r--drivers/png/resource_saver_png.cpp4
-rw-r--r--drivers/theoraplayer/SCsub2
-rwxr-xr-xmethods.py36
-rw-r--r--modules/gdscript/gd_compiler.h122
-rw-r--r--modules/gdscript/gd_editor.cpp2
-rw-r--r--platform/android/detect.py6
-rw-r--r--platform/android/globals/global_defaults.cpp2
-rw-r--r--platform/android/java_glue.cpp6
-rw-r--r--platform/android/os_android.cpp10
-rw-r--r--platform/iphone/SCsub2
-rw-r--r--platform/iphone/detect.py3
-rwxr-xr-xplatform/iphone/gl_view.mm4
-rw-r--r--platform/iphone/os_iphone.cpp8
-rw-r--r--platform/iphone/platform_config.h2
-rw-r--r--platform/isim/SCsub2
-rw-r--r--platform/nacl/os_nacl.cpp2
-rw-r--r--platform/osx/detect.py5
-rw-r--r--platform/osx/os_osx.h2
-rw-r--r--platform/osx/os_osx.mm94
-rw-r--r--platform/server/detect.py3
-rw-r--r--platform/windows/detect.py4
-rw-r--r--platform/windows/os_windows.cpp13
-rw-r--r--platform/windows/platform_config.h2
-rw-r--r--platform/x11/detect.py19
-rw-r--r--platform/x11/export/export.cpp2
-rw-r--r--platform/x11/os_x11.cpp9
-rw-r--r--platform/x11/platform_config.h2
-rw-r--r--scene/2d/canvas_item.cpp103
-rw-r--r--scene/2d/canvas_item.h19
-rw-r--r--scene/2d/node_2d.cpp42
-rw-r--r--scene/2d/node_2d.h7
-rw-r--r--scene/2d/physics_body_2d.cpp37
-rw-r--r--scene/2d/physics_body_2d.h8
-rw-r--r--scene/3d/physics_body.cpp1
-rw-r--r--scene/3d/physics_body.h2
-rw-r--r--scene/animation/tween.cpp111
-rw-r--r--scene/animation/tween.h14
-rw-r--r--scene/gui/file_dialog.cpp11
-rw-r--r--scene/gui/graph_edit.cpp77
-rw-r--r--scene/gui/graph_edit.h9
-rw-r--r--scene/gui/graph_node.cpp31
-rw-r--r--scene/gui/grid_container.cpp1
-rw-r--r--scene/gui/text_edit.cpp2
-rw-r--r--scene/gui/tree.cpp4
-rw-r--r--scene/register_scene_types.cpp11
-rw-r--r--scene/resources/curve.cpp18
-rw-r--r--scene/resources/default_theme/arrow_down.pngbin260 -> 239 bytes
-rw-r--r--scene/resources/default_theme/arrow_right.pngbin275 -> 238 bytes
-rw-r--r--scene/resources/default_theme/button_disabled.pngbin388 -> 333 bytes
-rw-r--r--scene/resources/default_theme/button_hover.pngbin531 -> 338 bytes
-rw-r--r--scene/resources/default_theme/button_normal.pngbin527 -> 333 bytes
-rw-r--r--scene/resources/default_theme/button_pressed.pngbin491 -> 351 bytes
-rw-r--r--scene/resources/default_theme/checked.pngbin616 -> 597 bytes
-rw-r--r--scene/resources/default_theme/close_hl.pngbin562 -> 412 bytes
-rw-r--r--scene/resources/default_theme/default_theme.cpp534
-rw-r--r--scene/resources/default_theme/dropdown.pngbin257 -> 254 bytes
-rw-r--r--scene/resources/default_theme/focus.pngbin473 -> 459 bytes
-rw-r--r--scene/resources/default_theme/full_panel_bg.pngbin1240 -> 366 bytes
-rw-r--r--scene/resources/default_theme/hscroll_bg.pngbin235 -> 0 bytes
-rw-r--r--scene/resources/default_theme/hscroll_bg_focus.pngbin235 -> 0 bytes
-rw-r--r--scene/resources/default_theme/hscroll_grabber.pngbin299 -> 0 bytes
-rw-r--r--scene/resources/default_theme/hscroll_grabber_hl.pngbin301 -> 0 bytes
-rw-r--r--scene/resources/default_theme/hslider_bg.pngbin361 -> 229 bytes
-rw-r--r--scene/resources/default_theme/hslider_grabber.pngbin624 -> 483 bytes
-rw-r--r--scene/resources/default_theme/hslider_grabber_hl.pngbin625 -> 456 bytes
-rw-r--r--scene/resources/default_theme/hslider_tick.pngbin227 -> 216 bytes
-rw-r--r--scene/resources/default_theme/hsplit_bg.pngbin290 -> 173 bytes
-rw-r--r--scene/resources/default_theme/hsplitter.pngbin225 -> 212 bytes
-rw-r--r--scene/resources/default_theme/icon_folder.pngbin471 -> 462 bytes
-rw-r--r--scene/resources/default_theme/icon_play.pngbin294 -> 295 bytes
-rw-r--r--scene/resources/default_theme/icon_stop.pngbin167 -> 172 bytes
-rw-r--r--scene/resources/default_theme/line_edit.pngbin344 -> 338 bytes
-rw-r--r--scene/resources/default_theme/line_edit_disabled.pngbin344 -> 336 bytes
-rw-r--r--scene/resources/default_theme/option_arrow.pngbin351 -> 249 bytes
-rw-r--r--scene/resources/default_theme/option_button_disabled.pngbin673 -> 353 bytes
-rw-r--r--scene/resources/default_theme/option_button_hover.pngbin667 -> 368 bytes
-rw-r--r--scene/resources/default_theme/option_button_normal.pngbin659 -> 365 bytes
-rw-r--r--scene/resources/default_theme/option_button_pressed.pngbin672 -> 362 bytes
-rw-r--r--scene/resources/default_theme/panel_bg.pngbin174 -> 173 bytes
-rw-r--r--scene/resources/default_theme/popup_bg.pngbin642 -> 308 bytes
-rw-r--r--scene/resources/default_theme/popup_checked.pngbin184 -> 182 bytes
-rw-r--r--scene/resources/default_theme/popup_window.pngbin820 -> 508 bytes
-rw-r--r--scene/resources/default_theme/progress_bar.pngbin586 -> 338 bytes
-rw-r--r--scene/resources/default_theme/progress_fill.pngbin818 -> 282 bytes
-rw-r--r--scene/resources/default_theme/scroll_bg.pngbin0 -> 215 bytes
-rw-r--r--scene/resources/default_theme/scroll_button_down.pngbin562 -> 315 bytes
-rw-r--r--scene/resources/default_theme/scroll_button_down_hl.pngbin553 -> 308 bytes
-rw-r--r--scene/resources/default_theme/scroll_button_left.pngbin735 -> 339 bytes
-rw-r--r--scene/resources/default_theme/scroll_button_left_hl.pngbin754 -> 347 bytes
-rw-r--r--scene/resources/default_theme/scroll_button_right.pngbin731 -> 339 bytes
-rw-r--r--scene/resources/default_theme/scroll_button_right_hl.pngbin752 -> 338 bytes
-rw-r--r--scene/resources/default_theme/scroll_button_up.pngbin555 -> 306 bytes
-rw-r--r--scene/resources/default_theme/scroll_button_up_hl.pngbin555 -> 306 bytes
-rw-r--r--scene/resources/default_theme/scroll_grabber.pngbin0 -> 266 bytes
-rw-r--r--scene/resources/default_theme/scroll_grabber_hl.pngbin0 -> 286 bytes
-rw-r--r--scene/resources/default_theme/selection.pngbin526 -> 338 bytes
-rw-r--r--scene/resources/default_theme/selection_oof.pngbin514 -> 338 bytes
-rw-r--r--scene/resources/default_theme/submenu.pngbin186 -> 173 bytes
-rw-r--r--scene/resources/default_theme/tab_behind.pngbin456 -> 298 bytes
-rw-r--r--scene/resources/default_theme/tab_container_bg.pngbin651 -> 301 bytes
-rw-r--r--scene/resources/default_theme/tab_current.pngbin482 -> 294 bytes
-rw-r--r--scene/resources/default_theme/theme_data.h177
-rw-r--r--scene/resources/default_theme/toggle_off.pngbin1900 -> 733 bytes
-rw-r--r--scene/resources/default_theme/toggle_on.pngbin1902 -> 831 bytes
-rw-r--r--scene/resources/default_theme/tooltip_bg.pngbin1114 -> 325 bytes
-rw-r--r--scene/resources/default_theme/tree_bg.pngbin344 -> 341 bytes
-rw-r--r--scene/resources/default_theme/tree_title.pngbin527 -> 181 bytes
-rw-r--r--scene/resources/default_theme/tree_title_pressed.pngbin513 -> 181 bytes
-rw-r--r--scene/resources/default_theme/unchecked.pngbin444 -> 394 bytes
-rw-r--r--scene/resources/default_theme/updown.pngbin372 -> 366 bytes
-rw-r--r--scene/resources/default_theme/vscroll_bg.pngbin233 -> 0 bytes
-rw-r--r--scene/resources/default_theme/vscroll_bg_focus.pngbin233 -> 0 bytes
-rw-r--r--scene/resources/default_theme/vscroll_grabber.pngbin308 -> 0 bytes
-rw-r--r--scene/resources/default_theme/vscroll_grabber_hl.pngbin314 -> 0 bytes
-rw-r--r--scene/resources/default_theme/vslider_bg.pngbin338 -> 229 bytes
-rw-r--r--scene/resources/default_theme/vslider_grabber.pngbin575 -> 572 bytes
-rw-r--r--scene/resources/default_theme/vslider_grabber_hl.pngbin580 -> 456 bytes
-rw-r--r--scene/resources/default_theme/vslider_tick.pngbin198 -> 185 bytes
-rw-r--r--scene/resources/default_theme/vsplit_bg.pngbin288 -> 173 bytes
-rw-r--r--scene/resources/default_theme/vsplitter.pngbin219 -> 208 bytes
-rw-r--r--scene/resources/environment.cpp2
-rw-r--r--scene/resources/material.cpp143
-rw-r--r--scene/resources/material.h62
-rw-r--r--scene/resources/shader.cpp9
-rw-r--r--scene/resources/shader.h19
-rw-r--r--scene/resources/shader_graph.cpp877
-rw-r--r--scene/resources/shader_graph.h39
-rw-r--r--scene/scene_string_names.cpp1
-rw-r--r--scene/scene_string_names.h1
-rw-r--r--servers/physics_2d/body_2d_sw.cpp1
-rw-r--r--servers/physics_2d/body_2d_sw.h9
-rw-r--r--servers/physics_2d/physics_2d_server_sw.cpp46
-rw-r--r--servers/physics_2d/physics_2d_server_sw.h9
-rw-r--r--servers/physics_2d/shape_2d_sw.cpp1
-rw-r--r--servers/physics_2d/shape_2d_sw.h1
-rw-r--r--servers/physics_2d/space_2d_sw.cpp81
-rw-r--r--servers/physics_2d_server.cpp7
-rw-r--r--servers/physics_2d_server.h6
-rw-r--r--servers/visual/rasterizer.cpp5
-rw-r--r--servers/visual/rasterizer.h284
-rw-r--r--servers/visual/rasterizer_dummy.cpp10
-rw-r--r--servers/visual/rasterizer_dummy.h4
-rw-r--r--servers/visual/shader_language.cpp131
-rw-r--r--servers/visual/shader_language.h9
-rw-r--r--servers/visual/visual_server_raster.cpp554
-rw-r--r--servers/visual/visual_server_raster.h189
-rw-r--r--servers/visual/visual_server_wrap_mt.h34
-rw-r--r--servers/visual_server.h46
-rw-r--r--tools/SCsub6
-rw-r--r--tools/editor/editor_node.cpp40
-rw-r--r--tools/editor/editor_node.h2
-rw-r--r--tools/editor/editor_plugin.cpp6
-rw-r--r--tools/editor/editor_plugin.h3
-rw-r--r--tools/editor/editor_settings.cpp5
-rw-r--r--tools/editor/icons/icon_add.pngbin393 -> 351 bytes
-rw-r--r--tools/editor/icons/icon_animation.pngbin651 -> 595 bytes
-rw-r--r--tools/editor/icons/icon_atlas_texture.pngbin458 -> 402 bytes
-rw-r--r--tools/editor/icons/icon_audio_stream_gibberish.pngbin456 -> 406 bytes
-rw-r--r--tools/editor/icons/icon_auto_play.pngbin217 -> 181 bytes
-rw-r--r--tools/editor/icons/icon_bake.pngbin419 -> 374 bytes
-rw-r--r--tools/editor/icons/icon_blend.pngbin488 -> 443 bytes
-rw-r--r--tools/editor/icons/icon_bone.pngbin2992 -> 297 bytes
-rw-r--r--tools/editor/icons/icon_bool.pngbin184 -> 147 bytes
-rw-r--r--tools/editor/icons/icon_canvas_item.pngbin481 -> 434 bytes
-rw-r--r--tools/editor/icons/icon_close.pngbin456 -> 398 bytes
-rw-r--r--tools/editor/icons/icon_close_hover.pngbin444 -> 391 bytes
-rw-r--r--tools/editor/icons/icon_collapse.pngbin343 -> 351 bytes
-rw-r--r--tools/editor/icons/icon_collapse_hl.pngbin341 -> 338 bytes
-rw-r--r--tools/editor/icons/icon_connect.pngbin646 -> 592 bytes
-rw-r--r--tools/editor/icons/icon_del.pngbin456 -> 398 bytes
-rw-r--r--tools/editor/icons/icon_duplicate.pngbin363 -> 327 bytes
-rw-r--r--tools/editor/icons/icon_edit.pngbin523 -> 475 bytes
-rw-r--r--tools/editor/icons/icon_edit_key.pngbin534 -> 478 bytes
-rw-r--r--tools/editor/icons/icon_edit_resource.pngbin286 -> 234 bytes
-rw-r--r--tools/editor/icons/icon_editor_focus.pngbin1273 -> 629 bytes
-rw-r--r--tools/editor/icons/icon_enum.pngbin221 -> 193 bytes
-rw-r--r--tools/editor/icons/icon_event_player.pngbin352 -> 299 bytes
-rw-r--r--tools/editor/icons/icon_file_server.pngbin636 -> 563 bytes
-rw-r--r--tools/editor/icons/icon_folder.pngbin471 -> 428 bytes
-rw-r--r--tools/editor/icons/icon_font.pngbin282 -> 248 bytes
-rw-r--r--tools/editor/icons/icon_g_d_script.pngbin628 -> 580 bytes
-rw-r--r--tools/editor/icons/icon_graph_color_ramp.pngbin0 -> 290 bytes
-rw-r--r--tools/editor/icons/icon_graph_comment.pngbin0 -> 310 bytes
-rw-r--r--tools/editor/icons/icon_graph_cube_uniform.pngbin0 -> 652 bytes
-rw-r--r--tools/editor/icons/icon_graph_curve_map.pngbin0 -> 619 bytes
-rw-r--r--tools/editor/icons/icon_graph_default_texture.pngbin0 -> 326 bytes
-rw-r--r--tools/editor/icons/icon_graph_input.pngbin0 -> 585 bytes
-rw-r--r--tools/editor/icons/icon_graph_rgb.pngbin0 -> 174 bytes
-rw-r--r--tools/editor/icons/icon_graph_rgb_op.pngbin0 -> 280 bytes
-rw-r--r--tools/editor/icons/icon_graph_rgb_uniform.pngbin0 -> 419 bytes
-rw-r--r--tools/editor/icons/icon_graph_scalar.pngbin0 -> 328 bytes
-rw-r--r--tools/editor/icons/icon_graph_scalar_interp.pngbin0 -> 352 bytes
-rw-r--r--tools/editor/icons/icon_graph_scalar_op.pngbin0 -> 238 bytes
-rw-r--r--tools/editor/icons/icon_graph_scalar_uniform.pngbin0 -> 392 bytes
-rw-r--r--tools/editor/icons/icon_graph_scalars_to_vec.pngbin0 -> 300 bytes
-rw-r--r--tools/editor/icons/icon_graph_texscreen.pngbin0 -> 578 bytes
-rw-r--r--tools/editor/icons/icon_graph_texture_uniform.pngbin0 -> 358 bytes
-rw-r--r--tools/editor/icons/icon_graph_time.pngbin0 -> 678 bytes
-rw-r--r--tools/editor/icons/icon_graph_vec_dp.pngbin0 -> 279 bytes
-rw-r--r--tools/editor/icons/icon_graph_vec_interp.pngbin0 -> 332 bytes
-rw-r--r--tools/editor/icons/icon_graph_vec_length.pngbin0 -> 303 bytes
-rw-r--r--tools/editor/icons/icon_graph_vec_op.pngbin0 -> 256 bytes
-rw-r--r--tools/editor/icons/icon_graph_vec_scalar_op.pngbin0 -> 267 bytes
-rw-r--r--tools/editor/icons/icon_graph_vec_to_scalars.pngbin0 -> 306 bytes
-rw-r--r--tools/editor/icons/icon_graph_vecs_to_xform.pngbin0 -> 288 bytes
-rw-r--r--tools/editor/icons/icon_graph_vector.pngbin0 -> 480 bytes
-rw-r--r--tools/editor/icons/icon_graph_vector_uniform.pngbin0 -> 531 bytes
-rw-r--r--tools/editor/icons/icon_graph_xform.pngbin0 -> 262 bytes
-rw-r--r--tools/editor/icons/icon_graph_xform_mult.pngbin0 -> 311 bytes
-rw-r--r--tools/editor/icons/icon_graph_xform_scalar_func.pngbin0 -> 378 bytes
-rw-r--r--tools/editor/icons/icon_graph_xform_to_vecs.pngbin0 -> 272 bytes
-rw-r--r--tools/editor/icons/icon_graph_xform_uniform.pngbin0 -> 346 bytes
-rw-r--r--tools/editor/icons/icon_graph_xform_vec_func.pngbin0 -> 389 bytes
-rw-r--r--tools/editor/icons/icon_graph_xform_vec_imult.pngbin0 -> 430 bytes
-rw-r--r--tools/editor/icons/icon_graph_xform_vec_mult.pngbin0 -> 422 bytes
-rw-r--r--tools/editor/icons/icon_group.pngbin402 -> 357 bytes
-rw-r--r--tools/editor/icons/icon_groups.pngbin558 -> 507 bytes
-rw-r--r--tools/editor/icons/icon_hidden.pngbin553 -> 500 bytes
-rw-r--r--tools/editor/icons/icon_image.pngbin444 -> 403 bytes
-rw-r--r--tools/editor/icons/icon_image_texture.pngbin352 -> 315 bytes
-rw-r--r--tools/editor/icons/icon_instance_options.pngbin523 -> 483 bytes
-rw-r--r--tools/editor/icons/icon_integer.pngbin183 -> 142 bytes
-rw-r--r--tools/editor/icons/icon_interp_cubic.pngbin373 -> 340 bytes
-rw-r--r--tools/editor/icons/icon_interp_linear.pngbin172 -> 134 bytes
-rw-r--r--tools/editor/icons/icon_interp_raw.pngbin161 -> 127 bytes
-rw-r--r--tools/editor/icons/icon_key.pngbin495 -> 450 bytes
-rw-r--r--tools/editor/icons/icon_key_selected.pngbin257 -> 215 bytes
-rw-r--r--tools/editor/icons/icon_light_map.pngbin441 -> 406 bytes
-rw-r--r--tools/editor/icons/icon_load.pngbin471 -> 428 bytes
-rw-r--r--tools/editor/icons/icon_lock.pngbin403 -> 362 bytes
-rw-r--r--tools/editor/icons/icon_loop.pngbin408 -> 366 bytes
-rw-r--r--tools/editor/icons/icon_main_play.pngbin367 -> 311 bytes
-rw-r--r--tools/editor/icons/icon_main_stop.pngbin336 -> 263 bytes
-rw-r--r--tools/editor/icons/icon_mirror_x.pngbin230 -> 187 bytes
-rw-r--r--tools/editor/icons/icon_mirror_y.pngbin244 -> 215 bytes
-rw-r--r--tools/editor/icons/icon_move_down.pngbin286 -> 239 bytes
-rw-r--r--tools/editor/icons/icon_move_down_hl.pngbin266 -> 234 bytes
-rw-r--r--tools/editor/icons/icon_move_up.pngbin275 -> 225 bytes
-rw-r--r--tools/editor/icons/icon_move_up_hl.pngbin278 -> 224 bytes
-rw-r--r--tools/editor/icons/icon_new.pngbin344 -> 298 bytes
-rw-r--r--tools/editor/icons/icon_node.pngbin301 -> 257 bytes
-rw-r--r--tools/editor/icons/icon_open.pngbin471 -> 428 bytes
-rw-r--r--tools/editor/icons/icon_p_hash_translation.pngbin282 -> 234 bytes
-rw-r--r--tools/editor/icons/icon_packed_scene.pngbin536 -> 485 bytes
-rw-r--r--tools/editor/icons/icon_panels_1.pngbin195 -> 154 bytes
-rw-r--r--tools/editor/icons/icon_panels_2.pngbin196 -> 157 bytes
-rw-r--r--tools/editor/icons/icon_panels_3.pngbin205 -> 166 bytes
-rw-r--r--tools/editor/icons/icon_panels_4.pngbin198 -> 159 bytes
-rw-r--r--tools/editor/icons/icon_pin.pngbin420 -> 381 bytes
-rw-r--r--tools/editor/icons/icon_pin_pressed.pngbin385 -> 346 bytes
-rw-r--r--tools/editor/icons/icon_play.pngbin302 -> 256 bytes
-rw-r--r--tools/editor/icons/icon_play_custom.pngbin533 -> 500 bytes
-rw-r--r--tools/editor/icons/icon_play_scene.pngbin690 -> 600 bytes
-rw-r--r--tools/editor/icons/icon_prev_scene.pngbin279 -> 229 bytes
-rw-r--r--tools/editor/icons/icon_real.pngbin183 -> 146 bytes
-rw-r--r--tools/editor/icons/icon_reload.pngbin567 -> 519 bytes
-rw-r--r--tools/editor/icons/icon_remove.pngbin456 -> 398 bytes
-rw-r--r--tools/editor/icons/icon_rename.pngbin320 -> 269 bytes
-rw-r--r--tools/editor/icons/icon_reparent.pngbin523 -> 474 bytes
-rw-r--r--tools/editor/icons/icon_replace.pngbin483 -> 435 bytes
-rw-r--r--tools/editor/icons/icon_resource_preloader.pngbin771 -> 716 bytes
-rw-r--r--tools/editor/icons/icon_sample_player.pngbin448 -> 415 bytes
-rw-r--r--tools/editor/icons/icon_save.pngbin515 -> 473 bytes
-rw-r--r--tools/editor/icons/icon_script.pngbin317 -> 272 bytes
-rw-r--r--tools/editor/icons/icon_sound_room_params.pngbin577 -> 534 bytes
-rw-r--r--tools/editor/icons/icon_stop.pngbin171 -> 138 bytes
-rw-r--r--tools/editor/icons/icon_stream_player.pngbin355 -> 327 bytes
-rw-r--r--tools/editor/icons/icon_string.pngbin156 -> 121 bytes
-rw-r--r--tools/editor/icons/icon_texture.pngbin328 -> 292 bytes
-rw-r--r--tools/editor/icons/icon_timer.pngbin607 -> 551 bytes
-rw-r--r--tools/editor/icons/icon_tool_move.pngbin323 -> 275 bytes
-rw-r--r--tools/editor/icons/icon_tool_pan.pngbin1555 -> 1654 bytes
-rw-r--r--tools/editor/icons/icon_tool_rotate.pngbin610 -> 567 bytes
-rw-r--r--tools/editor/icons/icon_tool_scale.pngbin415 -> 366 bytes
-rw-r--r--tools/editor/icons/icon_tool_select.pngbin359 -> 311 bytes
-rw-r--r--tools/editor/icons/icon_tools.pngbin639 -> 589 bytes
-rw-r--r--tools/editor/icons/icon_track_continuous.pngbin268 -> 231 bytes
-rw-r--r--tools/editor/icons/icon_track_discrete.pngbin153 -> 118 bytes
-rw-r--r--tools/editor/icons/icon_translation.pngbin286 -> 241 bytes
-rw-r--r--tools/editor/icons/icon_unbone.pngbin3000 -> 303 bytes
-rw-r--r--tools/editor/icons/icon_ungroup.pngbin525 -> 478 bytes
-rw-r--r--tools/editor/icons/icon_unlock.pngbin367 -> 337 bytes
-rw-r--r--tools/editor/icons/icon_uv.pngbin381 -> 343 bytes
-rw-r--r--tools/editor/icons/icon_vector.pngbin190 -> 158 bytes
-rw-r--r--tools/editor/icons/icon_vector2.pngbin176 -> 141 bytes
-rw-r--r--tools/editor/icons/icon_viewport.pngbin325 -> 287 bytes
-rw-r--r--tools/editor/icons/icon_visible.pngbin563 -> 502 bytes
-rw-r--r--tools/editor/icons/icon_zoom.pngbin582 -> 537 bytes
-rw-r--r--tools/editor/io_plugins/editor_font_import_plugin.cpp2
-rw-r--r--tools/editor/io_plugins/editor_texture_import_plugin.cpp6
-rw-r--r--tools/editor/io_plugins/editor_texture_import_plugin.h1
-rw-r--r--tools/editor/plugins/canvas_item_editor_plugin.cpp11
-rw-r--r--tools/editor/plugins/canvas_item_editor_plugin.h3
-rw-r--r--tools/editor/plugins/path_2d_editor_plugin.cpp4
-rw-r--r--tools/editor/plugins/script_editor_plugin.cpp14
-rw-r--r--tools/editor/plugins/shader_editor_plugin.cpp73
-rw-r--r--tools/editor/plugins/shader_editor_plugin.h6
-rw-r--r--tools/editor/plugins/shader_graph_editor_plugin.cpp1074
-rw-r--r--tools/editor/plugins/shader_graph_editor_plugin.h85
-rw-r--r--tools/editor/plugins/tile_map_editor_plugin.cpp79
-rw-r--r--tools/editor/plugins/tile_map_editor_plugin.h6
-rw-r--r--tools/editor/project_manager.cpp4
-rw-r--r--tools/editor/scene_tree_dock.cpp24
-rw-r--r--tools/editor/script_editor_debugger.cpp2
-rw-r--r--tools/export/blender25/godot_export_manager.py474
-rw-r--r--tools/export/blender25/io_scene_dae/export_dae.py71
335 files changed, 6321 insertions, 8715 deletions
diff --git a/.gitignore b/.gitignore
index 87f9986e59..3bf450aca8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -259,3 +259,4 @@ Desktop.ini
# Recycle Bin used on file shares
$RECYCLE.BIN/
logo.h
+*.autosave
diff --git a/SConstruct b/SConstruct
index b9f2b7e2c4..c68ca3989f 100644
--- a/SConstruct
+++ b/SConstruct
@@ -116,6 +116,7 @@ opts.Add("CFLAGS", "Custom flags for the C compiler");
opts.Add("LINKFLAGS", "Custom flags for the linker");
opts.Add('disable_3d', 'Disable 3D nodes for smaller executable (yes/no)', "no")
opts.Add('disable_advanced_gui', 'Disable advance 3D gui nodes and behaviors (yes/no)', "no")
+opts.Add('colored', 'Enable colored output for the compilation (yes/no)', 'no')
# add platform specific options
@@ -299,6 +300,9 @@ if selected_platform in platform_list:
if (env['xml']=='yes'):
env.Append(CPPFLAGS=['-DXML_ENABLED'])
+ if (env['colored']=='yes'):
+ methods.colored(sys,env)
+
Export('env')
diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp
index 54fa4214a4..0c5d21b4f6 100644
--- a/core/bind/core_bind.cpp
+++ b/core/bind/core_bind.cpp
@@ -642,7 +642,7 @@ void _OS::_bind_methods() {
ObjectTypeDB::bind_method(_MD("has_touchscreen_ui_hint"),&_OS::has_touchscreen_ui_hint);
-
+ ObjectTypeDB::bind_method(_MD("set_window_title","title"),&_OS::set_window_title);
ObjectTypeDB::bind_method(_MD("set_low_processor_usage_mode","enable"),&_OS::set_low_processor_usage_mode);
ObjectTypeDB::bind_method(_MD("is_in_low_processor_usage_mode"),&_OS::is_in_low_processor_usage_mode);
diff --git a/core/color.cpp b/core/color.cpp
index 1528db6aaa..3116c33a31 100644
--- a/core/color.cpp
+++ b/core/color.cpp
@@ -225,7 +225,7 @@ Color Color::inverted() const {
Color Color::contrasted() const {
Color c=*this;
- c.contrasted();
+ c.contrast();
return c;
}
diff --git a/core/int_types.h b/core/int_types.h
index 15ef68e915..31f05b2d35 100644
--- a/core/int_types.h
+++ b/core/int_types.h
@@ -48,7 +48,7 @@ typedef signed short int16_t;
typedef unsigned int uint32_t;
typedef signed int int32_t;
typedef long long int64_t;
-typedef unsigned long long int64_t;
+typedef unsigned long long uint64_t;
#else
#include <stdint.h>
#endif
diff --git a/core/object_type_db.cpp b/core/object_type_db.cpp
index f7917b7418..1047d7eba5 100644
--- a/core/object_type_db.cpp
+++ b/core/object_type_db.cpp
@@ -847,8 +847,15 @@ void ObjectTypeDB::set_type_enabled(StringName p_type,bool p_enable) {
bool ObjectTypeDB::is_type_enabled(StringName p_type) {
- ERR_FAIL_COND_V(!types.has(p_type),false);
- return !types[p_type].disabled;
+ TypeInfo *ti=types.getptr(p_type);
+ if (!ti || !ti->creation_func) {
+ if (compat_types.has(p_type)) {
+ ti=types.getptr(compat_types[p_type]);
+ }
+ }
+
+ ERR_FAIL_COND_V(!ti,false);
+ return !ti->disabled;
}
StringName ObjectTypeDB::get_category(const StringName& p_node) {
diff --git a/core/os/input.cpp b/core/os/input.cpp
index a827e75896..5d4b3a834d 100644
--- a/core/os/input.cpp
+++ b/core/os/input.cpp
@@ -62,6 +62,8 @@ void Input::_bind_methods() {
ObjectTypeDB::bind_method(_MD("set_mouse_mode","mode"),&Input::set_mouse_mode);
ObjectTypeDB::bind_method(_MD("get_mouse_mode"),&Input::get_mouse_mode);
ObjectTypeDB::bind_method(_MD("warp_mouse_pos","to"),&Input::warp_mouse_pos);
+ ObjectTypeDB::bind_method(_MD("action_press"),&Input::action_press);
+ ObjectTypeDB::bind_method(_MD("action_release"),&Input::action_release);
BIND_CONSTANT( MOUSE_MODE_VISIBLE );
BIND_CONSTANT( MOUSE_MODE_HIDDEN );
diff --git a/core/variant_op.cpp b/core/variant_op.cpp
index 533a9d6952..21bbc8c7ee 100644
--- a/core/variant_op.cpp
+++ b/core/variant_op.cpp
@@ -1701,6 +1701,19 @@ void Variant::set(const Variant& p_index, const Variant& p_value, bool *r_valid)
return;
}
}
+ if (ie.type == InputEvent::ACTION) {
+
+ if (str =="action") {
+ valid=true;
+ ie.action.action=p_value;
+ return;
+ }
+ else if (str == "pressed") {
+ valid=true;
+ ie.action.pressed=p_value;
+ return;
+ }
+ }
} break;
case DICTIONARY: {
@@ -2379,6 +2392,17 @@ Variant Variant::get(const Variant& p_index, bool *r_valid) const {
return Vector2(ie.screen_drag.speed_x,ie.screen_drag.speed_y);
}
}
+ if (ie.type == InputEvent::ACTION) {
+
+ if (str =="action") {
+ valid=true;
+ return ie.action.action;
+ }
+ else if (str == "pressed") {
+ valid=true;
+ ie.action.pressed;
+ }
+ }
} break;
case DICTIONARY: {
diff --git a/demos/2d/kinematic_char/colworld.scn b/demos/2d/kinematic_char/colworld.scn
index b3a0a1f168..7b79a1d887 100644
--- a/demos/2d/kinematic_char/colworld.scn
+++ b/demos/2d/kinematic_char/colworld.scn
Binary files differ
diff --git a/demos/2d/kinematic_char/player.gd b/demos/2d/kinematic_char/player.gd
index 9cff0269e8..e8b3cc8d00 100644
--- a/demos/2d/kinematic_char/player.gd
+++ b/demos/2d/kinematic_char/player.gd
@@ -15,6 +15,7 @@ const GRAVITY = 500.0
#consider "floor".
const FLOOR_ANGLE_TOLERANCE = 40
const WALK_FORCE = 600
+const WALK_MIN_SPEED=10
const WALK_MAX_SPEED = 200
const STOP_FORCE = 1300
const JUMP_SPEED = 200
@@ -40,12 +41,12 @@ func _fixed_process(delta):
var stop=true
if (walk_left):
- if (velocity.x<=0 and velocity.x > -WALK_MAX_SPEED):
+ if (velocity.x<=WALK_MIN_SPEED and velocity.x > -WALK_MAX_SPEED):
force.x-=WALK_FORCE
stop=false
elif (walk_right):
- if (velocity.x>=0 and velocity.x < WALK_MAX_SPEED):
+ if (velocity.x>=-WALK_MIN_SPEED and velocity.x < WALK_MAX_SPEED):
force.x+=WALK_FORCE
stop=false
diff --git a/demos/2d/kinematic_char/player.scn b/demos/2d/kinematic_char/player.scn
index 126b332184..5809c0e98a 100644
--- a/demos/2d/kinematic_char/player.scn
+++ b/demos/2d/kinematic_char/player.scn
Binary files differ
diff --git a/demos/2d/platformer/stage.xml b/demos/2d/platformer/stage.xml
index 78d0f9ae2c..e2943d8fcf 100644
--- a/demos/2d/platformer/stage.xml
+++ b/demos/2d/platformer/stage.xml
@@ -1,17 +1,17 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<resource_file type="PackedScene" subresource_count="9" version="1.0" version_name="Godot Engine v1.0.3917-beta1">
+<resource_file type="PackedScene" subresource_count="9" version="1.0" version_name="Godot Engine v1.0.stable.custom_build">
<ext_resource path="res://tileset.xml" type="TileSet"></ext_resource>
<ext_resource path="res://music.ogg" type="AudioStream"></ext_resource>
- <ext_resource path="res://coin.xml" type="PackedScene"></ext_resource>
+ <ext_resource path="res://parallax_bg.xml" type="PackedScene"></ext_resource>
<ext_resource path="res://player.xml" type="PackedScene"></ext_resource>
- <ext_resource path="res://seesaw.xml" type="PackedScene"></ext_resource>
<ext_resource path="res://moving_platform.xml" type="PackedScene"></ext_resource>
<ext_resource path="res://enemy.xml" type="PackedScene"></ext_resource>
- <ext_resource path="res://parallax_bg.xml" type="PackedScene"></ext_resource>
+ <ext_resource path="res://seesaw.xml" type="PackedScene"></ext_resource>
+ <ext_resource path="res://coin.xml" type="PackedScene"></ext_resource>
<main_resource>
<dictionary name="_bundled" shared="false">
<string> "names" </string>
- <string_array len="122">
+ <string_array len="125">
<string> "stage" </string>
<string> "Node" </string>
<string> "_import_path" </string>
@@ -25,13 +25,16 @@
<string> "transform/pos" </string>
<string> "transform/rot" </string>
<string> "transform/scale" </string>
- <string> "cell_size" </string>
- <string> "quadrant_size" </string>
+ <string> "mode" </string>
<string> "tile_set" </string>
- <string> "tile_data" </string>
+ <string> "cell/size" </string>
+ <string> "cell/quadrant_size" </string>
+ <string> "cell/custom_transform" </string>
+ <string> "cell/half_offset" </string>
<string> "collision/friction" </string>
<string> "collision/bounce" </string>
<string> "collision/layers" </string>
+ <string> "tile_data" </string>
<string> "coins" </string>
<string> "coin" </string>
<string> "Area2D" </string>
@@ -142,7 +145,7 @@
<string> "node_count" </string>
<int> 66 </int>
<string> "variants" </string>
- <array len="96" shared="false">
+ <array len="103" shared="false">
<node_path> "" </node_path>
<dictionary shared="false">
<string> "__editor_plugin_states__" </string>
@@ -174,6 +177,8 @@
</dictionary>
<string> "3D" </string>
<dictionary shared="false">
+ <string> "deflight_rot_y" </string>
+ <real> 0.628319 </real>
<string> "zfar" </string>
<real> 500 </real>
<string> "fov" </string>
@@ -187,10 +192,12 @@
<real> 0 </real>
<string> "y_rot" </string>
<real> 0 </real>
- <string> "use_orthogonal" </string>
- <bool> False </bool>
+ <string> "listener" </string>
+ <bool> True </bool>
<string> "use_environment" </string>
<bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
<string> "pos" </string>
<vector3> 0, 0, 0 </vector3>
</dictionary>
@@ -201,10 +208,12 @@
<real> 0 </real>
<string> "y_rot" </string>
<real> 0 </real>
- <string> "use_orthogonal" </string>
+ <string> "listener" </string>
<bool> False </bool>
<string> "use_environment" </string>
<bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
<string> "pos" </string>
<vector3> 0, 0, 0 </vector3>
</dictionary>
@@ -215,10 +224,12 @@
<real> 0 </real>
<string> "y_rot" </string>
<real> 0 </real>
- <string> "use_orthogonal" </string>
+ <string> "listener" </string>
<bool> False </bool>
<string> "use_environment" </string>
<bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
<string> "pos" </string>
<vector3> 0, 0, 0 </vector3>
</dictionary>
@@ -229,10 +240,12 @@
<real> 0 </real>
<string> "y_rot" </string>
<real> 0 </real>
- <string> "use_orthogonal" </string>
+ <string> "listener" </string>
<bool> False </bool>
<string> "use_environment" </string>
<bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
<string> "pos" </string>
<vector3> 0, 0, 0 </vector3>
</dictionary>
@@ -241,12 +254,18 @@
<int> 1 </int>
<string> "default_light" </string>
<bool> True </bool>
+ <string> "ambient_light_color" </string>
+ <color> 0.15, 0.15, 0.15, 1 </color>
<string> "show_grid" </string>
<bool> True </bool>
<string> "show_origin" </string>
<bool> True </bool>
<string> "znear" </string>
<real> 0.1 </real>
+ <string> "default_srgb" </string>
+ <bool> False </bool>
+ <string> "deflight_rot_x" </string>
+ <real> 0.942478 </real>
</dictionary>
</dictionary>
<string> "__editor_run_settings__" </string>
@@ -257,7 +276,7 @@
<int> 0 </int>
</dictionary>
<string> "__editor_plugin_screen__" </string>
- <string> "2D" </string>
+ <string> "Script" </string>
</dictionary>
<bool> True </bool>
<real> 1 </real>
@@ -265,11 +284,14 @@
<vector2> 0, 0 </vector2>
<real> 0 </real>
<vector2> 1, 1 </vector2>
- <int> 64 </int>
- <int> 16 </int>
+ <int> 0 </int>
<resource resource_type="TileSet" path="res://tileset.xml"> </resource>
- <int_array len="1998"> 0, 2, 70, 536870914, 71, 10, 72, 10, 73, 10, 74, 10, 75, 10, 76, 10, 77, 10, 78, 10, 65536, 2, 65606, 536870914, 65607, 10, 65608, 10, 65609, 10, 65610, 10, 65611, 10, 65612, 10, 65613, 10, 65614, 10, 131072, 2, 131142, 536870914, 131143, 10, 131144, 10, 131145, 10, 131146, 10, 131147, 10, 131148, 10, 131149, 10, 131150, 10, 196608, 2, 196626, 9, 196678, 536870914, 196679, 10, 196680, 10, 196681, 10, 196682, 10, 196683, 10, 196684, 10, 196685, 10, 196686, 10, 262144, 2, 262162, 8, 262214, 536870914, 262215, 10, 262216, 10, 262217, 10, 262218, 10, 262219, 10, 262220, 10, 262221, 10, 262222, 10, 327680, 2, 327697, 536870921, 327698, 7, 327733, 9, 327750, 536870914, 327751, 10, 327752, 10, 327753, 10, 327754, 10, 327755, 10, 327756, 10, 327757, 10, 327758, 10, 393216, 2, 393233, 536870920, 393234, 7, 393257, 9, 393269, 7, 393286, 536870914, 393287, 10, 393288, 10, 393289, 10, 393290, 10, 393291, 10, 393292, 10, 393293, 10, 393294, 10, 458752, 2, 458769, 7, 458770, 8, 458790, 9, 458793, 8, 458805, 8, 458822, 536870914, 458823, 10, 458824, 10, 458825, 10, 458826, 10, 458827, 10, 458828, 10, 458829, 10, 458830, 10, 524288, 4, 524289, 1, 524304, 536870913, 524305, 536870918, 524306, 6, 524307, 5, 524308, 1, 524326, 8, 524329, 7, 524341, 7, 524358, 536870914, 524359, 10, 524360, 10, 524361, 10, 524362, 10, 524363, 10, 524364, 10, 524365, 10, 524366, 10, 589824, 10, 589825, 13, 589840, 536870914, 589841, 10, 589842, 10, 589843, 10, 589844, 2, 589862, 7, 589865, 7, 589876, 536870913, 589877, 6, 589878, 1, 589894, 536870914, 589895, 10, 589896, 10, 589897, 10, 589898, 10, 589899, 10, 589900, 10, 589901, 10, 589902, 10, 655360, 2, 655376, 536870914, 655377, 10, 655378, 10, 655379, 10, 655380, 2, 655398, 7, 655401, 8, 655412, 536870925, 655413, 11, 655414, 13, 655430, 536870914, 655431, 10, 655432, 10, 655433, 10, 655434, 10, 655435, 10, 655436, 10, 655437, 10, 655438, 10, 720896, 2, 720912, 536870914, 720913, 10, 720914, 10, 720915, 10, 720916, 2, 720934, 8, 720937, 7, 720958, 536870913, 720959, 5, 720960, 536870917, 720961, 5, 720962, 5, 720963, 536870917, 720964, 5, 720965, 0, 720966, 536870916, 720967, 10, 720968, 10, 720969, 10, 720970, 10, 720971, 10, 720972, 10, 720973, 10, 720974, 10, 786432, 2, 786437, 9, 786448, 536870914, 786449, 10, 786450, 10, 786451, 10, 786452, 2, 786464, 536870913, 786465, 1, 786470, 7, 786473, 7, 786474, 536870924, 786475, 1, 786494, 536870914, 786495, 10, 786496, 10, 786497, 10, 786498, 10, 786499, 10, 786500, 10, 786501, 10, 786502, 10, 786503, 10, 786504, 10, 786505, 10, 786506, 10, 786507, 10, 786508, 10, 786509, 10, 851968, 2, 851973, 7, 851984, 536870914, 851985, 10, 851986, 10, 851987, 10, 851988, 2, 851996, 536870913, 851997, 1, 852000, 536870914, 852001, 3, 852006, 7, 852009, 536870913, 852011, 2, 852030, 536870914, 852031, 10, 852032, 10, 852033, 10, 852034, 10, 852035, 10, 852036, 10, 852037, 10, 852038, 10, 852039, 10, 852040, 10, 852041, 10, 852042, 10, 852043, 10, 852044, 10, 852045, 10, 917504, 2, 917506, 9, 917509, 7, 917512, 536870921, 917520, 536870925, 917521, 11, 917522, 11, 917523, 11, 917524, 13, 917532, 536870925, 917533, 13, 917536, 536870914, 917537, 4, 917538, 1, 917540, 536870913, 917541, 0, 917542, 1, 917545, 536870914, 917546, 10, 917547, 4, 917548, 1, 917566, 536870914, 917567, 10, 917568, 10, 917569, 10, 917570, 10, 917571, 10, 917572, 10, 917573, 10, 917574, 10, 917575, 10, 917576, 10, 917577, 10, 917578, 10, 917579, 10, 917580, 10, 917581, 10, 983040, 2, 983042, 7, 983045, 7, 983048, 536870920, 983050, 536870913, 983051, 1, 983064, 536870913, 983065, 1, 983072, 536870914, 983073, 10, 983074, 4, 983075, 0, 983076, 536870916, 983077, 10, 983078, 4, 983079, 536870912, 983080, 536870912, 983081, 536870916, 983082, 10, 983083, 10, 983084, 2, 983095, 9, 983102, 536870914, 983103, 10, 983104, 10, 983105, 10, 983106, 10, 983107, 10, 983108, 10, 983109, 10, 983110, 10, 983111, 10, 983112, 10, 983113, 10, 983114, 10, 983115, 10, 983116, 10, 983117, 10, 1048576, 2, 1048578, 8, 1048581, 8, 1048584, 536870919, 1048586, 536870925, 1048587, 13, 1048600, 536870925, 1048601, 13, 1048604, 9, 1048608, 536870925, 1048609, 536870923, 1048610, 536870923, 1048611, 536870923, 1048612, 10, 1048613, 10, 1048614, 10, 1048615, 10, 1048616, 10, 1048617, 10, 1048618, 10, 1048619, 10, 1048620, 4, 1048621, 1, 1048630, 536870921, 1048631, 8, 1048638, 536870914, 1048639, 10, 1048640, 10, 1048641, 10, 1048642, 10, 1048643, 10, 1048644, 10, 1048645, 10, 1048646, 10, 1048647, 10, 1048648, 10, 1048649, 10, 1048650, 10, 1048651, 10, 1048652, 10, 1048653, 10, 1114112, 4, 1114113, 0, 1114114, 6, 1114115, 0, 1114116, 0, 1114117, 6, 1114118, 1, 1114120, 536870920, 1114128, 536870913, 1114129, 5, 1114130, 536870917, 1114131, 5, 1114132, 0, 1114133, 1, 1114140, 7, 1114141, 536870921, 1114148, 536870914, 1114149, 10, 1114150, 10, 1114151, 10, 1114152, 10, 1114153, 10, 1114154, 10, 1114155, 10, 1114156, 10, 1114157, 2, 1114166, 536870920, 1114167, 8, 1114174, 536870914, 1114175, 10, 1114176, 10, 1114177, 10, 1114178, 10, 1114179, 10, 1114180, 10, 1114181, 10, 1114182, 10, 1114183, 10, 1114184, 10, 1114185, 10, 1114186, 10, 1114187, 10, 1114188, 10, 1179648, 10, 1179649, 10, 1179650, 10, 1179651, 10, 1179652, 10, 1179653, 10, 1179654, 2, 1179656, 536870919, 1179663, 536870915, 1179665, 10, 1179666, 10, 1179667, 10, 1179668, 10, 1179669, 4, 1179670, 12, 1179675, 9, 1179676, 8, 1179677, 8, 1179684, 536870914, 1179685, 10, 1179686, 10, 1179687, 10, 1179688, 10, 1179689, 10, 1179690, 10, 1179691, 10, 1179692, 10, 1179693, 4, 1179694, 1, 1179701, 9, 1179702, 536870919, 1179703, 7, 1179710, 536870914, 1179711, 10, 1179712, 10, 1179713, 10, 1179714, 10, 1179715, 10, 1179716, 10, 1179717, 10, 1179718, 10, 1179719, 10, 1179720, 10, 1179721, 10, 1179722, 10, 1245184, 10, 1245185, 10, 1245186, 10, 1245187, 10, 1245188, 10, 1245189, 10, 1245190, 2, 1245192, 536870919, 1245199, 536870913, 1245200, 536870916, 1245201, 10, 1245202, 10, 1245203, 10, 1245204, 10, 1245205, 10, 1245207, 1, 1245211, 7, 1245212, 7, 1245213, 536870920, 1245220, 536870914, 1245221, 10, 1245222, 10, 1245223, 10, 1245224, 10, 1245225, 10, 1245226, 10, 1245227, 10, 1245228, 10, 1245229, 10, 1245230, 2, 1245237, 8, 1245238, 536870919, 1245239, 8, 1245240, 536870921, 1245246, 536870914, 1245247, 10, 1245248, 10, 1245249, 10, 1245250, 10, 1245251, 10, 1245252, 10, 1245253, 10, 1245254, 10, 1245255, 10, 1245256, 10, 1245257, 10, 1245258, 10, 1310720, 10, 1310721, 10, 1310722, 10, 1310723, 10, 1310724, 10, 1310725, 10, 1310726, 2, 1310728, 536870920, 1310730, 536870913, 1310731, 1, 1310734, 536870913, 1310735, 536870916, 1310736, 10, 1310737, 10, 1310738, 10, 1310739, 10, 1310740, 10, 1310741, 10, 1310742, 10, 1310743, 4, 1310744, 1, 1310747, 8, 1310748, 7, 1310749, 536870919, 1310756, 536870914, 1310757, 10, 1310758, 10, 1310759, 10, 1310760, 10, 1310761, 10, 1310762, 10, 1310763, 10, 1310764, 10, 1310765, 10, 1310766, 4, 1310767, 5, 1310768, 12, 1310773, 7, 1310774, 536870919, 1310775, 7, 1310776, 536870919, 1310782, 536870914, 1310783, 10, 1310784, 10, 1310785, 10, 1310786, 10, 1310787, 10, 1310788, 10, 1310789, 10, 1310790, 10, 1310791, 10, 1310792, 10, 1310793, 10, 1376256, 10, 1376257, 10, 1376258, 10, 1376259, 10, 1376260, 10, 1376261, 10, 1376262, 4, 1376263, 0, 1376264, 536870918, 1376265, 0, 1376266, 536870916, 1376267, 4, 1376268, 0, 1376269, 0, 1376270, 536870916, 1376271, 10, 1376272, 10, 1376273, 10, 1376274, 10, 1376275, 10, 1376276, 10, 1376277, 10, 1376278, 10, 1376279, 10, 1376280, 4, 1376281, 12, 1376283, 8, 1376284, 8, 1376285, 536870920, 1376287, 536870924, 1376288, 0, 1376289, 5, 1376290, 536870917, 1376291, 0, 1376292, 536870916, 1376293, 10, 1376294, 10, 1376295, 10, 1376296, 10, 1376297, 10, 1376298, 10, 1376299, 10, 1376300, 10, 1376301, 10, 1376302, 10, 1376303, 10, 1376305, 12, 1376309, 7, 1376310, 536870920, 1376311, 7, 1376312, 536870920, 1376318, 536870914, 1376319, 10, 1376320, 10, 1376321, 10, 1376322, 10, 1376323, 10, 1376324, 10, 1376325, 10, 1376326, 10, 1376327, 10, 1376328, 10, 1441792, 10, 1441793, 10, 1441794, 10, 1441795, 10, 1441796, 10, 1441797, 10, 1441798, 10, 1441799, 10, 1441800, 10, 1441801, 10, 1441802, 10, 1441803, 10, 1441804, 10, 1441805, 10, 1441806, 10, 1441807, 10, 1441808, 10, 1441809, 10, 1441810, 10, 1441811, 10, 1441812, 10, 1441813, 10, 1441814, 10, 1441815, 10, 1441816, 10, 1441818, 0, 1441819, 6, 1441820, 6, 1441821, 536870918, 1441822, 5, 1441824, 10, 1441825, 10, 1441826, 10, 1441827, 10, 1441828, 10, 1441829, 10, 1441830, 10, 1441831, 10, 1441832, 10, 1441833, 10, 1441834, 10, 1441835, 10, 1441836, 10, 1441837, 10, 1441838, 10, 1441839, 10, 1441840, 10, 1441842, 0, 1441843, 0, 1441844, 0, 1441845, 6, 1441846, 536870918, 1441847, 6, 1441848, 536870918, 1441849, 0, 1441850, 5, 1441851, 536870917, 1441852, 5, 1441853, 0, 1441854, 536870916, 1441855, 10, 1441856, 10, 1441857, 10, 1441858, 10, 1441859, 10, 1441860, 10, 1441861, 10, 1441862, 10, 1441863, 10, 1507328, 10, 1507329, 10, 1507330, 10, 1507331, 10, 1507332, 10, 1507333, 10, 1507334, 10, 1507335, 10, 1507336, 10, 1507337, 10, 1507338, 10, 1507339, 10, 1507340, 10, 1507341, 10, 1507342, 10, 1507343, 10, 1507344, 10, 1507345, 10, 1507346, 10, 1507347, 10, 1507348, 10, 1507349, 10, 1507350, 10, 1507351, 10, 1507352, 10, 1507353, 10, 1507354, 10, 1507355, 10, 1507356, 10, 1507357, 10, 1507358, 10, 1507359, 10, 1507360, 10, 1507361, 10, 1507362, 10, 1507363, 10, 1507364, 10, 1507365, 10, 1507366, 10, 1507367, 10, 1507368, 10, 1507369, 10, 1507370, 10, 1507371, 10, 1507372, 10, 1507373, 10, 1507374, 10, 1507375, 10, 1507376, 10, 1507377, 10, 1507378, 10, 1507379, 10, 1507380, 10, 1507381, 10, 1507382, 10, 1507383, 10, 1507384, 10, 1507385, 10, 1507386, 10, 1507387, 10, 1507388, 10, 1507389, 10, 1507390, 10, 1507391, 10, 1507392, 10, 1507393, 10, 1507394, 10, 1507395, 10, 1507396, 10, 1507397, 10, 1507398, 10, 1507399, 10, 1572864, 10, 1572865, 10, 1572866, 10, 1572867, 10, 1572868, 10, 1572869, 10, 1572870, 10, 1572871, 10, 1572872, 10, 1572873, 10, 1572874, 10, 1572875, 10, 1572876, 10, 1572877, 10, 1572878, 10, 1572879, 10, 1572880, 10, 1572881, 10, 1572882, 10, 1572883, 10, 1572884, 10, 1572885, 10, 1572886, 10, 1572887, 10, 1572888, 10, 1572889, 10, 1572890, 10, 1572891, 10, 1572892, 10, 1572893, 10, 1572894, 10, 1572895, 10, 1572896, 10, 1572897, 10, 1572898, 10, 1572899, 10, 1572900, 10, 1572901, 10, 1572902, 10, 1572903, 10, 1572904, 10, 1572905, 10, 1572906, 10, 1572907, 10, 1572908, 10, 1572909, 10, 1572910, 10, 1572911, 10, 1572912, 10, 1572913, 10, 1572914, 10, 1572915, 10, 1572916, 10, 1572917, 10, 1572918, 10, 1572919, 10, 1572920, 10, 1572921, 10, 1572922, 10, 1572923, 10, 1572924, 10, 1572925, 10, 1572926, 10, 1572927, 10, 1572928, 10, 1572929, 10, 1572930, 10, 1572931, 10, 1572932, 10, 1572933, 10, 1572934, 10, 1572935, 10, 1638400, 10, 1638401, 10, 1638402, 10, 1638403, 10, 1638404, 10, 1638405, 10, 1638406, 10, 1638407, 10, 1638408, 10, 1638409, 10, 1638410, 10, 1638411, 10, 1638412, 10, 1638413, 10, 1638414, 10, 1638415, 10, 1638416, 10, 1638417, 10, 1638418, 10, 1638419, 10, 1638420, 10, 1638421, 10, 1638422, 10, 1638423, 10, 1638424, 10, 1638425, 10, 1638426, 10, 1638427, 10, 1638428, 10, 1638429, 10, 1638430, 10, 1638431, 10, 1638432, 10, 1638433, 10, 1638434, 10, 1638435, 10, 1638436, 10, 1638437, 10, 1638438, 10, 1638439, 10, 1638440, 10, 1638441, 10, 1638442, 10, 1638443, 10, 1638444, 10, 1638445, 10, 1638446, 10, 1638447, 10, 1638448, 10, 1638449, 10, 1638450, 10, 1638451, 10, 1638452, 10, 1638453, 10, 1638454, 10, 1638455, 10, 1638456, 10, 1638457, 10, 1638458, 10, 1638459, 10, 1638460, 10, 1638461, 10, 1638462, 10, 1638463, 10, 1638464, 10, 1638465, 10, 1638466, 10, 1638467, 10, 1638468, 10, 1638469, 10, 1638470, 10, 1638471, 10, 1703952, 10, 1703953, 10, 1703954, 10, 1703955, 10, 1703956, 10, 1703957, 10, 1703958, 10, 1703959, 10, 1703960, 10, 1703961, 10, 1703962, 10, 1703963, 10, 1703964, 10, 1703965, 10, 1703966, 10, 1703967, 10, 1703968, 10, 1703969, 10, 1703970, 10, 1703971, 10, 1703972, 10, 1703973, 10, 1703974, 10, 1703975, 10, 1703976, 10, 1703977, 10, 1703978, 10, 1703979, 10, 1703980, 10, 1703981, 10, 1703982, 10, 1703983, 10, 1703984, 10, 1703985, 10, 1703986, 10, 1703987, 10, 1703988, 10, 1703989, 10, 1703990, 10, 1703991, 10, 1703992, 10, 1703993, 10, 1703994, 10, 1703995, 10, 1703996, 10, 1703997, 10, 1703998, 10, 1703999, 10, 1704000, 10, 1704001, 10, 1704002, 10, 1704003, 10, 1704004, 10, 1704005, 10, 1704006, 10, 1704007, 10, 1769488, 10, 1769489, 10, 1769490, 10, 1769491, 10, 1769492, 10, 1769493, 10, 1769494, 10, 1769495, 10, 1769496, 10, 1769497, 10, 1769498, 10, 1769499, 10, 1769500, 10, 1769501, 10, 1769502, 10, 1769503, 10, 1769504, 10, 1769505, 10, 1769506, 10, 1769507, 10, 1769508, 10, 1769509, 10, 1769510, 10, 1769511, 10, 1769512, 10, 1769513, 10, 1769514, 10, 1769515, 10, 1769516, 10, 1769517, 10, 1769518, 10, 1769519, 10, 1769520, 10, 1769521, 10, 1769522, 10, 1769523, 10, 1769524, 10, 1769525, 10, 1769526, 10, 1769527, 10, 1769528, 10, 1769529, 10, 1769530, 10, 1769531, 10, 1769532, 10, 1769533, 10, 1769534, 10, 1769535, 10, 1769536, 10, 1769537, 10, 1769538, 10, 1769539, 10, 1769540, 10, 1769541, 10 </int_array>
+ <vector2> 64, 64 </vector2>
+ <int> 16 </int>
+ <matrix32> 1, 0, 0, 1, 0, 0 </matrix32>
+ <int> 2 </int>
<int> 1 </int>
+ <int_array len="1998"> 0, 2, 70, 536870914, 71, 10, 72, 10, 73, 10, 74, 10, 75, 10, 76, 10, 77, 10, 78, 10, 65536, 2, 65606, 536870914, 65607, 10, 65608, 10, 65609, 10, 65610, 10, 65611, 10, 65612, 10, 65613, 10, 65614, 10, 131072, 2, 131142, 536870914, 131143, 10, 131144, 10, 131145, 10, 131146, 10, 131147, 10, 131148, 10, 131149, 10, 131150, 10, 196608, 2, 196626, 9, 196678, 536870914, 196679, 10, 196680, 10, 196681, 10, 196682, 10, 196683, 10, 196684, 10, 196685, 10, 196686, 10, 262144, 2, 262162, 8, 262214, 536870914, 262215, 10, 262216, 10, 262217, 10, 262218, 10, 262219, 10, 262220, 10, 262221, 10, 262222, 10, 327680, 2, 327697, 536870921, 327698, 7, 327733, 9, 327750, 536870914, 327751, 10, 327752, 10, 327753, 10, 327754, 10, 327755, 10, 327756, 10, 327757, 10, 327758, 10, 393216, 2, 393233, 536870920, 393234, 7, 393257, 9, 393269, 7, 393286, 536870914, 393287, 10, 393288, 10, 393289, 10, 393290, 10, 393291, 10, 393292, 10, 393293, 10, 393294, 10, 458752, 2, 458769, 7, 458770, 8, 458790, 9, 458793, 8, 458805, 8, 458822, 536870914, 458823, 10, 458824, 10, 458825, 10, 458826, 10, 458827, 10, 458828, 10, 458829, 10, 458830, 10, 524288, 4, 524289, 1, 524304, 536870913, 524305, 536870918, 524306, 6, 524307, 5, 524308, 1, 524326, 8, 524329, 7, 524341, 7, 524358, 536870914, 524359, 10, 524360, 10, 524361, 10, 524362, 10, 524363, 10, 524364, 10, 524365, 10, 524366, 10, 589824, 10, 589825, 13, 589840, 536870914, 589841, 10, 589842, 10, 589843, 10, 589844, 2, 589862, 7, 589865, 7, 589876, 536870913, 589877, 6, 589878, 1, 589894, 536870914, 589895, 10, 589896, 10, 589897, 10, 589898, 10, 589899, 10, 589900, 10, 589901, 10, 589902, 10, 655360, 2, 655376, 536870914, 655377, 10, 655378, 10, 655379, 10, 655380, 2, 655398, 7, 655401, 8, 655412, 536870925, 655413, 11, 655414, 13, 655430, 536870914, 655431, 10, 655432, 10, 655433, 10, 655434, 10, 655435, 10, 655436, 10, 655437, 10, 655438, 10, 720896, 2, 720912, 536870914, 720913, 10, 720914, 10, 720915, 10, 720916, 2, 720934, 8, 720937, 7, 720958, 536870913, 720959, 5, 720960, 536870917, 720961, 5, 720962, 5, 720963, 536870917, 720964, 5, 720965, 0, 720966, 536870916, 720967, 10, 720968, 10, 720969, 10, 720970, 10, 720971, 10, 720972, 10, 720973, 10, 720974, 10, 786432, 2, 786437, 9, 786448, 536870914, 786449, 10, 786450, 10, 786451, 10, 786452, 2, 786464, 536870913, 786465, 1, 786470, 7, 786473, 7, 786474, 536870924, 786475, 1, 786494, 536870914, 786495, 10, 786496, 10, 786497, 10, 786498, 10, 786499, 10, 786500, 10, 786501, 10, 786502, 10, 786503, 10, 786504, 10, 786505, 10, 786506, 10, 786507, 10, 786508, 10, 786509, 10, 851968, 2, 851973, 7, 851984, 536870914, 851985, 10, 851986, 10, 851987, 10, 851988, 2, 851996, 536870913, 851997, 1, 852000, 536870914, 852001, 3, 852006, 7, 852009, 536870913, 852011, 2, 852030, 536870914, 852031, 10, 852032, 10, 852033, 10, 852034, 10, 852035, 10, 852036, 10, 852037, 10, 852038, 10, 852039, 10, 852040, 10, 852041, 10, 852042, 10, 852043, 10, 852044, 10, 852045, 10, 917504, 2, 917506, 9, 917509, 7, 917512, 536870921, 917520, 536870925, 917521, 11, 917522, 11, 917523, 11, 917524, 13, 917532, 536870925, 917533, 13, 917536, 536870914, 917537, 4, 917538, 1, 917540, 536870913, 917541, 0, 917542, 1, 917545, 536870914, 917546, 10, 917547, 4, 917548, 1, 917566, 536870914, 917567, 10, 917568, 10, 917569, 10, 917570, 10, 917571, 10, 917572, 10, 917573, 10, 917574, 10, 917575, 10, 917576, 10, 917577, 10, 917578, 10, 917579, 10, 917580, 10, 917581, 10, 983040, 2, 983042, 7, 983045, 7, 983048, 536870920, 983050, 536870913, 983051, 1, 983064, 536870913, 983065, 1, 983072, 536870914, 983073, 10, 983074, 4, 983075, 0, 983076, 536870916, 983077, 10, 983078, 4, 983079, 536870912, 983080, 536870912, 983081, 536870916, 983082, 10, 983083, 10, 983084, 2, 983095, 9, 983102, 536870914, 983103, 10, 983104, 10, 983105, 10, 983106, 10, 983107, 10, 983108, 10, 983109, 10, 983110, 10, 983111, 10, 983112, 10, 983113, 10, 983114, 10, 983115, 10, 983116, 10, 983117, 10, 1048576, 2, 1048578, 8, 1048581, 8, 1048584, 536870919, 1048586, 536870925, 1048587, 13, 1048600, 536870925, 1048601, 13, 1048604, 9, 1048608, 536870925, 1048609, 536870923, 1048610, 536870923, 1048611, 536870923, 1048612, 10, 1048613, 10, 1048614, 10, 1048615, 10, 1048616, 10, 1048617, 10, 1048618, 10, 1048619, 10, 1048620, 4, 1048621, 1, 1048630, 536870921, 1048631, 8, 1048638, 536870914, 1048639, 10, 1048640, 10, 1048641, 10, 1048642, 10, 1048643, 10, 1048644, 10, 1048645, 10, 1048646, 10, 1048647, 10, 1048648, 10, 1048649, 10, 1048650, 10, 1048651, 10, 1048652, 10, 1048653, 10, 1114112, 4, 1114113, 0, 1114114, 6, 1114115, 0, 1114116, 0, 1114117, 6, 1114118, 1, 1114120, 536870920, 1114128, 536870913, 1114129, 5, 1114130, 536870917, 1114131, 5, 1114132, 0, 1114133, 1, 1114140, 7, 1114141, 536870921, 1114148, 536870914, 1114149, 10, 1114150, 10, 1114151, 10, 1114152, 10, 1114153, 10, 1114154, 10, 1114155, 10, 1114156, 10, 1114157, 2, 1114166, 536870920, 1114167, 8, 1114174, 536870914, 1114175, 10, 1114176, 10, 1114177, 10, 1114178, 10, 1114179, 10, 1114180, 10, 1114181, 10, 1114182, 10, 1114183, 10, 1114184, 10, 1114185, 10, 1114186, 10, 1114187, 10, 1114188, 10, 1179648, 10, 1179649, 10, 1179650, 10, 1179651, 10, 1179652, 10, 1179653, 10, 1179654, 2, 1179656, 536870919, 1179663, 536870915, 1179665, 10, 1179666, 10, 1179667, 10, 1179668, 10, 1179669, 4, 1179670, 12, 1179675, 9, 1179676, 8, 1179677, 8, 1179684, 536870914, 1179685, 10, 1179686, 10, 1179687, 10, 1179688, 10, 1179689, 10, 1179690, 10, 1179691, 10, 1179692, 10, 1179693, 4, 1179694, 1, 1179701, 9, 1179702, 536870919, 1179703, 7, 1179710, 536870914, 1179711, 10, 1179712, 10, 1179713, 10, 1179714, 10, 1179715, 10, 1179716, 10, 1179717, 10, 1179718, 10, 1179719, 10, 1179720, 10, 1179721, 10, 1179722, 10, 1245184, 10, 1245185, 10, 1245186, 10, 1245187, 10, 1245188, 10, 1245189, 10, 1245190, 2, 1245192, 536870919, 1245199, 536870913, 1245200, 536870916, 1245201, 10, 1245202, 10, 1245203, 10, 1245204, 10, 1245205, 10, 1245207, 1, 1245211, 7, 1245212, 7, 1245213, 536870920, 1245220, 536870914, 1245221, 10, 1245222, 10, 1245223, 10, 1245224, 10, 1245225, 10, 1245226, 10, 1245227, 10, 1245228, 10, 1245229, 10, 1245230, 2, 1245237, 8, 1245238, 536870919, 1245239, 8, 1245240, 536870921, 1245246, 536870914, 1245247, 10, 1245248, 10, 1245249, 10, 1245250, 10, 1245251, 10, 1245252, 10, 1245253, 10, 1245254, 10, 1245255, 10, 1245256, 10, 1245257, 10, 1245258, 10, 1310720, 10, 1310721, 10, 1310722, 10, 1310723, 10, 1310724, 10, 1310725, 10, 1310726, 2, 1310728, 536870920, 1310730, 536870913, 1310731, 1, 1310734, 536870913, 1310735, 536870916, 1310736, 10, 1310737, 10, 1310738, 10, 1310739, 10, 1310740, 10, 1310741, 10, 1310742, 10, 1310743, 4, 1310744, 1, 1310747, 8, 1310748, 7, 1310749, 536870919, 1310756, 536870914, 1310757, 10, 1310758, 10, 1310759, 10, 1310760, 10, 1310761, 10, 1310762, 10, 1310763, 10, 1310764, 10, 1310765, 10, 1310766, 4, 1310767, 5, 1310768, 12, 1310773, 7, 1310774, 536870919, 1310775, 7, 1310776, 536870919, 1310782, 536870914, 1310783, 10, 1310784, 10, 1310785, 10, 1310786, 10, 1310787, 10, 1310788, 10, 1310789, 10, 1310790, 10, 1310791, 10, 1310792, 10, 1310793, 10, 1376256, 10, 1376257, 10, 1376258, 10, 1376259, 10, 1376260, 10, 1376261, 10, 1376262, 4, 1376263, 0, 1376264, 536870918, 1376265, 0, 1376266, 536870916, 1376267, 4, 1376268, 0, 1376269, 0, 1376270, 536870916, 1376271, 10, 1376272, 10, 1376273, 10, 1376274, 10, 1376275, 10, 1376276, 10, 1376277, 10, 1376278, 10, 1376279, 10, 1376280, 4, 1376281, 12, 1376283, 8, 1376284, 8, 1376285, 536870920, 1376287, 536870924, 1376288, 0, 1376289, 5, 1376290, 536870917, 1376291, 0, 1376292, 536870916, 1376293, 10, 1376294, 10, 1376295, 10, 1376296, 10, 1376297, 10, 1376298, 10, 1376299, 10, 1376300, 10, 1376301, 10, 1376302, 10, 1376303, 10, 1376305, 12, 1376309, 7, 1376310, 536870920, 1376311, 7, 1376312, 536870920, 1376318, 536870914, 1376319, 10, 1376320, 10, 1376321, 10, 1376322, 10, 1376323, 10, 1376324, 10, 1376325, 10, 1376326, 10, 1376327, 10, 1376328, 10, 1441792, 10, 1441793, 10, 1441794, 10, 1441795, 10, 1441796, 10, 1441797, 10, 1441798, 10, 1441799, 10, 1441800, 10, 1441801, 10, 1441802, 10, 1441803, 10, 1441804, 10, 1441805, 10, 1441806, 10, 1441807, 10, 1441808, 10, 1441809, 10, 1441810, 10, 1441811, 10, 1441812, 10, 1441813, 10, 1441814, 10, 1441815, 10, 1441816, 10, 1441818, 0, 1441819, 6, 1441820, 6, 1441821, 536870918, 1441822, 5, 1441824, 10, 1441825, 10, 1441826, 10, 1441827, 10, 1441828, 10, 1441829, 10, 1441830, 10, 1441831, 10, 1441832, 10, 1441833, 10, 1441834, 10, 1441835, 10, 1441836, 10, 1441837, 10, 1441838, 10, 1441839, 10, 1441840, 10, 1441842, 0, 1441843, 0, 1441844, 0, 1441845, 6, 1441846, 536870918, 1441847, 6, 1441848, 536870918, 1441849, 0, 1441850, 5, 1441851, 536870917, 1441852, 5, 1441853, 0, 1441854, 536870916, 1441855, 10, 1441856, 10, 1441857, 10, 1441858, 10, 1441859, 10, 1441860, 10, 1441861, 10, 1441862, 10, 1441863, 10, 1507328, 10, 1507329, 10, 1507330, 10, 1507331, 10, 1507332, 10, 1507333, 10, 1507334, 10, 1507335, 10, 1507336, 10, 1507337, 10, 1507338, 10, 1507339, 10, 1507340, 10, 1507341, 10, 1507342, 10, 1507343, 10, 1507344, 10, 1507345, 10, 1507346, 10, 1507347, 10, 1507348, 10, 1507349, 10, 1507350, 10, 1507351, 10, 1507352, 10, 1507353, 10, 1507354, 10, 1507355, 10, 1507356, 10, 1507357, 10, 1507358, 10, 1507359, 10, 1507360, 10, 1507361, 10, 1507362, 10, 1507363, 10, 1507364, 10, 1507365, 10, 1507366, 10, 1507367, 10, 1507368, 10, 1507369, 10, 1507370, 10, 1507371, 10, 1507372, 10, 1507373, 10, 1507374, 10, 1507375, 10, 1507376, 10, 1507377, 10, 1507378, 10, 1507379, 10, 1507380, 10, 1507381, 10, 1507382, 10, 1507383, 10, 1507384, 10, 1507385, 10, 1507386, 10, 1507387, 10, 1507388, 10, 1507389, 10, 1507390, 10, 1507391, 10, 1507392, 10, 1507393, 10, 1507394, 10, 1507395, 10, 1507396, 10, 1507397, 10, 1507398, 10, 1507399, 10, 1572864, 10, 1572865, 10, 1572866, 10, 1572867, 10, 1572868, 10, 1572869, 10, 1572870, 10, 1572871, 10, 1572872, 10, 1572873, 10, 1572874, 10, 1572875, 10, 1572876, 10, 1572877, 10, 1572878, 10, 1572879, 10, 1572880, 10, 1572881, 10, 1572882, 10, 1572883, 10, 1572884, 10, 1572885, 10, 1572886, 10, 1572887, 10, 1572888, 10, 1572889, 10, 1572890, 10, 1572891, 10, 1572892, 10, 1572893, 10, 1572894, 10, 1572895, 10, 1572896, 10, 1572897, 10, 1572898, 10, 1572899, 10, 1572900, 10, 1572901, 10, 1572902, 10, 1572903, 10, 1572904, 10, 1572905, 10, 1572906, 10, 1572907, 10, 1572908, 10, 1572909, 10, 1572910, 10, 1572911, 10, 1572912, 10, 1572913, 10, 1572914, 10, 1572915, 10, 1572916, 10, 1572917, 10, 1572918, 10, 1572919, 10, 1572920, 10, 1572921, 10, 1572922, 10, 1572923, 10, 1572924, 10, 1572925, 10, 1572926, 10, 1572927, 10, 1572928, 10, 1572929, 10, 1572930, 10, 1572931, 10, 1572932, 10, 1572933, 10, 1572934, 10, 1572935, 10, 1638400, 10, 1638401, 10, 1638402, 10, 1638403, 10, 1638404, 10, 1638405, 10, 1638406, 10, 1638407, 10, 1638408, 10, 1638409, 10, 1638410, 10, 1638411, 10, 1638412, 10, 1638413, 10, 1638414, 10, 1638415, 10, 1638416, 10, 1638417, 10, 1638418, 10, 1638419, 10, 1638420, 10, 1638421, 10, 1638422, 10, 1638423, 10, 1638424, 10, 1638425, 10, 1638426, 10, 1638427, 10, 1638428, 10, 1638429, 10, 1638430, 10, 1638431, 10, 1638432, 10, 1638433, 10, 1638434, 10, 1638435, 10, 1638436, 10, 1638437, 10, 1638438, 10, 1638439, 10, 1638440, 10, 1638441, 10, 1638442, 10, 1638443, 10, 1638444, 10, 1638445, 10, 1638446, 10, 1638447, 10, 1638448, 10, 1638449, 10, 1638450, 10, 1638451, 10, 1638452, 10, 1638453, 10, 1638454, 10, 1638455, 10, 1638456, 10, 1638457, 10, 1638458, 10, 1638459, 10, 1638460, 10, 1638461, 10, 1638462, 10, 1638463, 10, 1638464, 10, 1638465, 10, 1638466, 10, 1638467, 10, 1638468, 10, 1638469, 10, 1638470, 10, 1638471, 10, 1703952, 10, 1703953, 10, 1703954, 10, 1703955, 10, 1703956, 10, 1703957, 10, 1703958, 10, 1703959, 10, 1703960, 10, 1703961, 10, 1703962, 10, 1703963, 10, 1703964, 10, 1703965, 10, 1703966, 10, 1703967, 10, 1703968, 10, 1703969, 10, 1703970, 10, 1703971, 10, 1703972, 10, 1703973, 10, 1703974, 10, 1703975, 10, 1703976, 10, 1703977, 10, 1703978, 10, 1703979, 10, 1703980, 10, 1703981, 10, 1703982, 10, 1703983, 10, 1703984, 10, 1703985, 10, 1703986, 10, 1703987, 10, 1703988, 10, 1703989, 10, 1703990, 10, 1703991, 10, 1703992, 10, 1703993, 10, 1703994, 10, 1703995, 10, 1703996, 10, 1703997, 10, 1703998, 10, 1703999, 10, 1704000, 10, 1704001, 10, 1704002, 10, 1704003, 10, 1704004, 10, 1704005, 10, 1704006, 10, 1704007, 10, 1769488, 10, 1769489, 10, 1769490, 10, 1769491, 10, 1769492, 10, 1769493, 10, 1769494, 10, 1769495, 10, 1769496, 10, 1769497, 10, 1769498, 10, 1769499, 10, 1769500, 10, 1769501, 10, 1769502, 10, 1769503, 10, 1769504, 10, 1769505, 10, 1769506, 10, 1769507, 10, 1769508, 10, 1769509, 10, 1769510, 10, 1769511, 10, 1769512, 10, 1769513, 10, 1769514, 10, 1769515, 10, 1769516, 10, 1769517, 10, 1769518, 10, 1769519, 10, 1769520, 10, 1769521, 10, 1769522, 10, 1769523, 10, 1769524, 10, 1769525, 10, 1769526, 10, 1769527, 10, 1769528, 10, 1769529, 10, 1769530, 10, 1769531, 10, 1769532, 10, 1769533, 10, 1769534, 10, 1769535, 10, 1769536, 10, 1769537, 10, 1769538, 10, 1769539, 10, 1769540, 10, 1769541, 10 </int_array>
<dictionary shared="false">
<string> "_edit_lock_" </string>
<bool> True </bool>
@@ -280,6 +302,116 @@
</dictionary>
<resource resource_type="PackedScene" path="res://coin.xml"> </resource>
<vector2> 672, 1120 </vector2>
+ <dictionary shared="false">
+ <string> "__editor_plugin_states__" </string>
+ <dictionary shared="false">
+ <string> "Script" </string>
+ <dictionary shared="false">
+ <string> "current" </string>
+ <int> 2 </int>
+ <string> "sources" </string>
+ <array len="3" shared="false">
+ <string> "res://enemy.gd" </string>
+ <string> "res://player.gd" </string>
+ <string> "res://coin.gd" </string>
+ </array>
+ </dictionary>
+ <string> "2D" </string>
+ <dictionary shared="false">
+ <string> "pixel_snap" </string>
+ <bool> False </bool>
+ <string> "zoom" </string>
+ <real> 3.794776 </real>
+ <string> "ofs" </string>
+ <vector2> -34.3697, -21.6562 </vector2>
+ </dictionary>
+ <string> "3D" </string>
+ <dictionary shared="false">
+ <string> "fov" </string>
+ <real> 45 </real>
+ <string> "zfar" </string>
+ <real> 500 </real>
+ <string> "viewports" </string>
+ <array len="4" shared="false">
+ <dictionary shared="false">
+ <string> "distance" </string>
+ <real> 4 </real>
+ <string> "x_rot" </string>
+ <real> 0 </real>
+ <string> "y_rot" </string>
+ <real> 0 </real>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ </dictionary>
+ <dictionary shared="false">
+ <string> "distance" </string>
+ <real> 4 </real>
+ <string> "x_rot" </string>
+ <real> 0 </real>
+ <string> "y_rot" </string>
+ <real> 0 </real>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ </dictionary>
+ <dictionary shared="false">
+ <string> "distance" </string>
+ <real> 4 </real>
+ <string> "x_rot" </string>
+ <real> 0 </real>
+ <string> "y_rot" </string>
+ <real> 0 </real>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ </dictionary>
+ <dictionary shared="false">
+ <string> "distance" </string>
+ <real> 4 </real>
+ <string> "x_rot" </string>
+ <real> 0 </real>
+ <string> "y_rot" </string>
+ <real> 0 </real>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ </dictionary>
+ </array>
+ <string> "viewport_mode" </string>
+ <int> 1 </int>
+ <string> "default_light" </string>
+ <bool> True </bool>
+ <string> "show_grid" </string>
+ <bool> True </bool>
+ <string> "znear" </string>
+ <real> 0.1 </real>
+ <string> "show_origin" </string>
+ <bool> True </bool>
+ </dictionary>
+ </dictionary>
+ <string> "__editor_run_settings__" </string>
+ <dictionary shared="false">
+ <string> "custom_args" </string>
+ <string> "-l $scene" </string>
+ <string> "run_mode" </string>
+ <int> 0 </int>
+ </dictionary>
+ <string> "__editor_plugin_screen__" </string>
+ <string> "2D" </string>
+ </dictionary>
<vector2> 704, 1120 </vector2>
<vector2> 736, 1120 </vector2>
<vector2> 1120, 992 </vector2>
@@ -323,8 +455,247 @@
<vector2> 4172.75, 541.058 </vector2>
<resource resource_type="PackedScene" path="res://player.xml"> </resource>
<vector2> 251.684, 1045.6 </vector2>
+ <dictionary shared="false">
+ <string> "__editor_plugin_states__" </string>
+ <dictionary shared="false">
+ <string> "Script" </string>
+ <dictionary shared="false">
+ <string> "current" </string>
+ <int> 0 </int>
+ <string> "sources" </string>
+ <array len="1" shared="false">
+ <string> "res://player.gd" </string>
+ </array>
+ </dictionary>
+ <string> "2D" </string>
+ <dictionary shared="false">
+ <string> "pixel_snap" </string>
+ <bool> False </bool>
+ <string> "zoom" </string>
+ <real> 2.272073 </real>
+ <string> "use_snap" </string>
+ <bool> False </bool>
+ <string> "ofs" </string>
+ <vector2> -181.946, -86.2812 </vector2>
+ <string> "snap" </string>
+ <int> 10 </int>
+ </dictionary>
+ <string> "3D" </string>
+ <dictionary shared="false">
+ <string> "viewports" </string>
+ <array len="4" shared="false">
+ <dictionary shared="false">
+ <string> "distance" </string>
+ <real> 4 </real>
+ <string> "x_rot" </string>
+ <real> 0 </real>
+ <string> "y_rot" </string>
+ <real> 0 </real>
+ <string> "listener" </string>
+ <bool> True </bool>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ </dictionary>
+ <dictionary shared="false">
+ <string> "distance" </string>
+ <real> 4 </real>
+ <string> "x_rot" </string>
+ <real> 0 </real>
+ <string> "y_rot" </string>
+ <real> 0 </real>
+ <string> "listener" </string>
+ <bool> False </bool>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ </dictionary>
+ <dictionary shared="false">
+ <string> "distance" </string>
+ <real> 4 </real>
+ <string> "x_rot" </string>
+ <real> 0 </real>
+ <string> "y_rot" </string>
+ <real> 0 </real>
+ <string> "listener" </string>
+ <bool> False </bool>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ </dictionary>
+ <dictionary shared="false">
+ <string> "distance" </string>
+ <real> 4 </real>
+ <string> "x_rot" </string>
+ <real> 0 </real>
+ <string> "y_rot" </string>
+ <real> 0 </real>
+ <string> "listener" </string>
+ <bool> False </bool>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ </dictionary>
+ </array>
+ <string> "zfar" </string>
+ <real> 500 </real>
+ <string> "deflight_rot_y" </string>
+ <real> 0.628319 </real>
+ <string> "fov" </string>
+ <real> 45 </real>
+ <string> "default_light" </string>
+ <bool> True </bool>
+ <string> "viewport_mode" </string>
+ <int> 1 </int>
+ <string> "ambient_light_color" </string>
+ <color> 0.15, 0.15, 0.15, 1 </color>
+ <string> "show_grid" </string>
+ <bool> True </bool>
+ <string> "znear" </string>
+ <real> 0.1 </real>
+ <string> "show_origin" </string>
+ <bool> True </bool>
+ <string> "deflight_rot_x" </string>
+ <real> 0.942478 </real>
+ <string> "default_srgb" </string>
+ <bool> False </bool>
+ </dictionary>
+ </dictionary>
+ <string> "__editor_run_settings__" </string>
+ <dictionary shared="false">
+ <string> "custom_args" </string>
+ <string> "-l $scene" </string>
+ <string> "run_mode" </string>
+ <int> 0 </int>
+ </dictionary>
+ <string> "__editor_plugin_screen__" </string>
+ <string> "Script" </string>
+ </dictionary>
<resource resource_type="PackedScene" path="res://moving_platform.xml"> </resource>
<vector2> 1451.86, 742.969 </vector2>
+ <dictionary shared="false">
+ <string> "__editor_plugin_states__" </string>
+ <dictionary shared="false">
+ <string> "Script" </string>
+ <dictionary shared="false">
+ <string> "current" </string>
+ <int> 0 </int>
+ <string> "sources" </string>
+ <array len="4" shared="false">
+ <string> "res://moving_platform.gd" </string>
+ <string> "res://enemy.gd" </string>
+ <string> "res://player.gd" </string>
+ <string> "res://coin.gd" </string>
+ </array>
+ </dictionary>
+ <string> "2D" </string>
+ <dictionary shared="false">
+ <string> "pixel_snap" </string>
+ <bool> False </bool>
+ <string> "zoom" </string>
+ <real> 1.360373 </real>
+ <string> "ofs" </string>
+ <vector2> -210.652, -172.81 </vector2>
+ </dictionary>
+ <string> "3D" </string>
+ <dictionary shared="false">
+ <string> "fov" </string>
+ <real> 400 </real>
+ <string> "zfar" </string>
+ <real> 500 </real>
+ <string> "viewports" </string>
+ <array len="4" shared="false">
+ <dictionary shared="false">
+ <string> "distance" </string>
+ <real> 4 </real>
+ <string> "x_rot" </string>
+ <real> 0 </real>
+ <string> "y_rot" </string>
+ <real> 0 </real>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ </dictionary>
+ <dictionary shared="false">
+ <string> "distance" </string>
+ <real> 4 </real>
+ <string> "x_rot" </string>
+ <real> 0 </real>
+ <string> "y_rot" </string>
+ <real> 0 </real>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ </dictionary>
+ <dictionary shared="false">
+ <string> "distance" </string>
+ <real> 4 </real>
+ <string> "x_rot" </string>
+ <real> 0 </real>
+ <string> "y_rot" </string>
+ <real> 0 </real>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ </dictionary>
+ <dictionary shared="false">
+ <string> "distance" </string>
+ <real> 4 </real>
+ <string> "x_rot" </string>
+ <real> 0 </real>
+ <string> "y_rot" </string>
+ <real> 0 </real>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ </dictionary>
+ </array>
+ <string> "viewport_mode" </string>
+ <int> 1 </int>
+ <string> "default_light" </string>
+ <bool> True </bool>
+ <string> "show_grid" </string>
+ <bool> True </bool>
+ <string> "znear" </string>
+ <real> 0.1 </real>
+ <string> "show_origin" </string>
+ <bool> True </bool>
+ </dictionary>
+ </dictionary>
+ <string> "__editor_run_settings__" </string>
+ <dictionary shared="false">
+ <string> "custom_args" </string>
+ <string> "-l $scene" </string>
+ <string> "run_mode" </string>
+ <int> 0 </int>
+ </dictionary>
+ <string> "__editor_plugin_screen__" </string>
+ <string> "2D" </string>
+ </dictionary>
<vector2> 0, 140 </vector2>
<real> 5 </real>
<vector2> 624.824, 545.544 </vector2>
@@ -334,10 +705,217 @@
<vector2> 450, 0 </vector2>
<resource resource_type="PackedScene" path="res://seesaw.xml"> </resource>
<vector2> 2402.79, 849.52 </vector2>
+ <dictionary shared="false">
+ <string> "__editor_plugin_states__" </string>
+ <dictionary shared="false">
+ <string> "2D" </string>
+ <dictionary shared="false">
+ <string> "pixel_snap" </string>
+ <bool> False </bool>
+ <string> "zoom" </string>
+ <real> 2.050547 </real>
+ <string> "ofs" </string>
+ <vector2> -116.979, -109.897 </vector2>
+ </dictionary>
+ <string> "3D" </string>
+ <dictionary shared="false">
+ <string> "fov" </string>
+ <real> 400 </real>
+ <string> "zfar" </string>
+ <real> 500 </real>
+ <string> "viewports" </string>
+ <array len="4" shared="false">
+ <dictionary shared="false">
+ <string> "distance" </string>
+ <real> 4 </real>
+ <string> "x_rot" </string>
+ <real> 0 </real>
+ <string> "y_rot" </string>
+ <real> 0 </real>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ </dictionary>
+ <dictionary shared="false">
+ <string> "distance" </string>
+ <real> 4 </real>
+ <string> "x_rot" </string>
+ <real> 0 </real>
+ <string> "y_rot" </string>
+ <real> 0 </real>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ </dictionary>
+ <dictionary shared="false">
+ <string> "distance" </string>
+ <real> 4 </real>
+ <string> "x_rot" </string>
+ <real> 0 </real>
+ <string> "y_rot" </string>
+ <real> 0 </real>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ </dictionary>
+ <dictionary shared="false">
+ <string> "distance" </string>
+ <real> 4 </real>
+ <string> "x_rot" </string>
+ <real> 0 </real>
+ <string> "y_rot" </string>
+ <real> 0 </real>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ </dictionary>
+ </array>
+ <string> "viewport_mode" </string>
+ <int> 1 </int>
+ <string> "default_light" </string>
+ <bool> True </bool>
+ <string> "show_grid" </string>
+ <bool> True </bool>
+ <string> "znear" </string>
+ <real> 0.1 </real>
+ <string> "show_origin" </string>
+ <bool> True </bool>
+ </dictionary>
+ </dictionary>
+ <string> "__editor_run_settings__" </string>
+ <dictionary shared="false">
+ <string> "custom_args" </string>
+ <string> "-l $scene" </string>
+ <string> "run_mode" </string>
+ <int> 0 </int>
+ </dictionary>
+ <string> "__editor_plugin_screen__" </string>
+ <string> "2D" </string>
+ </dictionary>
<resource resource_type="AudioStream" path="res://music.ogg"> </resource>
<real> 2 </real>
<resource resource_type="PackedScene" path="res://enemy.xml"> </resource>
<vector2> 834.664, 1309.6 </vector2>
+ <dictionary shared="false">
+ <string> "__editor_plugin_states__" </string>
+ <dictionary shared="false">
+ <string> "Script" </string>
+ <dictionary shared="false">
+ <string> "current" </string>
+ <int> 0 </int>
+ <string> "sources" </string>
+ <array len="1" shared="false">
+ <string> "res://enemy.gd" </string>
+ </array>
+ </dictionary>
+ <string> "2D" </string>
+ <dictionary shared="false">
+ <string> "pixel_snap" </string>
+ <bool> False </bool>
+ <string> "zoom" </string>
+ <real> 1.108033 </real>
+ <string> "ofs" </string>
+ <vector2> -227.625, -197.9 </vector2>
+ </dictionary>
+ <string> "3D" </string>
+ <dictionary shared="false">
+ <string> "fov" </string>
+ <real> 45 </real>
+ <string> "zfar" </string>
+ <real> 500 </real>
+ <string> "viewports" </string>
+ <array len="4" shared="false">
+ <dictionary shared="false">
+ <string> "distance" </string>
+ <real> 4 </real>
+ <string> "x_rot" </string>
+ <real> 0 </real>
+ <string> "y_rot" </string>
+ <real> 0 </real>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ </dictionary>
+ <dictionary shared="false">
+ <string> "distance" </string>
+ <real> 4 </real>
+ <string> "x_rot" </string>
+ <real> 0 </real>
+ <string> "y_rot" </string>
+ <real> 0 </real>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ </dictionary>
+ <dictionary shared="false">
+ <string> "distance" </string>
+ <real> 4 </real>
+ <string> "x_rot" </string>
+ <real> 0 </real>
+ <string> "y_rot" </string>
+ <real> 0 </real>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ </dictionary>
+ <dictionary shared="false">
+ <string> "distance" </string>
+ <real> 4 </real>
+ <string> "x_rot" </string>
+ <real> 0 </real>
+ <string> "y_rot" </string>
+ <real> 0 </real>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ </dictionary>
+ </array>
+ <string> "viewport_mode" </string>
+ <int> 1 </int>
+ <string> "default_light" </string>
+ <bool> True </bool>
+ <string> "show_grid" </string>
+ <bool> True </bool>
+ <string> "znear" </string>
+ <real> 0.1 </real>
+ <string> "show_origin" </string>
+ <bool> True </bool>
+ </dictionary>
+ </dictionary>
+ <string> "__editor_run_settings__" </string>
+ <dictionary shared="false">
+ <string> "custom_args" </string>
+ <string> "-l $scene" </string>
+ <string> "run_mode" </string>
+ <int> 0 </int>
+ </dictionary>
+ <string> "__editor_plugin_screen__" </string>
+ <string> "2D" </string>
+ </dictionary>
<vector2> 707.665, 1225.05 </vector2>
<vector2> 1125.21, 1053.06 </vector2>
<vector2> 1292.11, 1059.24 </vector2>
@@ -349,19 +927,78 @@
<vector2> 3546.2, 1356.19 </vector2>
<vector2> 2406.63, 815.115 </vector2>
<resource resource_type="PackedScene" path="res://parallax_bg.xml"> </resource>
+ <dictionary shared="false">
+ <string> "__editor_plugin_states__" </string>
+ <dictionary shared="false">
+ <string> "Script" </string>
+ <dictionary shared="false">
+ <string> "current" </string>
+ <int> 0 </int>
+ <string> "sources" </string>
+ <array len="4" shared="false">
+ <string> "res://moving_platform.gd" </string>
+ <string> "res://enemy.gd" </string>
+ <string> "res://player.gd" </string>
+ <string> "res://coin.gd" </string>
+ </array>
+ </dictionary>
+ <string> "2D" </string>
+ <dictionary shared="false">
+ <string> "zoom" </string>
+ <real> 1 </real>
+ <string> "ofs" </string>
+ <vector2> -5, -25 </vector2>
+ </dictionary>
+ <string> "3D" </string>
+ <dictionary shared="false">
+ <string> "zfar" </string>
+ <real> 500 </real>
+ <string> "fov" </string>
+ <real> 45 </real>
+ <string> "window_mode" </string>
+ <int> 0 </int>
+ <string> "window_0" </string>
+ <dictionary shared="false">
+ <string> "distance" </string>
+ <real> 4 </real>
+ <string> "x_rot" </string>
+ <real> 0.337 </real>
+ <string> "default_light" </string>
+ <bool> True </bool>
+ <string> "y_rot" </string>
+ <real> -0.575 </real>
+ <string> "show_grid" </string>
+ <bool> True </bool>
+ <string> "show_origin" </string>
+ <bool> True </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ </dictionary>
+ <string> "znear" </string>
+ <real> 0.1 </real>
+ </dictionary>
+ </dictionary>
+ <string> "__editor_run_settings__" </string>
+ <dictionary shared="false">
+ <string> "custom_args" </string>
+ <string> "-l $scene" </string>
+ <string> "run_mode" </string>
+ <int> 0 </int>
+ </dictionary>
+ <string> "__editor_plugin_screen__" </string>
+ <string> "2D" </string>
+ </dictionary>
<real> 12 </real>
<real> -202 </real>
<real> 358 </real>
<real> -10 </real>
- <int> 2 </int>
<real> 7 </real>
<real> 14.769231 </real>
- <string> "This is a simple demo on how to make a platformer game with Godot.&#22;This version uses physics and the 2D physics engine for motion and collision.&#22;&#22;The demo also shows the benefits of using the scene system, where coins,&#22;enemies and the player are edited separatedly and instanced in the stage.&#22;&#22;To edit the base tiles for the tileset, open the tileset_edit.xml file and follow &#22;instructions.&#22;" </string>
- <int> 0 </int>
+ <string> "This is a simple demo on how to make a platformer game with Godot.&quot;This version uses physics and the 2D physics engine for motion and collision.&quot;&quot;The demo also shows the benefits of using the scene system, where coins,&quot;enemies and the player are edited separatedly and instanced in the stage.&quot;&quot;To edit the base tiles for the tileset, open the tileset_edit.xml file and follow &quot;instructions.&quot;" </string>
<real> -1 </real>
</array>
<string> "nodes" </string>
- <int_array len="708"> -1, -1, 1, 0, -1, 2, 2, 0, 3, 1, 0, 0, 0, 5, 4, -1, 16, 2, 0, 6, 2, 7, 3, 8, 3, 9, 4, 10, 5, 11, 6, 12, 7, 13, 8, 14, 9, 15, 10, 16, 11, 17, 3, 18, 6, 19, 12, 3, 13, 0, 0, 0, 1, 20, -1, 2, 2, 0, 3, 14, 0, 2, 0, 22, 21, 15, 1, 10, 16, 0, 2, 0, 22, 23, 15, 1, 10, 17, 0, 2, 0, 22, 24, 15, 1, 10, 18, 0, 2, 0, 22, 25, 15, 1, 10, 19, 0, 2, 0, 22, 26, 15, 1, 10, 20, 0, 2, 0, 22, 27, 15, 1, 10, 21, 0, 2, 0, 22, 28, 15, 1, 10, 22, 0, 2, 0, 22, 29, 15, 1, 10, 23, 0, 2, 0, 22, 30, 15, 1, 10, 24, 0, 2, 0, 22, 31, 15, 1, 10, 25, 0, 2, 0, 22, 32, 15, 1, 10, 26, 0, 2, 0, 22, 33, 15, 1, 10, 27, 0, 2, 0, 22, 34, 15, 1, 10, 28, 0, 2, 0, 22, 35, 15, 1, 10, 29, 0, 2, 0, 22, 36, 15, 1, 10, 30, 0, 2, 0, 22, 37, 15, 1, 10, 31, 0, 2, 0, 22, 38, 15, 1, 10, 32, 0, 2, 0, 22, 39, 15, 1, 10, 33, 0, 2, 0, 22, 40, 15, 1, 10, 34, 0, 2, 0, 22, 41, 15, 1, 10, 35, 0, 2, 0, 22, 42, 15, 1, 10, 36, 0, 2, 0, 22, 43, 15, 1, 10, 37, 0, 2, 0, 22, 44, 15, 1, 10, 38, 0, 2, 0, 22, 45, 15, 1, 10, 39, 0, 2, 0, 22, 46, 15, 1, 10, 40, 0, 2, 0, 22, 47, 15, 1, 10, 41, 0, 2, 0, 22, 48, 15, 1, 10, 42, 0, 2, 0, 22, 49, 15, 1, 10, 43, 0, 2, 0, 22, 50, 15, 1, 10, 44, 0, 2, 0, 22, 51, 15, 1, 10, 45, 0, 2, 0, 22, 52, 15, 1, 10, 46, 0, 2, 0, 22, 53, 15, 1, 10, 47, 0, 2, 0, 22, 54, 15, 1, 10, 48, 0, 2, 0, 22, 55, 15, 1, 10, 49, 0, 2, 0, 22, 56, 15, 1, 10, 50, 0, 2, 0, 22, 57, 15, 1, 10, 51, 0, 2, 0, 22, 58, 15, 1, 10, 52, 0, 2, 0, 22, 59, 15, 1, 10, 53, 0, 2, 0, 22, 60, 15, 1, 10, 54, 0, 2, 0, 22, 61, 15, 1, 10, 55, 0, 2, 0, 22, 62, 15, 1, 10, 56, 0, 2, 0, 22, 63, 15, 1, 10, 57, 0, 0, 0, 65, 64, 58, 1, 10, 59, 0, 0, 0, 1, 66, -1, 1, 2, 0, 0, 46, 0, 68, 67, 60, 3, 10, 61, 69, 62, 70, 63, 0, 46, 0, 68, 71, 60, 3, 10, 64, 69, 65, 70, 66, 0, 46, 0, 68, 72, 60, 3, 10, 67, 69, 68, 70, 66, 0, 46, 0, 68, 73, 69, 1, 10, 70, 0, 0, 0, 75, 74, -1, 7, 2, 0, 76, 71, 77, 4, 78, 2, 79, 72, 80, 2, 81, 4, 0, 0, 0, 1, 82, -1, 1, 2, 0, 0, 52, 0, 65, 83, 73, 1, 10, 74, 0, 52, 0, 65, 84, 73, 1, 10, 75, 0, 52, 0, 65, 85, 73, 1, 10, 76, 0, 52, 0, 65, 86, 73, 1, 10, 77, 0, 52, 0, 65, 87, 73, 1, 10, 78, 0, 52, 0, 65, 88, 73, 1, 10, 79, 0, 52, 0, 65, 89, 73, 1, 10, 80, 0, 52, 0, 65, 90, 73, 1, 10, 81, 0, 52, 0, 65, 91, 73, 1, 10, 82, 0, 52, 0, 65, 92, 73, 1, 10, 83, 0, 52, 0, 65, 93, 73, 1, 10, 84, 0, 0, 0, 95, 94, 85, 0, 0, 0, 0, 96, 96, -1, 30, 2, 0, 6, 2, 7, 3, 8, 3, 9, 4, 97, 86, 98, 87, 99, 88, 100, 89, 101, 0, 102, 0, 103, 0, 104, 0, 105, 2, 106, 2, 107, 90, 108, 3, 109, 6, 110, 91, 111, 3, 112, 92, 113, 6, 114, 4, 115, 4, 116, 93, 117, 94, 118, 94, 119, 2, 120, 4, 121, 95, 0 </int_array>
+ <int_array len="950"> -1, -1, 1, 0, -1, 2, 2, 0, 3, 1, 0, 0, 0, 5, 4, -1, 19, 2, 0, 6, 2, 7, 3, 8, 3, 9, 4, 10, 5, 11, 6, 12, 7, 13, 8, 14, 9, 15, 10, 16, 11, 17, 12, 18, 13, 19, 3, 20, 6, 21, 14, 22, 15, 3, 16, 0, 0, 0, 1, 23, -1, 2, 2, 0, 3, 17, 0, 2, 0, 25, 24, 18, 3, 2, 0, 10, 19, 3, 20, 0, 2, 0, 25, 26, 18, 3, 2, 0, 10, 21, 3, 20, 0, 2, 0, 25, 27, 18, 3, 2, 0, 10, 22, 3, 20, 0, 2, 0, 25, 28, 18, 3, 2, 0, 10, 23, 3, 20, 0, 2, 0, 25, 29, 18, 3, 2, 0, 10, 24, 3, 20, 0, 2, 0, 25, 30, 18, 3, 2, 0, 10, 25, 3, 20, 0, 2, 0, 25, 31, 18, 3, 2, 0, 10, 26, 3, 20, 0, 2, 0, 25, 32, 18, 3, 2, 0, 10, 27, 3, 20, 0, 2, 0, 25, 33, 18, 3, 2, 0, 10, 28, 3, 20, 0, 2, 0, 25, 34, 18, 3, 2, 0, 10, 29, 3, 20, 0, 2, 0, 25, 35, 18, 3, 2, 0, 10, 30, 3, 20, 0, 2, 0, 25, 36, 18, 3, 2, 0, 10, 31, 3, 20, 0, 2, 0, 25, 37, 18, 3, 2, 0, 10, 32, 3, 20, 0, 2, 0, 25, 38, 18, 3, 2, 0, 10, 33, 3, 20, 0, 2, 0, 25, 39, 18, 3, 2, 0, 10, 34, 3, 20, 0, 2, 0, 25, 40, 18, 3, 2, 0, 10, 35, 3, 20, 0, 2, 0, 25, 41, 18, 3, 2, 0, 10, 36, 3, 20, 0, 2, 0, 25, 42, 18, 3, 2, 0, 10, 37, 3, 20, 0, 2, 0, 25, 43, 18, 3, 2, 0, 10, 38, 3, 20, 0, 2, 0, 25, 44, 18, 3, 2, 0, 10, 39, 3, 20, 0, 2, 0, 25, 45, 18, 3, 2, 0, 10, 40, 3, 20, 0, 2, 0, 25, 46, 18, 3, 2, 0, 10, 41, 3, 20, 0, 2, 0, 25, 47, 18, 3, 2, 0, 10, 42, 3, 20, 0, 2, 0, 25, 48, 18, 3, 2, 0, 10, 43, 3, 20, 0, 2, 0, 25, 49, 18, 3, 2, 0, 10, 44, 3, 20, 0, 2, 0, 25, 50, 18, 3, 2, 0, 10, 45, 3, 20, 0, 2, 0, 25, 51, 18, 3, 2, 0, 10, 46, 3, 20, 0, 2, 0, 25, 52, 18, 3, 2, 0, 10, 47, 3, 20, 0, 2, 0, 25, 53, 18, 3, 2, 0, 10, 48, 3, 20, 0, 2, 0, 25, 54, 18, 3, 2, 0, 10, 49, 3, 20, 0, 2, 0, 25, 55, 18, 3, 2, 0, 10, 50, 3, 20, 0, 2, 0, 25, 56, 18, 3, 2, 0, 10, 51, 3, 20, 0, 2, 0, 25, 57, 18, 3, 2, 0, 10, 52, 3, 20, 0, 2, 0, 25, 58, 18, 3, 2, 0, 10, 53, 3, 20, 0, 2, 0, 25, 59, 18, 3, 2, 0, 10, 54, 3, 20, 0, 2, 0, 25, 60, 18, 3, 2, 0, 10, 55, 3, 20, 0, 2, 0, 25, 61, 18, 3, 2, 0, 10, 56, 3, 20, 0, 2, 0, 25, 62, 18, 3, 2, 0, 10, 57, 3, 20, 0, 2, 0, 25, 63, 18, 3, 2, 0, 10, 58, 3, 20, 0, 2, 0, 25, 64, 18, 3, 2, 0, 10, 59, 3, 20, 0, 2, 0, 25, 65, 18, 3, 2, 0, 10, 60, 3, 20, 0, 2, 0, 25, 66, 18, 3, 2, 0, 10, 61, 3, 20, 0, 0, 0, 68, 67, 62, 3, 2, 0, 10, 63, 3, 64, 0, 0, 0, 1, 69, -1, 1, 2, 0, 0, 46, 0, 71, 70, 65, 5, 2, 0, 10, 66, 3, 67, 72, 68, 73, 69, 0, 46, 0, 71, 74, 65, 5, 2, 0, 10, 70, 3, 67, 72, 71, 73, 72, 0, 46, 0, 71, 75, 65, 5, 2, 0, 10, 73, 3, 67, 72, 74, 73, 72, 0, 46, 0, 71, 76, 75, 3, 2, 0, 10, 76, 3, 77, 0, 0, 0, 78, 77, -1, 7, 2, 0, 79, 78, 80, 4, 81, 2, 82, 79, 83, 2, 84, 4, 0, 0, 0, 1, 85, -1, 1, 2, 0, 0, 52, 0, 68, 86, 80, 3, 2, 0, 10, 81, 3, 82, 0, 52, 0, 68, 87, 80, 3, 2, 0, 10, 83, 3, 82, 0, 52, 0, 68, 88, 80, 3, 2, 0, 10, 84, 3, 82, 0, 52, 0, 68, 89, 80, 3, 2, 0, 10, 85, 3, 82, 0, 52, 0, 68, 90, 80, 3, 2, 0, 10, 86, 3, 82, 0, 52, 0, 68, 91, 80, 3, 2, 0, 10, 87, 3, 82, 0, 52, 0, 68, 92, 80, 3, 2, 0, 10, 88, 3, 82, 0, 52, 0, 68, 93, 80, 3, 2, 0, 10, 89, 3, 82, 0, 52, 0, 68, 94, 80, 3, 2, 0, 10, 90, 3, 82, 0, 52, 0, 68, 95, 80, 3, 2, 0, 10, 91, 3, 82, 0, 52, 0, 68, 96, 80, 3, 2, 0, 10, 92, 3, 82, 0, 0, 0, 98, 97, 93, 2, 2, 0, 3, 94, 0, 0, 0, 99, 99, -1, 30, 2, 0, 6, 2, 7, 3, 8, 3, 9, 4, 100, 95, 101, 96, 102, 97, 103, 98, 104, 0, 105, 0, 106, 0, 107, 0, 108, 2, 109, 2, 110, 13, 111, 3, 112, 6, 113, 99, 114, 3, 115, 100, 116, 6, 117, 4, 118, 4, 119, 101, 120, 8, 121, 8, 122, 2, 123, 4, 124, 102, 0 </int_array>
<string> "conns" </string>
<int_array len="0"> </int_array>
</dictionary>
diff --git a/demos/2d/polygon_path_finder_demo/.fscache b/demos/2d/polygon_path_finder_demo/.fscache
new file mode 100644
index 0000000000..f699ca5849
--- /dev/null
+++ b/demos/2d/polygon_path_finder_demo/.fscache
@@ -0,0 +1,4 @@
+::res://::1421147952
+icon.png::ImageTexture::1420046079::
+new_scene_poly_with_holes.scn::PackedScene::1421147952::
+polygonpathfinder.gd::GDScript::1421146502::
diff --git a/demos/2d/polygon_path_finder_demo/engine.cfg b/demos/2d/polygon_path_finder_demo/engine.cfg
new file mode 100644
index 0000000000..41c4adf701
--- /dev/null
+++ b/demos/2d/polygon_path_finder_demo/engine.cfg
@@ -0,0 +1,5 @@
+[application]
+
+name="polygon_path_finder_demo"
+main_scene="res://new_scene_poly_with_holes.scn"
+icon="icon.png"
diff --git a/demos/2d/polygon_path_finder_demo/icon.png b/demos/2d/polygon_path_finder_demo/icon.png
new file mode 100644
index 0000000000..0c422e37b0
--- /dev/null
+++ b/demos/2d/polygon_path_finder_demo/icon.png
Binary files differ
diff --git a/demos/2d/polygon_path_finder_demo/icon.png.flags b/demos/2d/polygon_path_finder_demo/icon.png.flags
new file mode 100644
index 0000000000..dbef2209e8
--- /dev/null
+++ b/demos/2d/polygon_path_finder_demo/icon.png.flags
@@ -0,0 +1 @@
+gen_mipmaps=true
diff --git a/demos/2d/polygon_path_finder_demo/new_scene_poly_with_holes.scn b/demos/2d/polygon_path_finder_demo/new_scene_poly_with_holes.scn
new file mode 100644
index 0000000000..07838be41e
--- /dev/null
+++ b/demos/2d/polygon_path_finder_demo/new_scene_poly_with_holes.scn
Binary files differ
diff --git a/demos/2d/polygon_path_finder_demo/polygonpathfinder.gd b/demos/2d/polygon_path_finder_demo/polygonpathfinder.gd
new file mode 100644
index 0000000000..a0e71dd127
--- /dev/null
+++ b/demos/2d/polygon_path_finder_demo/polygonpathfinder.gd
@@ -0,0 +1,80 @@
+
+extends Spatial
+
+func _ready():
+ var pf = PolygonPathFinder.new()
+
+ var points = Vector2Array()
+ var connections = IntArray()
+
+ # poly 1
+ points.push_back(Vector2(0, 0)) #0
+ points.push_back(Vector2(10, 0)) #1
+ points.push_back(Vector2(10, 10)) #2
+ points.push_back(Vector2(0, 10)) #3
+
+ connections.push_back(0) # connect vertex 0 ...
+ connections.push_back(1) # ... to 1
+ drawLine(points[0], points[1], get_node("/root/Spatial/Polys"))
+ connections.push_back(1) # connect vertex 1 ...
+ connections.push_back(2) # ... to 2
+ drawLine(points[1], points[2], get_node("/root/Spatial/Polys"))
+ connections.push_back(2) # etc.
+ connections.push_back(3)
+ drawLine(points[2], points[3], get_node("/root/Spatial/Polys"))
+ connections.push_back(3) # connect vertex 3 ...
+ connections.push_back(0) # back to vertex 0, to close the polygon
+ drawLine(points[3], points[0], get_node("/root/Spatial/Polys"))
+
+ # poly 2, as obstacle inside poly 1
+ points.push_back(Vector2(2, 0.5)) #4
+ points.push_back(Vector2(4, 0.5)) #5
+ points.push_back(Vector2(4, 9.5)) #6
+ points.push_back(Vector2(2, 9.5)) #7
+
+ connections.push_back(4)
+ connections.push_back(5)
+ drawLine(points[4], points[5], get_node("/root/Spatial/Polys"))
+ connections.push_back(5)
+ connections.push_back(6)
+ drawLine(points[5], points[6], get_node("/root/Spatial/Polys"))
+ connections.push_back(6)
+ connections.push_back(7)
+ drawLine(points[6], points[7], get_node("/root/Spatial/Polys"))
+ connections.push_back(7)
+ connections.push_back(4)
+ drawLine(points[7], points[4], get_node("/root/Spatial/Polys"))
+
+
+ print("points: ",points)
+ print("connections: ",connections)
+
+ pf.setup(points, connections)
+
+ var path = pf.find_path(Vector2(1, 5), Vector2(8, 5))
+
+ var lastStep = null
+ print("path: ",path)
+ for step in path:
+ print("step: ",step)
+ if (lastStep != null):
+ var currPathSegment = Vector2Array()
+ drawLine(lastStep, step, get_node("/root/Spatial/Path"))
+ lastStep = step
+
+
+
+func drawLine(pointA, pointB, immediateGeo):
+ var drawPosY = 0.1
+ var im = immediateGeo
+
+ im.begin(Mesh.PRIMITIVE_POINTS, null)
+ im.add_vertex(Vector3(pointA.x, drawPosY, pointA.y))
+ im.add_vertex(Vector3(pointB.x, drawPosY, pointB.y))
+ im.end()
+ im.begin(Mesh.PRIMITIVE_LINE_STRIP, null)
+ im.add_vertex(Vector3(pointA.x, drawPosY, pointA.y))
+ im.add_vertex(Vector3(pointB.x, drawPosY, pointB.y))
+ im.end()
+
+
diff --git a/drivers/gl_context/context_gl.cpp b/drivers/gl_context/context_gl.cpp
index 77a94f9333..82195cc6f6 100644
--- a/drivers/gl_context/context_gl.cpp
+++ b/drivers/gl_context/context_gl.cpp
@@ -12,7 +12,7 @@
#include "context_gl.h"
-#if defined(OPENGL_ENABLED) || defined(LEGACYGL_ENABLED) || defined(GLES2_ENABLED) || defined(GLES1_ENABLED)
+#if defined(OPENGL_ENABLED) || defined(GLES2_ENABLED)
diff --git a/drivers/gl_context/context_gl.h b/drivers/gl_context/context_gl.h
index 4c3d863e87..392f8341ae 100644
--- a/drivers/gl_context/context_gl.h
+++ b/drivers/gl_context/context_gl.h
@@ -29,7 +29,7 @@
#ifndef CONTEXT_GL_H
#define CONTEXT_GL_H
-#if defined(OPENGL_ENABLED) || defined(LEGACYGL_ENABLED) || defined(GLES2_ENABLED) || defined(GLES1_ENABLED)
+#if defined(OPENGL_ENABLED) || defined(GLES2_ENABLED)
#include "typedefs.h"
diff --git a/drivers/gles1/SCsub b/drivers/gles1/SCsub
deleted file mode 100644
index 6a3e474eae..0000000000
--- a/drivers/gles1/SCsub
+++ /dev/null
@@ -1,5 +0,0 @@
-Import('env')
-Export('env');
-
-env.add_source_files(env.drivers_sources,"*.cpp")
-
diff --git a/drivers/gles1/rasterizer_gles1.cpp b/drivers/gles1/rasterizer_gles1.cpp
deleted file mode 100644
index 902c105d64..0000000000
--- a/drivers/gles1/rasterizer_gles1.cpp
+++ /dev/null
@@ -1,5986 +0,0 @@
-/*************************************************************************/
-/* rasterizer_gles1.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* http://www.godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-#ifdef GLES1_ENABLED
-
-#include "rasterizer_gles1.h"
-#include "os/os.h"
-#include "globals.h"
-#include <stdio.h>
-#include "drivers/gl_context/context_gl.h"
-#include "servers/visual/shader_language.h"
-#include "servers/visual/particle_system_sw.h"
-#include "gl_context/context_gl.h"
-#include <string.h>
-
-_FORCE_INLINE_ static void _gl_load_transform(const Transform& tr) {
-
- GLfloat matrix[16]={ /* build a 16x16 matrix */
- tr.basis.elements[0][0],
- tr.basis.elements[1][0],
- tr.basis.elements[2][0],
- 0,
- tr.basis.elements[0][1],
- tr.basis.elements[1][1],
- tr.basis.elements[2][1],
- 0,
- tr.basis.elements[0][2],
- tr.basis.elements[1][2],
- tr.basis.elements[2][2],
- 0,
- tr.origin.x,
- tr.origin.y,
- tr.origin.z,
- 1
- };
-
- glLoadMatrixf(matrix);
-};
-
-
-_FORCE_INLINE_ static void _gl_mult_transform(const Transform& tr) {
-
- GLfloat matrix[16]={ /* build a 16x16 matrix */
- tr.basis.elements[0][0],
- tr.basis.elements[1][0],
- tr.basis.elements[2][0],
- 0,
- tr.basis.elements[0][1],
- tr.basis.elements[1][1],
- tr.basis.elements[2][1],
- 0,
- tr.basis.elements[0][2],
- tr.basis.elements[1][2],
- tr.basis.elements[2][2],
- 0,
- tr.origin.x,
- tr.origin.y,
- tr.origin.z,
- 1
- };
-
- glMultMatrixf(matrix);
-};
-
-_FORCE_INLINE_ static void _gl_mult_transform(const Matrix32& tr) {
-
- GLfloat matrix[16]={ /* build a 16x16 matrix */
- tr.elements[0][0],
- tr.elements[0][1],
- 0,
- 0,
- tr.elements[1][0],
- tr.elements[1][1],
- 0,
- 0,
- 0,
- 0,
- 1,
- 0,
- tr.elements[2][0],
- tr.elements[2][1],
- 0,
- 1
- };
-
- glMultMatrixf(matrix);
-};
-
-
-RasterizerGLES1::FX::FX() {
-
- bgcolor_active=false;
- bgcolor=Color(0,1,0,1);
-
- skybox_active=false;
-
- glow_active=false;
- glow_passes=4;
- glow_attenuation=0.7;
- glow_bloom=0.0;
-
- antialias_active=true;
- antialias_tolerance=15;
-
- ssao_active=true;
- ssao_attenuation=0.7;
- ssao_radius=0.18;
- ssao_max_distance=1.0;
- ssao_range_min=0.25;
- ssao_range_max=0.48;
- ssao_only=false;
-
-
- fog_active=false;
- fog_near=5;
- fog_far=100;
- fog_attenuation=1.0;
- fog_color_near=Color(1,1,1,1);
- fog_color_far=Color(1,1,1,1);
- fog_bg=false;
-
- toon_active=false;
- toon_treshold=0.4;
- toon_soft=0.001;
-
- edge_active=false;
- edge_color=Color(0,0,0,1);
- edge_size=1.0;
-
-}
-
-static const GLenum prim_type[]={GL_POINTS,GL_LINES,GL_TRIANGLES,GL_TRIANGLE_FAN};
-
-static void _draw_primitive(int p_points, const Vector3 *p_vertices, const Vector3 *p_normals, const Color* p_colors, const Vector3 *p_uvs,const Plane *p_tangents=NULL,int p_instanced=1) {
-
- ERR_FAIL_COND(!p_vertices);
- ERR_FAIL_COND(p_points <1 || p_points>4);
-
- GLenum type = prim_type[p_points - 1];
-
-
- //if (!p_colors) {
- // glColor4f(1, 1, 1, 1);
- //};
-
- glEnableClientState(GL_VERTEX_ARRAY);
- glVertexPointer(3, GL_FLOAT, 0, (GLvoid*)p_vertices);
-
- if (p_normals) {
-
- glEnableClientState(GL_NORMAL_ARRAY);
- glNormalPointer(GL_FLOAT, 0, (GLvoid*)p_normals);
- };
-
- if (p_colors) {
- glEnableClientState(GL_COLOR_ARRAY);
- glColorPointer(4,GL_FLOAT, 0, p_colors);
- };
-
- if (p_uvs) {
-
- glClientActiveTexture(GL_TEXTURE0);
- glEnableClientState(GL_TEXTURE_COORD_ARRAY);
- glTexCoordPointer(3, GL_FLOAT, 0, p_uvs);
- };
-
- glDrawArrays( type, 0, p_points);
-
- glDisableClientState(GL_VERTEX_ARRAY);
- glDisableClientState(GL_NORMAL_ARRAY);
- glDisableClientState(GL_COLOR_ARRAY);
- glDisableClientState(GL_TEXTURE_COORD_ARRAY);
-};
-
-/* TEXTURE API */
-#define _EXT_COMPRESSED_RGB_PVRTC_4BPPV1_IMG 0x8C00
-#define _EXT_COMPRESSED_RGB_PVRTC_2BPPV1_IMG 0x8C01
-#define _EXT_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG 0x8C02
-#define _EXT_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG 0x8C03
-#define _EXT_COMPRESSED_RGBA_S3TC_DXT1_EXT 0x83F1
-#define _EXT_COMPRESSED_RGBA_S3TC_DXT3_EXT 0x83F2
-#define _EXT_COMPRESSED_RGBA_S3TC_DXT5_EXT 0x83F3
-#define _EXT_COMPRESSED_RED_RGTC1_EXT 0x8DBB
-#define _EXT_COMPRESSED_RED_RGTC1 0x8DBB
-#define _EXT_COMPRESSED_SIGNED_RED_RGTC1 0x8DBC
-#define _EXT_COMPRESSED_RG_RGTC2 0x8DBD
-#define _EXT_COMPRESSED_SIGNED_RG_RGTC2 0x8DBE
-#define _EXT_COMPRESSED_SIGNED_RED_RGTC1_EXT 0x8DBC
-#define _EXT_COMPRESSED_RED_GREEN_RGTC2_EXT 0x8DBD
-#define _EXT_COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT 0x8DBE
-#define _EXT_ETC1_RGB8_OES 0x8D64
-
-/* TEXTURE API */
-
-Image RasterizerGLES1::_get_gl_image_and_format(const Image& p_image, Image::Format p_format, uint32_t p_flags,GLenum& r_gl_format,int &r_gl_components,bool &r_has_alpha_cache,bool &r_compressed) {
-
- r_has_alpha_cache=false;
- r_compressed=false;
- Image image=p_image;
-
- switch(p_format) {
-
- case Image::FORMAT_GRAYSCALE: {
- r_gl_components=1;
- r_gl_format=GL_LUMINANCE;
-
- } break;
- case Image::FORMAT_INTENSITY: {
-
- if (!image.empty())
- image.convert(Image::FORMAT_RGBA);
- r_gl_components=4;
- r_gl_format=GL_RGBA;
- r_has_alpha_cache=true;
- } break;
- case Image::FORMAT_GRAYSCALE_ALPHA: {
-
- //image.convert(Image::FORMAT_RGBA);
- r_gl_components=2;
- r_gl_format=GL_LUMINANCE_ALPHA;
- r_has_alpha_cache=true;
- } break;
-
- case Image::FORMAT_INDEXED: {
-
- if (!image.empty())
- image.convert(Image::FORMAT_RGB);
- r_gl_components=3;
- r_gl_format=GL_RGB;
-
- } break;
-
- case Image::FORMAT_INDEXED_ALPHA: {
-
- if (!image.empty())
- image.convert(Image::FORMAT_RGBA);
- r_gl_components=4;
- r_gl_format=GL_RGBA;
- r_has_alpha_cache=true;
-
- } break;
- case Image::FORMAT_RGB: {
-
- r_gl_components=3;
- r_gl_format=GL_RGB;
- } break;
- case Image::FORMAT_RGBA: {
-
- r_gl_components=4;
- r_gl_format=GL_RGBA;
- r_has_alpha_cache=true;
- } break;
- case Image::FORMAT_BC1: {
-
- r_gl_components=1; //doesn't matter much
- r_gl_format=_EXT_COMPRESSED_RGBA_S3TC_DXT1_EXT;
- r_compressed=true;
-
- } break;
- case Image::FORMAT_BC2: {
- r_gl_components=1; //doesn't matter much
- r_gl_format=_EXT_COMPRESSED_RGBA_S3TC_DXT3_EXT;
- r_has_alpha_cache=true;
- r_compressed=true;
-
- } break;
- case Image::FORMAT_BC3: {
-
- r_gl_components=1; //doesn't matter much
- r_gl_format=_EXT_COMPRESSED_RGBA_S3TC_DXT5_EXT;
- r_has_alpha_cache=true;
- r_compressed=true;
-
- } break;
- case Image::FORMAT_BC4: {
-
- r_gl_format=_EXT_COMPRESSED_RED_RGTC1;
- r_gl_components=1; //doesn't matter much
- r_compressed=true;
-
- } break;
- case Image::FORMAT_BC5: {
-
- r_gl_format=_EXT_COMPRESSED_RG_RGTC2;
- r_gl_components=1; //doesn't matter much
- r_compressed=true;
- } break;
- case Image::FORMAT_PVRTC2: {
-
- if (!pvr_supported) {
-
- if (!image.empty())
- image.decompress();
- r_gl_components=4;
- r_gl_format=GL_RGBA;
- r_has_alpha_cache=true;
- print_line("Load Compat PVRTC2");
-
- } else {
-
- r_gl_format=_EXT_COMPRESSED_RGB_PVRTC_2BPPV1_IMG;
- r_gl_components=1; //doesn't matter much
- r_compressed=true;
- print_line("Load Normal PVRTC2");
- }
-
- } break;
- case Image::FORMAT_PVRTC2_ALPHA: {
-
- if (!pvr_supported) {
-
- if (!image.empty())
- image.decompress();
- r_gl_components=4;
- r_gl_format=GL_RGBA;
- r_has_alpha_cache=true;
- print_line("Load Compat PVRTC2A");
-
- } else {
-
- r_gl_format=_EXT_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG;
- r_gl_components=1; //doesn't matter much
- r_compressed=true;
- print_line("Load Normal PVRTC2A");
- }
-
- } break;
- case Image::FORMAT_PVRTC4: {
-
- if (!pvr_supported) {
-
- if (!image.empty())
- image.decompress();
- r_gl_components=4;
- r_gl_format=GL_RGBA;
- r_has_alpha_cache=true;
- print_line("Load Compat PVRTC4");
- } else {
-
- r_gl_format=_EXT_COMPRESSED_RGB_PVRTC_4BPPV1_IMG;
- r_gl_components=1; //doesn't matter much
- r_compressed=true;
- print_line("Load Normal PVRTC4");
- }
-
- } break;
- case Image::FORMAT_PVRTC4_ALPHA: {
-
- if (!pvr_supported) {
-
- if (!image.empty())
- image.decompress();
- r_gl_components=4;
- r_gl_format=GL_RGBA;
- r_has_alpha_cache=true;
- print_line("Load Compat PVRTC4A");
-
- } else {
-
- r_gl_format=_EXT_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;
- r_gl_components=1; //doesn't matter much
- r_compressed=true;
- print_line("Load Normal PVRTC4A");
- }
-
- } break;
- case Image::FORMAT_ETC: {
-
- if (!pvr_supported) {
-
- if (!image.empty())
- image.decompress();
- } else {
-
- r_gl_format=_EXT_ETC1_RGB8_OES;
- r_gl_components=1; //doesn't matter much
- r_compressed=true;
- }
-
- } break;
- case Image::FORMAT_YUV_422:
- case Image::FORMAT_YUV_444: {
-
- if (!image.empty())
- image.convert(Image::FORMAT_RGB);
- r_gl_format=GL_RGB;
- r_gl_components=3;
-
- } break;
-
- default: {
-
- ERR_FAIL_V(Image());
- }
- }
-
- return image;
-}
-
-
-RID RasterizerGLES1::texture_create() {
-
- Texture *texture = memnew(Texture);
- ERR_FAIL_COND_V(!texture,RID());
- glGenTextures(1, &texture->tex_id);
- texture->active=false;
- texture->total_data_size=0;
-
- return texture_owner.make_rid( texture );
-
-}
-
-void RasterizerGLES1::texture_allocate(RID p_texture,int p_width, int p_height,Image::Format p_format,uint32_t p_flags) {
-
- bool has_alpha_cache;
- int components;
- GLenum format;
- bool compressed;
-
- int po2_width = nearest_power_of_2(p_width);
- int po2_height = nearest_power_of_2(p_height);
-
- Texture *texture = texture_owner.get( p_texture );
- ERR_FAIL_COND(!texture);
- texture->width=p_width;
- texture->height=p_height;
- texture->format=p_format;
- texture->flags=p_flags;
- texture->target = /*(p_flags & VS::TEXTURE_FLAG_CUBEMAP) ? GL_TEXTURE_CUBE_MAP :*/ GL_TEXTURE_2D;
-
- bool scale_textures = (!npo2_textures_available || p_format&VS::TEXTURE_FLAG_MIPMAPS);
-
-
- if (scale_textures) {
- texture->alloc_width = po2_width;
- texture->alloc_height = po2_height;
- } else {
-
- texture->alloc_width = texture->width;
- texture->alloc_height = texture->height;
- };
-
- _get_gl_image_and_format(Image(),texture->format,texture->flags,format,components,has_alpha_cache,compressed);
-
- texture->gl_components_cache=components;
- texture->gl_format_cache=format;
- texture->format_has_alpha=has_alpha_cache;
- texture->compressed=compressed;
- texture->data_size=0;
-
-
- glActiveTexture(GL_TEXTURE0);
- glBindTexture(texture->target, texture->tex_id);
-
-
-
-
- if (compressed) {
-
- glTexParameteri( texture->target, GL_GENERATE_MIPMAP, GL_FALSE );
- } else {
- if (texture->flags&VS::TEXTURE_FLAG_MIPMAPS) {
- glTexParameteri( texture->target, GL_GENERATE_MIPMAP, GL_TRUE );
- } else {
- glTexParameteri( texture->target, GL_GENERATE_MIPMAP, GL_FALSE );
- }
-
- }
-
-
- if (texture->flags&VS::TEXTURE_FLAG_MIPMAPS)
- glTexParameteri(texture->target,GL_TEXTURE_MIN_FILTER,GL_LINEAR_MIPMAP_LINEAR);
- else
- glTexParameteri(texture->target,GL_TEXTURE_MIN_FILTER,GL_LINEAR);
-
- if (texture->flags&VS::TEXTURE_FLAG_FILTER) {
-
- glTexParameteri(texture->target,GL_TEXTURE_MAG_FILTER,GL_LINEAR); // Linear Filtering
-
- } else {
-
- glTexParameteri(texture->target,GL_TEXTURE_MAG_FILTER,GL_NEAREST); // raw Filtering
-
- }
- bool force_clamp_to_edge = !(p_flags&VS::TEXTURE_FLAG_MIPMAPS) && (nearest_power_of_2(texture->alloc_height)!=texture->alloc_height || nearest_power_of_2(texture->alloc_width)!=texture->alloc_width);
-
- if (!force_clamp_to_edge && texture->flags&VS::TEXTURE_FLAG_REPEAT) {
-
- glTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT );
- glTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT );
- } else {
-
- //glTexParameterf( texture->target, GL_TEXTURE_WRAP_R, GL_CLAMP_TO_EDGE );
- glTexParameterf( texture->target, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE );
- glTexParameterf( texture->target, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE );
- }
-
- texture->active=true;
-}
-
-void RasterizerGLES1::texture_set_data(RID p_texture,const Image& p_image,VS::CubeMapSide p_cube_side) {
-
- Texture * texture = texture_owner.get(p_texture);
-
- ERR_FAIL_COND(!texture);
- ERR_FAIL_COND(!texture->active);
- ERR_FAIL_COND(texture->format != p_image.get_format() );
-
- int components;
- GLenum format;
- bool alpha;
- bool compressed;
-
- if (keep_copies && !(texture->flags&VS::TEXTURE_FLAG_VIDEO_SURFACE) && !(use_reload_hooks && texture->reloader)) {
- texture->image[p_cube_side]=p_image;
- }
-
-
- Image img = _get_gl_image_and_format(p_image, p_image.get_format(),texture->flags,format,components,alpha,compressed);
- if (texture->alloc_width != img.get_width() || texture->alloc_height != img.get_height()) {
-
- img.resize(texture->alloc_width, texture->alloc_height, Image::INTERPOLATE_BILINEAR);
- };
-
-
- GLenum blit_target = /*(texture->target == GL_TEXTURE_CUBE_MAP)?_cube_side_enum[p_cube_side]:*/GL_TEXTURE_2D;
-
- texture->data_size=img.get_data().size();
- DVector<uint8_t>::Read read = img.get_data().read();
-
- glActiveTexture(GL_TEXTURE0);
- glBindTexture(texture->target, texture->tex_id);
-
- int mipmaps=(texture->flags&VS::TEXTURE_FLAG_MIPMAPS && img.get_mipmaps()>0) ? img.get_mipmaps() +1 : 1;
-
- int w=img.get_width();
- int h=img.get_height();
-
- int tsize=0;
- for(int i=0;i<mipmaps;i++) {
-
- int size,ofs;
- img.get_mipmap_offset_and_size(i,ofs,size);
-
- if (texture->compressed) {
- glPixelStorei(GL_UNPACK_ALIGNMENT, 4);
- glCompressedTexImage2D( blit_target, i, format,w,h,0,size,&read[ofs] );
-
- } else {
- glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
-// glTexImage2D(blit_target, i, format==GL_RGB?GL_RGB8:format, w, h, 0, format, GL_UNSIGNED_BYTE,&read[ofs]);
- glTexImage2D(blit_target, i, format, w, h, 0, format, GL_UNSIGNED_BYTE,&read[ofs]);
- //glTexSubImage2D( blit_target, i, 0,0,w,h,format,GL_UNSIGNED_BYTE,&read[ofs] );
- }
- tsize+=size;
-
- w = MAX(1,w>>1);
- h = MAX(1,h>>1);
-
- }
-
- _rinfo.texture_mem-=texture->total_data_size;
- texture->total_data_size=tsize;
- _rinfo.texture_mem+=texture->total_data_size;
-
- printf("texture: %i x %i - size: %i - total: %i\n",texture->width,texture->height,tsize,_rinfo.texture_mem);
-
-
- if (mipmaps==1 && texture->flags&VS::TEXTURE_FLAG_MIPMAPS) {
- glTexParameteri( GL_TEXTURE_2D, GL_GENERATE_MIPMAP, GL_TRUE );
-
- } else {
- glTexParameteri( GL_TEXTURE_2D, GL_GENERATE_MIPMAP, GL_FALSE );
-
- }
-
- if (mipmaps>1) {
-
- //glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, mipmaps-1 ); - assumed to have all, always
- }
-
- //texture_set_flags(p_texture,texture->flags);
-
-
-}
-
-Image RasterizerGLES1::texture_get_data(RID p_texture,VS::CubeMapSide p_cube_side) const {
-
- Texture * texture = texture_owner.get(p_texture);
-
- ERR_FAIL_COND_V(!texture,Image());
- ERR_FAIL_COND_V(!texture->active,Image());
-
- return texture->image[p_cube_side];
-#if 0
-
- Texture * texture = texture_owner.get(p_texture);
-
- ERR_FAIL_COND_V(!texture,Image());
- ERR_FAIL_COND_V(!texture->active,Image());
- ERR_FAIL_COND_V(texture->data_size==0,Image());
-
- DVector<uint8_t> data;
- GLenum format,type=GL_UNSIGNED_BYTE;
- Image::Format fmt;
- int pixelsize=0;
- int pixelshift=0;
- int minw=1,minh=1;
- bool compressed=false;
-
- fmt=texture->format;
-
- switch(texture->format) {
-
- case Image::FORMAT_GRAYSCALE: {
-
- format=GL_LUMINANCE;
- type=GL_UNSIGNED_BYTE;
- data.resize(texture->alloc_width*texture->alloc_height);
- pixelsize=1;
-
- } break;
- case Image::FORMAT_INTENSITY: {
- return Image();
- } break;
- case Image::FORMAT_GRAYSCALE_ALPHA: {
-
- format=GL_LUMINANCE_ALPHA;
- type=GL_UNSIGNED_BYTE;
- pixelsize=2;
-
- } break;
- case Image::FORMAT_RGB: {
- format=GL_RGB;
- type=GL_UNSIGNED_BYTE;
- pixelsize=3;
- } break;
- case Image::FORMAT_RGBA: {
-
- format=GL_RGBA;
- type=GL_UNSIGNED_BYTE;
- pixelsize=4;
- } break;
- case Image::FORMAT_INDEXED: {
-
- format=GL_RGB;
- type=GL_UNSIGNED_BYTE;
- fmt=Image::FORMAT_RGB;
- pixelsize=3;
- } break;
- case Image::FORMAT_INDEXED_ALPHA: {
-
- format=GL_RGBA;
- type=GL_UNSIGNED_BYTE;
- fmt=Image::FORMAT_RGBA;
- pixelsize=4;
-
- } break;
- case Image::FORMAT_BC1: {
-
- pixelsize=1; //doesn't matter much
- format=GL_COMPRESSED_RGBA_S3TC_DXT1_EXT;
- compressed=true;
- pixelshift=1;
- minw=minh=4;
-
- } break;
- case Image::FORMAT_BC2: {
- pixelsize=1; //doesn't matter much
- format=GL_COMPRESSED_RGBA_S3TC_DXT3_EXT;
- compressed=true;
- minw=minh=4;
-
- } break;
- case Image::FORMAT_BC3: {
-
- pixelsize=1; //doesn't matter much
- format=GL_COMPRESSED_RGBA_S3TC_DXT5_EXT;
- compressed=true;
- minw=minh=4;
-
- } break;
- case Image::FORMAT_BC4: {
-
- format=GL_COMPRESSED_RED_RGTC1;
- pixelsize=1; //doesn't matter much
- compressed=true;
- pixelshift=1;
- minw=minh=4;
-
- } break;
- case Image::FORMAT_BC5: {
-
- format=GL_COMPRESSED_RG_RGTC2;
- pixelsize=1; //doesn't matter much
- compressed=true;
- minw=minh=4;
-
- } break;
-
- default:{}
- }
-
- data.resize(texture->data_size);
- DVector<uint8_t>::Write wb = data.write();
-
- glActiveTexture(GL_TEXTURE0);
- int ofs=0;
- glBindTexture(texture->target,texture->tex_id);
-
- int w=texture->alloc_width;
- int h=texture->alloc_height;
- for(int i=0;i<texture->mipmaps+1;i++) {
-
- if (compressed) {
-
- glPixelStorei(GL_PACK_ALIGNMENT, 4);
- glGetCompressedTexImage(texture->target,i,&wb[ofs]);
-
- } else {
- glPixelStorei(GL_PACK_ALIGNMENT, 1);
- glGetTexImage(texture->target,i,format,type,&wb[ofs]);
- }
-
- int size = (w*h*pixelsize)>>pixelshift;
- ofs+=size;
-
- w=MAX(minw,w>>1);
- h=MAX(minh,h>>1);
-
- }
-
-
- wb=DVector<uint8_t>::Write();
-
- Image img(texture->alloc_width,texture->alloc_height,texture->mipmaps,fmt,data);
-
- if (texture->format<Image::FORMAT_INDEXED && (texture->alloc_width!=texture->width || texture->alloc_height!=texture->height))
- img.resize(texture->width,texture->height);
-
- return img;
-#endif
-}
-
-void RasterizerGLES1::texture_set_flags(RID p_texture,uint32_t p_flags) {
-
- Texture *texture = texture_owner.get( p_texture );
- ERR_FAIL_COND(!texture);
-
- glActiveTexture(GL_TEXTURE0);
- glBindTexture(texture->target, texture->tex_id);
- uint32_t cube = texture->flags & VS::TEXTURE_FLAG_CUBEMAP;
- texture->flags=p_flags|cube; // can't remove a cube from being a cube
-
- bool force_clamp_to_edge = !(p_flags&VS::TEXTURE_FLAG_MIPMAPS) && (nearest_power_of_2(texture->alloc_height)!=texture->alloc_height || nearest_power_of_2(texture->alloc_width)!=texture->alloc_width);
-
- if (!force_clamp_to_edge && texture->flags&VS::TEXTURE_FLAG_REPEAT) {
-
- glTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT );
- glTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT );
- } else {
- //glTexParameterf( texture->target, GL_TEXTURE_WRAP_R, GL_CLAMP_TO_EDGE );
- glTexParameterf( texture->target, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE );
- glTexParameterf( texture->target, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE );
-
- }
-
-
- if (texture->flags&VS::TEXTURE_FLAG_FILTER) {
-
- glTexParameteri(texture->target,GL_TEXTURE_MAG_FILTER,GL_LINEAR); // Linear Filtering
- if (texture->flags&VS::TEXTURE_FLAG_MIPMAPS)
- glTexParameteri(texture->target,GL_TEXTURE_MIN_FILTER,GL_LINEAR_MIPMAP_LINEAR);
- else
- glTexParameteri(texture->target,GL_TEXTURE_MIN_FILTER,GL_LINEAR); // Linear Filtering
-
- } else {
-
- glTexParameteri(texture->target,GL_TEXTURE_MAG_FILTER,GL_NEAREST); // nearest
- }
-}
-uint32_t RasterizerGLES1::texture_get_flags(RID p_texture) const {
-
- Texture * texture = texture_owner.get(p_texture);
-
- ERR_FAIL_COND_V(!texture,0);
-
- return texture->flags;
-
-}
-Image::Format RasterizerGLES1::texture_get_format(RID p_texture) const {
-
- Texture * texture = texture_owner.get(p_texture);
-
- ERR_FAIL_COND_V(!texture,Image::FORMAT_GRAYSCALE);
-
- return texture->format;
-}
-uint32_t RasterizerGLES1::texture_get_width(RID p_texture) const {
-
- Texture * texture = texture_owner.get(p_texture);
-
- ERR_FAIL_COND_V(!texture,0);
-
- return texture->width;
-}
-uint32_t RasterizerGLES1::texture_get_height(RID p_texture) const {
-
- Texture * texture = texture_owner.get(p_texture);
-
- ERR_FAIL_COND_V(!texture,0);
-
- return texture->height;
-}
-
-bool RasterizerGLES1::texture_has_alpha(RID p_texture) const {
-
- Texture * texture = texture_owner.get(p_texture);
-
- ERR_FAIL_COND_V(!texture,0);
-
- return false;
-
-}
-
-void RasterizerGLES1::texture_set_size_override(RID p_texture,int p_width, int p_height) {
-
- Texture * texture = texture_owner.get(p_texture);
-
- ERR_FAIL_COND(!texture);
-
- ERR_FAIL_COND(p_width<=0 || p_width>4096);
- ERR_FAIL_COND(p_height<=0 || p_height>4096);
- //real texture size is in alloc width and height
- texture->width=p_width;
- texture->height=p_height;
-
-}
-
-void RasterizerGLES1::texture_set_reload_hook(RID p_texture,ObjectID p_owner,const StringName& p_function) const {
-
- Texture * texture = texture_owner.get(p_texture);
-
- ERR_FAIL_COND(!texture);
-
- texture->reloader=p_owner;
- texture->reloader_func=p_function;
- if (use_reload_hooks && p_owner && keep_copies) {
-
- for(int i=0;i<6;i++)
- texture->image[i]=Image();
- }
-
-
-}
-
-/* SHADER API */
-
-/* SHADER API */
-
-RID RasterizerGLES1::shader_create(VS::ShaderMode p_mode) {
-
- Shader *shader = memnew( Shader );
- shader->mode=p_mode;
- shader->valid=false;
- shader->has_alpha=false;
- shader->fragment_line=0;
- shader->vertex_line=0;
- shader->light_line=0;
- RID rid = shader_owner.make_rid(shader);
- shader_set_mode(rid,p_mode);
-// _shader_make_dirty(shader);
-
- return rid;
-
-}
-
-
-
-void RasterizerGLES1::shader_set_mode(RID p_shader,VS::ShaderMode p_mode) {
-
- ERR_FAIL_INDEX(p_mode,3);
- Shader *shader=shader_owner.get(p_shader);
- ERR_FAIL_COND(!shader);
-// if (shader->custom_code_id && p_mode==shader->mode)
-// return;
-
- shader->mode=p_mode;
-
-}
-VS::ShaderMode RasterizerGLES1::shader_get_mode(RID p_shader) const {
-
- Shader *shader=shader_owner.get(p_shader);
- ERR_FAIL_COND_V(!shader,VS::SHADER_MATERIAL);
- return shader->mode;
-}
-
-
-
-void RasterizerGLES1::shader_set_code(RID p_shader, const String& p_vertex, const String& p_fragment,const String& p_light,int p_vertex_ofs,int p_fragment_ofs,int p_light_ofs) {
-
-
- Shader *shader=shader_owner.get(p_shader);
- ERR_FAIL_COND(!shader);
-
-#ifdef DEBUG_ENABLED
- if (shader->vertex_code==p_vertex && shader->fragment_code==p_fragment && shader->light_code==p_light)
- return;
-#endif
- shader->fragment_code=p_fragment;
- shader->vertex_code=p_vertex;
- shader->light_code=p_light;
- shader->fragment_line=p_fragment_ofs;
- shader->vertex_line=p_vertex_ofs;
- shader->light_line=p_light_ofs;
-
-}
-
-String RasterizerGLES1::shader_get_vertex_code(RID p_shader) const {
-
- Shader *shader=shader_owner.get(p_shader);
- ERR_FAIL_COND_V(!shader,String());
- return shader->vertex_code;
-
-}
-
-String RasterizerGLES1::shader_get_fragment_code(RID p_shader) const {
-
- Shader *shader=shader_owner.get(p_shader);
- ERR_FAIL_COND_V(!shader,String());
- return shader->fragment_code;
-
-}
-
-String RasterizerGLES1::shader_get_light_code(RID p_shader) const {
-
- Shader *shader=shader_owner.get(p_shader);
- ERR_FAIL_COND_V(!shader,String());
- return shader->light_code;
-
-}
-
-void RasterizerGLES1::shader_get_param_list(RID p_shader, List<PropertyInfo> *p_param_list) const {
-
- Shader *shader=shader_owner.get(p_shader);
- ERR_FAIL_COND(!shader);
-#if 0
-
- if (shader->dirty_list.in_list())
- _update_shader(shader); // ok should be not anymore dirty
-
-
- Map<int,StringName> order;
-
-
- for(Map<StringName,ShaderLanguage::Uniform>::Element *E=shader->uniforms.front();E;E=E->next()) {
-
-
- order[E->get().order]=E->key();
- }
-
-
- for(Map<int,StringName>::Element *E=order.front();E;E=E->next()) {
-
- PropertyInfo pi;
- ShaderLanguage::Uniform &u=shader->uniforms[E->get()];
- pi.name=E->get();
- switch(u.type) {
-
- case ShaderLanguage::TYPE_VOID:
- case ShaderLanguage::TYPE_BOOL:
- case ShaderLanguage::TYPE_FLOAT:
- case ShaderLanguage::TYPE_VEC2:
- case ShaderLanguage::TYPE_VEC3:
- case ShaderLanguage::TYPE_MAT3:
- case ShaderLanguage::TYPE_MAT4:
- case ShaderLanguage::TYPE_VEC4:
- pi.type=u.default_value.get_type();
- break;
- case ShaderLanguage::TYPE_TEXTURE:
- pi.type=Variant::_RID;
- pi.hint=PROPERTY_HINT_RESOURCE_TYPE;
- pi.hint_string="Texture";
- break;
- case ShaderLanguage::TYPE_CUBEMAP:
- pi.type=Variant::_RID;
- pi.hint=PROPERTY_HINT_RESOURCE_TYPE;
- pi.hint_string="Texture";
- break;
- };
-
- p_param_list->push_back(pi);
-
- }
-#endif
-
-}
-
-
-void RasterizerGLES1::shader_set_default_texture_param(RID p_shader, const StringName& p_name, RID p_texture) {
-
-}
-
-RID RasterizerGLES1::shader_get_default_texture_param(RID p_shader, const StringName& p_name) const {
-
- return RID();
-}
-
-/* COMMON MATERIAL API */
-
-
-RID RasterizerGLES1::material_create() {
-
- return material_owner.make_rid( memnew( Material ) );
-}
-
-void RasterizerGLES1::material_set_shader(RID p_material, RID p_shader) {
-
- Material *material = material_owner.get(p_material);
- ERR_FAIL_COND(!material);
- material->shader=p_shader;
-
-}
-
-RID RasterizerGLES1::material_get_shader(RID p_material) const {
-
- Material *material = material_owner.get(p_material);
- ERR_FAIL_COND_V(!material,RID());
- return material->shader;
-}
-
-#if 0
-
-void RasterizerGLES1::_material_check_alpha(Material *p_material) {
-
- p_material->has_alpha=false;
- Color diffuse=p_material->parameters[VS::FIXED_MATERIAL_PARAM_DIFFUSE];
- if (diffuse.a<0.98) {
-
- p_material->has_alpha=true;
- return;
- }
-
- if (p_material->textures[VS::FIXED_MATERIAL_PARAM_DIFFUSE].is_valid()) {
-
- Texture *tex = texture_owner.get(p_material->textures[VS::FIXED_MATERIAL_PARAM_DIFFUSE]);
- if (!tex)
- return;
- if (tex->has_alpha) {
-
- p_material->has_alpha=true;
- return;
- }
- }
-}
-
-#endif
-void RasterizerGLES1::material_set_param(RID p_material, const StringName& p_param, const Variant& p_value) {
-
- Material *material = material_owner.get(p_material);
- ERR_FAIL_COND(!material);
-
- if (p_value.get_type()==Variant::NIL)
- material->shader_params.erase(p_param);
- else
- material->shader_params[p_param]=p_value;
-}
-Variant RasterizerGLES1::material_get_param(RID p_material, const StringName& p_param) const {
-
- Material *material = material_owner.get(p_material);
- ERR_FAIL_COND_V(!material,Variant());
-
- if (material->shader_params.has(p_param))
- return material->shader_params[p_param];
- else
- return Variant();
-}
-
-
-void RasterizerGLES1::material_set_flag(RID p_material, VS::MaterialFlag p_flag,bool p_enabled) {
-
- Material *material = material_owner.get(p_material);
- ERR_FAIL_COND(!material);
- ERR_FAIL_INDEX(p_flag,VS::MATERIAL_FLAG_MAX);
- material->flags[p_flag]=p_enabled;
-
-}
-bool RasterizerGLES1::material_get_flag(RID p_material,VS::MaterialFlag p_flag) const {
-
- Material *material = material_owner.get(p_material);
- ERR_FAIL_COND_V(!material,false);
- ERR_FAIL_INDEX_V(p_flag,VS::MATERIAL_FLAG_MAX,false);
- return material->flags[p_flag];
-
-
-}
-
-void RasterizerGLES1::material_set_depth_draw_mode(RID p_material, VS::MaterialDepthDrawMode p_mode) {
-
- Material *material = material_owner.get(p_material);
- ERR_FAIL_COND(!material);
- material->depth_draw_mode=p_mode;
-}
-
-VS::MaterialDepthDrawMode RasterizerGLES1::material_get_depth_draw_mode(RID p_material) const{
-
-
- Material *material = material_owner.get(p_material);
- ERR_FAIL_COND_V(!material,VS::MATERIAL_DEPTH_DRAW_ALWAYS);
- return material->depth_draw_mode;
-}
-
-
-void RasterizerGLES1::material_set_blend_mode(RID p_material,VS::MaterialBlendMode p_mode) {
-
- Material *material = material_owner.get(p_material);
- ERR_FAIL_COND(!material);
- material->blend_mode=p_mode;
-
-}
-VS::MaterialBlendMode RasterizerGLES1::material_get_blend_mode(RID p_material) const {
-
- Material *material = material_owner.get(p_material);
- ERR_FAIL_COND_V(!material,VS::MATERIAL_BLEND_MODE_ADD);
- return material->blend_mode;
-}
-
-void RasterizerGLES1::material_set_line_width(RID p_material,float p_line_width) {
-
- Material *material = material_owner.get(p_material);
- ERR_FAIL_COND(!material);
- material->line_width=p_line_width;
-
-}
-float RasterizerGLES1::material_get_line_width(RID p_material) const {
-
- Material *material = material_owner.get(p_material);
- ERR_FAIL_COND_V(!material,0);
-
- return material->line_width;
-}
-
-/* FIXED MATERIAL */
-
-
-RID RasterizerGLES1::fixed_material_create() {
-
- return material_create();
-}
-
-void RasterizerGLES1::fixed_material_set_flag(RID p_material, VS::FixedMaterialFlags p_flag, bool p_enabled) {
-
- Material *m=material_owner.get( p_material );
- ERR_FAIL_COND(!m);
- ERR_FAIL_INDEX(p_flag, 3);
- m->fixed_flags[p_flag]=p_enabled;
-}
-
-bool RasterizerGLES1::fixed_material_get_flag(RID p_material, VS::FixedMaterialFlags p_flag) const {
-
- Material *m=material_owner.get( p_material );
- ERR_FAIL_COND_V(!m,false);
- ERR_FAIL_INDEX_V(p_flag,VS::FIXED_MATERIAL_FLAG_MAX, false);
- return m->fixed_flags[p_flag];
-}
-
-void RasterizerGLES1::fixed_material_set_parameter(RID p_material, VS::FixedMaterialParam p_parameter, const Variant& p_value) {
-
- Material *m=material_owner.get( p_material );
- ERR_FAIL_COND(!m);
- ERR_FAIL_INDEX(p_parameter, VisualServer::FIXED_MATERIAL_PARAM_MAX);
-
- m->parameters[p_parameter] = p_value;
-
-}
-
-Variant RasterizerGLES1::fixed_material_get_parameter(RID p_material,VS::FixedMaterialParam p_parameter) const {
-
- Material *m=material_owner.get( p_material );
- ERR_FAIL_COND_V(!m, Variant());
- ERR_FAIL_INDEX_V(p_parameter, VisualServer::FIXED_MATERIAL_PARAM_MAX, Variant());
-
- return m->parameters[p_parameter];
-}
-
-void RasterizerGLES1::fixed_material_set_texture(RID p_material,VS::FixedMaterialParam p_parameter, RID p_texture) {
-
- Material *m=material_owner.get( p_material );
- ERR_FAIL_COND(!m);
- ERR_FAIL_INDEX(p_parameter, VisualServer::FIXED_MATERIAL_PARAM_MAX);
-
- m->textures[p_parameter] = p_texture;
-
-}
-RID RasterizerGLES1::fixed_material_get_texture(RID p_material,VS::FixedMaterialParam p_parameter) const {
-
- Material *m=material_owner.get( p_material );
- ERR_FAIL_COND_V(!m, RID());
- ERR_FAIL_INDEX_V(p_parameter, VisualServer::FIXED_MATERIAL_PARAM_MAX, Variant());
-
- return m->textures[p_parameter];
-}
-
-
-void RasterizerGLES1::fixed_material_set_texcoord_mode(RID p_material,VS::FixedMaterialParam p_parameter, VS::FixedMaterialTexCoordMode p_mode) {
-
- Material *m=material_owner.get( p_material );
- ERR_FAIL_COND(!m);
- ERR_FAIL_INDEX(p_parameter, VisualServer::FIXED_MATERIAL_PARAM_MAX);
- ERR_FAIL_INDEX(p_mode,4);
-
- m->texcoord_mode[p_parameter] = p_mode;
-}
-
-VS::FixedMaterialTexCoordMode RasterizerGLES1::fixed_material_get_texcoord_mode(RID p_material,VS::FixedMaterialParam p_parameter) const {
-
- Material *m=material_owner.get( p_material );
- ERR_FAIL_COND_V(!m, VS::FIXED_MATERIAL_TEXCOORD_UV);
- ERR_FAIL_INDEX_V(p_parameter, VisualServer::FIXED_MATERIAL_PARAM_MAX, VS::FIXED_MATERIAL_TEXCOORD_UV);
-
- return m->texcoord_mode[p_parameter]; // for now
-}
-
-void RasterizerGLES1::fixed_material_set_uv_transform(RID p_material,const Transform& p_transform) {
-
- Material *m=material_owner.get( p_material );
- ERR_FAIL_COND(!m);
-
- m->uv_transform = p_transform;
-}
-
-Transform RasterizerGLES1::fixed_material_get_uv_transform(RID p_material) const {
-
- Material *m=material_owner.get( p_material );
- ERR_FAIL_COND_V(!m, Transform());
-
- return m->uv_transform;
-}
-
-void RasterizerGLES1::fixed_material_set_point_size(RID p_material,float p_size) {
-
- Material *m=material_owner.get( p_material );
- ERR_FAIL_COND(!m);
- m->point_size=p_size;
-
-}
-float RasterizerGLES1::fixed_material_get_point_size(RID p_material) const {
-
- const Material *m=material_owner.get( p_material );
- ERR_FAIL_COND_V(!m, 0);
- return m->point_size;
-}
-
-
-/* MESH API */
-
-
-RID RasterizerGLES1::mesh_create() {
-
-
- return mesh_owner.make_rid( memnew( Mesh ) );
-}
-
-
-
-void RasterizerGLES1::mesh_add_surface(RID p_mesh,VS::PrimitiveType p_primitive,const Array& p_arrays,const Array& p_blend_shapes,bool p_alpha_sort) {
-
- Mesh *mesh = mesh_owner.get( p_mesh );
- ERR_FAIL_COND(!mesh);
-
- ERR_FAIL_INDEX( p_primitive, VS::PRIMITIVE_MAX );
- ERR_FAIL_COND(p_arrays.size()!=VS::ARRAY_MAX);
-
- uint32_t format=0;
-
- // validation
- int index_array_len=0;
- int array_len=0;
-
- for(int i=0;i<p_arrays.size();i++) {
-
- if (p_arrays[i].get_type()==Variant::NIL)
- continue;
-
- format|=(1<<i);
-
- if (i==VS::ARRAY_VERTEX) {
-
- array_len=Vector3Array(p_arrays[i]).size();
- ERR_FAIL_COND(array_len==0);
- } else if (i==VS::ARRAY_INDEX) {
-
- index_array_len=IntArray(p_arrays[i]).size();
- }
- }
-
- ERR_FAIL_COND((format&VS::ARRAY_FORMAT_VERTEX)==0); // mandatory
-
-
- Surface *surface = memnew( Surface );
- ERR_FAIL_COND( !surface );
-
- bool use_VBO=true; //glGenBuffersARB!=NULL; // TODO detect if it's in there
- if (format&VS::ARRAY_FORMAT_WEIGHTS || mesh->morph_target_count>0) {
-
- use_VBO=false;
- }
-
- surface->packed=pack_arrays && use_VBO;
-
- int total_elem_size=0;
-
- for (int i=0;i<VS::ARRAY_MAX;i++) {
-
-
- Surface::ArrayData&ad=surface->array[i];
- ad.size=0;
- ad.ofs=0;
- int elem_size=0;
- int elem_count=0;
- bool valid_local=true;
- GLenum datatype;
- bool normalize=false;
- bool bind=false;
-
- if (!(format&(1<<i))) // no array
- continue;
-
-
- switch(i) {
-
- case VS::ARRAY_VERTEX: {
-
- if (surface->packed) {
- elem_size=3*sizeof(int16_t); // vertex
- datatype=GL_SHORT;
- normalize=true;
-
- } else {
- elem_size=3*sizeof(GLfloat); // vertex
- datatype=GL_FLOAT;
- }
- bind=true;
- elem_count=3;
-
- } break;
- case VS::ARRAY_NORMAL: {
-
- if (surface->packed) {
- elem_size=3*sizeof(int8_t); // vertex
- datatype=GL_BYTE;
- normalize=true;
- } else {
- elem_size=3*sizeof(GLfloat); // vertex
- datatype=GL_FLOAT;
- }
- bind=true;
- elem_count=3;
- } break;
- case VS::ARRAY_TANGENT: {
- if (surface->packed) {
- elem_size=4*sizeof(int8_t); // vertex
- datatype=GL_BYTE;
- normalize=true;
- } else {
- elem_size=4*sizeof(GLfloat); // vertex
- datatype=GL_FLOAT;
- }
- bind=true;
- elem_count=4;
-
- } break;
- case VS::ARRAY_COLOR: {
-
- elem_size=4*sizeof(uint8_t); /* RGBA */
- datatype=GL_UNSIGNED_BYTE;
- elem_count=4;
- bind=true;
- normalize=true;
- } break;
- case VS::ARRAY_TEX_UV:
- case VS::ARRAY_TEX_UV2: {
- if (surface->packed) {
- elem_size=2*sizeof(int16_t); // vertex
- datatype=GL_SHORT;
- normalize=true;
- } else {
- elem_size=2*sizeof(GLfloat); // vertex
- datatype=GL_FLOAT;
- }
- bind=true;
- elem_count=2;
-
- } break;
- case VS::ARRAY_WEIGHTS: {
-
- elem_size=VS::ARRAY_WEIGHTS_SIZE*sizeof(GLfloat);
- elem_count=VS::ARRAY_WEIGHTS_SIZE;
- valid_local=false;
- datatype=GL_FLOAT;
-
- } break;
- case VS::ARRAY_BONES: {
-
- elem_size=VS::ARRAY_WEIGHTS_SIZE*sizeof(GLuint);
- elem_count=VS::ARRAY_WEIGHTS_SIZE;
- valid_local=false;
- datatype=GL_FLOAT;
-
-
- } break;
- case VS::ARRAY_INDEX: {
-
- if (index_array_len<=0) {
- ERR_PRINT("index_array_len==NO_INDEX_ARRAY");
- break;
- }
- /* determine wether using 16 or 32 bits indices */
- elem_size=2;
- datatype=GL_UNSIGNED_SHORT;
-
-/*
- if (use_VBO) {
-
- glGenBuffers(1,&surface->index_id);
- ERR_FAIL_COND(surface->index_id==0);
- glBindBuffer(GL_ELEMENT_ARRAY_BUFFER,surface->index_id);
- glBufferData(GL_ELEMENT_ARRAY_BUFFER,index_array_len*elem_size,NULL,GL_STATIC_DRAW);
- glBindBuffer(GL_ELEMENT_ARRAY_BUFFER,0); //unbind
- } else {
- surface->index_array_local = (uint8_t*)memalloc(index_array_len*elem_size);
- };
-*/
- surface->index_array_len=index_array_len; // only way it can exist
- ad.ofs=0;
- ad.size=elem_size;
-
-
- continue;
- } break;
- default: {
- ERR_FAIL( );
- }
- }
-
- ad.ofs=total_elem_size;
- ad.size=elem_size;
- ad.datatype=datatype;
- ad.normalize=normalize;
- ad.bind=bind;
- ad.count=elem_count;
- total_elem_size+=elem_size;
- if (valid_local) {
- surface->local_stride+=elem_size;
- surface->morph_format|=(1<<i);
- }
-
-
- }
-
- surface->stride=total_elem_size;
- surface->array_len=array_len;
- surface->format=format;
- surface->primitive=p_primitive;
- surface->configured_format=0;
- if (keep_copies) {
- surface->data=p_arrays;
- surface->morph_data=p_blend_shapes;
- }
-
- uint8_t *array_ptr=NULL;
- uint8_t *index_array_ptr=NULL;
- DVector<uint8_t> array_pre_vbo;
- DVector<uint8_t>::Write vaw;
- DVector<uint8_t> index_array_pre_vbo;
- DVector<uint8_t>::Write iaw;
-
- /* create pointers */
- if (use_VBO) {
-
- array_pre_vbo.resize(surface->array_len*surface->stride);
- vaw = array_pre_vbo.write();
- array_ptr=vaw.ptr();
-
- if (surface->index_array_len) {
-
- index_array_pre_vbo.resize(surface->index_array_len*surface->array[VS::ARRAY_INDEX].size);
- iaw = index_array_pre_vbo.write();
- index_array_ptr=iaw.ptr();
- }
- } else {
-
- surface->array_local = (uint8_t*)memalloc(surface->array_len*surface->stride);
- array_ptr=(uint8_t*)surface->array_local;
- if (surface->index_array_len) {
- surface->index_array_local = (uint8_t*)memalloc(index_array_len*surface->array[VS::ARRAY_INDEX].size);
- index_array_ptr=(uint8_t*)surface->index_array_local;
- }
- }
-
-
-
- _surface_set_arrays(surface,array_ptr,index_array_ptr,p_arrays,true);
-
-
- /* create buffers!! */
- if (use_VBO) {
- glGenBuffers(1,&surface->vertex_id);
- ERR_FAIL_COND(surface->vertex_id==0);
- glBindBuffer(GL_ARRAY_BUFFER,surface->vertex_id);
- glBufferData(GL_ARRAY_BUFFER,surface->array_len*surface->stride,array_ptr,GL_STATIC_DRAW);
- glBindBuffer(GL_ARRAY_BUFFER,0); //unbind
- if (surface->index_array_len) {
-
- glGenBuffers(1,&surface->index_id);
- ERR_FAIL_COND(surface->index_id==0);
- glBindBuffer(GL_ELEMENT_ARRAY_BUFFER,surface->index_id);
- glBufferData(GL_ELEMENT_ARRAY_BUFFER,index_array_len*surface->array[VS::ARRAY_INDEX].size,index_array_ptr,GL_STATIC_DRAW);
- glBindBuffer(GL_ELEMENT_ARRAY_BUFFER,0); //unbind
-
- }
- }
-
- mesh->surfaces.push_back(surface);
-
-}
-
-Error RasterizerGLES1::_surface_set_arrays(Surface *p_surface, uint8_t *p_mem,uint8_t *p_index_mem,const Array& p_arrays,bool p_main) {
-
- uint32_t stride = p_main ? p_surface->stride : p_surface->local_stride;
-
- for(int ai=0;ai<VS::ARRAY_MAX;ai++) {
- if (ai>=p_arrays.size())
- break;
- if (p_arrays[ai].get_type()==Variant::NIL)
- continue;
- Surface::ArrayData &a=p_surface->array[ai];
-
- switch(ai) {
-
-
- case VS::ARRAY_VERTEX: {
-
- ERR_FAIL_COND_V( p_arrays[ai].get_type() != Variant::VECTOR3_ARRAY, ERR_INVALID_PARAMETER );
-
- DVector<Vector3> array = p_arrays[ai];
- ERR_FAIL_COND_V( array.size() != p_surface->array_len, ERR_INVALID_PARAMETER );
-
-
- DVector<Vector3>::Read read = array.read();
- const Vector3* src=read.ptr();
-
- // setting vertices means regenerating the AABB
- AABB aabb;
-
- float scale=1;
- float max=0;
-
-
- for (int i=0;i<p_surface->array_len;i++) {
-
-
- GLfloat vector[3]={ src[i].x, src[i].y, src[i].z };
-
- copymem(&p_mem[a.ofs+i*stride], vector, a.size);
-
- if (i==0) {
-
- aabb=AABB(src[i],Vector3());
- } else {
-
- aabb.expand_to( src[i] );
- }
- }
-
- if (p_main) {
- p_surface->aabb=aabb;
- p_surface->vertex_scale=scale;
- }
-
-
- } break;
- case VS::ARRAY_NORMAL: {
-
- ERR_FAIL_COND_V( p_arrays[ai].get_type() != Variant::VECTOR3_ARRAY, ERR_INVALID_PARAMETER );
-
- DVector<Vector3> array = p_arrays[ai];
- ERR_FAIL_COND_V( array.size() != p_surface->array_len, ERR_INVALID_PARAMETER );
-
-
- DVector<Vector3>::Read read = array.read();
- const Vector3* src=read.ptr();
-
- // setting vertices means regenerating the AABB
-
- for (int i=0;i<p_surface->array_len;i++) {
-
-
- GLfloat vector[3]={ src[i].x, src[i].y, src[i].z };
- copymem(&p_mem[a.ofs+i*stride], vector, a.size);
-
- }
-
-
- } break;
- case VS::ARRAY_TANGENT: {
-
- ERR_FAIL_COND_V( p_arrays[ai].get_type() != Variant::REAL_ARRAY, ERR_INVALID_PARAMETER );
-
- DVector<real_t> array = p_arrays[ai];
-
- ERR_FAIL_COND_V( array.size() != p_surface->array_len*4, ERR_INVALID_PARAMETER );
-
-
- DVector<real_t>::Read read = array.read();
- const real_t* src = read.ptr();
-
- for (int i=0;i<p_surface->array_len;i++) {
-
- GLfloat xyzw[4]={
- src[i*4+0],
- src[i*4+1],
- src[i*4+2],
- src[i*4+3]
- };
-
- copymem(&p_mem[a.ofs+i*stride], xyzw, a.size);
-
- }
-
- } break;
- case VS::ARRAY_COLOR: {
-
- ERR_FAIL_COND_V( p_arrays[ai].get_type() != Variant::COLOR_ARRAY, ERR_INVALID_PARAMETER );
-
-
- DVector<Color> array = p_arrays[ai];
-
- ERR_FAIL_COND_V( array.size() != p_surface->array_len, ERR_INVALID_PARAMETER );
-
-
- DVector<Color>::Read read = array.read();
- const Color* src = read.ptr();
- bool alpha=false;
-
- for (int i=0;i<p_surface->array_len;i++) {
-
- if (src[i].a<0.98) // tolerate alpha a bit, for crappy exporters
- alpha=true;
-
- uint8_t colors[4];
-
- for(int j=0;j<4;j++) {
-
- colors[j]=CLAMP( int((src[i][j])*255.0), 0,255 );
- }
-
- copymem(&p_mem[a.ofs+i*stride], colors, a.size);
-
- }
-
- if (p_main)
- p_surface->has_alpha=alpha;
-
- } break;
- case VS::ARRAY_TEX_UV:
- case VS::ARRAY_TEX_UV2: {
-
- ERR_FAIL_COND_V( p_arrays[ai].get_type() != Variant::VECTOR3_ARRAY && p_arrays[ai].get_type() != Variant::VECTOR2_ARRAY, ERR_INVALID_PARAMETER );
-
- DVector<Vector2> array = p_arrays[ai];
-
- ERR_FAIL_COND_V( array.size() != p_surface->array_len , ERR_INVALID_PARAMETER);
-
- DVector<Vector2>::Read read = array.read();
-
- const Vector2 * src=read.ptr();
- float scale=1.0;
-
-
- for (int i=0;i<p_surface->array_len;i++) {
-
- GLfloat uv[2]={ src[i].x , src[i].y };
-
- copymem(&p_mem[a.ofs+i*stride], uv, a.size);
-
- }
-
- if (p_main) {
-
- if (ai==VS::ARRAY_TEX_UV) {
-
- p_surface->uv_scale=scale;
- }
- if (ai==VS::ARRAY_TEX_UV2) {
-
- p_surface->uv2_scale=scale;
- }
- }
-
- } break;
- case VS::ARRAY_BONES:
- case VS::ARRAY_WEIGHTS: {
-
-
- ERR_FAIL_COND_V( p_arrays[ai].get_type() != Variant::REAL_ARRAY, ERR_INVALID_PARAMETER );
-
- DVector<real_t> array = p_arrays[ai];
-
- ERR_FAIL_COND_V( array.size() != p_surface->array_len*VS::ARRAY_WEIGHTS_SIZE, ERR_INVALID_PARAMETER );
-
-
- DVector<real_t>::Read read = array.read();
-
- const real_t * src = read.ptr();
-
- p_surface->max_bone=0;
-
- for (int i=0;i<p_surface->array_len;i++) {
-
- GLfloat data[VS::ARRAY_WEIGHTS_SIZE];
- for (int j=0;j<VS::ARRAY_WEIGHTS_SIZE;j++) {
- data[j]=src[i*VS::ARRAY_WEIGHTS_SIZE+j];
- if (ai==VS::ARRAY_BONES) {
-
- p_surface->max_bone=MAX(data[j],p_surface->max_bone);
- }
- }
-
- copymem(&p_mem[a.ofs+i*stride], data, a.size);
-
-
- }
-
- } break;
- case VS::ARRAY_INDEX: {
-
- ERR_FAIL_COND_V( p_surface->index_array_len<=0, ERR_INVALID_DATA );
- ERR_FAIL_COND_V( p_arrays[ai].get_type() != Variant::INT_ARRAY, ERR_INVALID_PARAMETER );
-
- DVector<int> indices = p_arrays[ai];
- ERR_FAIL_COND_V( indices.size() == 0, ERR_INVALID_PARAMETER );
- ERR_FAIL_COND_V( indices.size() != p_surface->index_array_len, ERR_INVALID_PARAMETER );
-
- /* determine wether using 16 or 32 bits indices */
-
- DVector<int>::Read read = indices.read();
- const int *src=read.ptr();
-
- for (int i=0;i<p_surface->index_array_len;i++) {
-
-
- if (a.size==2) {
- uint16_t v=src[i];
-
- copymem(&p_index_mem[i*a.size], &v, a.size);
- } else {
- uint32_t v=src[i];
-
- copymem(&p_index_mem[i*a.size], &v, a.size);
- }
- }
-
-
- } break;
-
-
- default: { ERR_FAIL_V(ERR_INVALID_PARAMETER);}
- }
-
- p_surface->configured_format|=(1<<ai);
- }
-
- return OK;
-}
-
-
-
-void RasterizerGLES1::mesh_add_custom_surface(RID p_mesh,const Variant& p_dat) {
-
- ERR_EXPLAIN("OpenGL Rasterizer does not support custom surfaces. Running on wrong platform?");
- ERR_FAIL_V();
-}
-
-Array RasterizerGLES1::mesh_get_surface_arrays(RID p_mesh,int p_surface) const {
-
- Mesh *mesh = mesh_owner.get( p_mesh );
- ERR_FAIL_COND_V(!mesh,Array());
- ERR_FAIL_INDEX_V(p_surface, mesh->surfaces.size(), Array() );
- Surface *surface = mesh->surfaces[p_surface];
- ERR_FAIL_COND_V( !surface, Array() );
-
- return surface->data;
-
-
-}
-Array RasterizerGLES1::mesh_get_surface_morph_arrays(RID p_mesh,int p_surface) const{
-
- Mesh *mesh = mesh_owner.get( p_mesh );
- ERR_FAIL_COND_V(!mesh,Array());
- ERR_FAIL_INDEX_V(p_surface, mesh->surfaces.size(), Array() );
- Surface *surface = mesh->surfaces[p_surface];
- ERR_FAIL_COND_V( !surface, Array() );
-
- return surface->morph_data;
-
-}
-
-
-void RasterizerGLES1::mesh_set_morph_target_count(RID p_mesh,int p_amount) {
-
- Mesh *mesh = mesh_owner.get( p_mesh );
- ERR_FAIL_COND(!mesh);
- ERR_FAIL_COND( mesh->surfaces.size()!=0 );
-
- mesh->morph_target_count=p_amount;
-
-}
-
-int RasterizerGLES1::mesh_get_morph_target_count(RID p_mesh) const{
-
- Mesh *mesh = mesh_owner.get( p_mesh );
- ERR_FAIL_COND_V(!mesh,-1);
-
- return mesh->morph_target_count;
-
-}
-
-void RasterizerGLES1::mesh_set_morph_target_mode(RID p_mesh,VS::MorphTargetMode p_mode) {
-
- ERR_FAIL_INDEX(p_mode,2);
- Mesh *mesh = mesh_owner.get( p_mesh );
- ERR_FAIL_COND(!mesh);
-
- mesh->morph_target_mode=p_mode;
-
-}
-
-VS::MorphTargetMode RasterizerGLES1::mesh_get_morph_target_mode(RID p_mesh) const {
-
- Mesh *mesh = mesh_owner.get( p_mesh );
- ERR_FAIL_COND_V(!mesh,VS::MORPH_MODE_NORMALIZED);
-
- return mesh->morph_target_mode;
-
-}
-
-
-
-void RasterizerGLES1::mesh_surface_set_material(RID p_mesh, int p_surface, RID p_material,bool p_owned) {
-
- Mesh *mesh = mesh_owner.get( p_mesh );
- ERR_FAIL_COND(!mesh);
- ERR_FAIL_INDEX(p_surface, mesh->surfaces.size() );
- Surface *surface = mesh->surfaces[p_surface];
- ERR_FAIL_COND( !surface);
-
- if (surface->material_owned && surface->material.is_valid())
- free(surface->material);
-
- surface->material_owned=p_owned;
-
- surface->material=p_material;
-}
-
-RID RasterizerGLES1::mesh_surface_get_material(RID p_mesh, int p_surface) const {
-
- Mesh *mesh = mesh_owner.get( p_mesh );
- ERR_FAIL_COND_V(!mesh,RID());
- ERR_FAIL_INDEX_V(p_surface, mesh->surfaces.size(), RID() );
- Surface *surface = mesh->surfaces[p_surface];
- ERR_FAIL_COND_V( !surface, RID() );
-
- return surface->material;
-}
-
-int RasterizerGLES1::mesh_surface_get_array_len(RID p_mesh, int p_surface) const {
-
- Mesh *mesh = mesh_owner.get( p_mesh );
- ERR_FAIL_COND_V(!mesh,-1);
- ERR_FAIL_INDEX_V(p_surface, mesh->surfaces.size(), -1 );
- Surface *surface = mesh->surfaces[p_surface];
- ERR_FAIL_COND_V( !surface, -1 );
-
- return surface->array_len;
-}
-int RasterizerGLES1::mesh_surface_get_array_index_len(RID p_mesh, int p_surface) const {
-
- Mesh *mesh = mesh_owner.get( p_mesh );
- ERR_FAIL_COND_V(!mesh,-1);
- ERR_FAIL_INDEX_V(p_surface, mesh->surfaces.size(), -1 );
- Surface *surface = mesh->surfaces[p_surface];
- ERR_FAIL_COND_V( !surface, -1 );
-
- return surface->index_array_len;
-}
-uint32_t RasterizerGLES1::mesh_surface_get_format(RID p_mesh, int p_surface) const {
-
- Mesh *mesh = mesh_owner.get( p_mesh );
- ERR_FAIL_COND_V(!mesh,0);
- ERR_FAIL_INDEX_V(p_surface, mesh->surfaces.size(), 0 );
- Surface *surface = mesh->surfaces[p_surface];
- ERR_FAIL_COND_V( !surface, 0 );
-
- return surface->format;
-}
-VS::PrimitiveType RasterizerGLES1::mesh_surface_get_primitive_type(RID p_mesh, int p_surface) const {
-
- Mesh *mesh = mesh_owner.get( p_mesh );
- ERR_FAIL_COND_V(!mesh,VS::PRIMITIVE_POINTS);
- ERR_FAIL_INDEX_V(p_surface, mesh->surfaces.size(), VS::PRIMITIVE_POINTS );
- Surface *surface = mesh->surfaces[p_surface];
- ERR_FAIL_COND_V( !surface, VS::PRIMITIVE_POINTS );
-
- return surface->primitive;
-}
-
-void RasterizerGLES1::mesh_remove_surface(RID p_mesh,int p_index) {
-
- Mesh *mesh = mesh_owner.get( p_mesh );
- ERR_FAIL_COND(!mesh);
- ERR_FAIL_INDEX(p_index, mesh->surfaces.size() );
- Surface *surface = mesh->surfaces[p_index];
- ERR_FAIL_COND( !surface);
-
- if (mesh->morph_target_count) {
- for(int i=0;i<mesh->morph_target_count;i++)
- memfree(surface->morph_targets_local[i].array);
- memfree( surface->morph_targets_local );
- }
-
- memdelete( mesh->surfaces[p_index] );
- mesh->surfaces.remove(p_index);
-
-}
-int RasterizerGLES1::mesh_get_surface_count(RID p_mesh) const {
-
- Mesh *mesh = mesh_owner.get( p_mesh );
- ERR_FAIL_COND_V(!mesh,-1);
-
- return mesh->surfaces.size();
-}
-
-AABB RasterizerGLES1::mesh_get_aabb(RID p_mesh,RID p_skeleton) const {
-
- Mesh *mesh = mesh_owner.get( p_mesh );
- ERR_FAIL_COND_V(!mesh,AABB());
-
- if (mesh->custom_aabb!=AABB())
- return mesh->custom_aabb;
-
- AABB aabb;
-
- for (int i=0;i<mesh->surfaces.size();i++) {
-
- if (i==0)
- aabb=mesh->surfaces[i]->aabb;
- else
- aabb.merge_with(mesh->surfaces[i]->aabb);
- }
-
- return aabb;
-}
-
-void RasterizerGLES1::mesh_set_custom_aabb(RID p_mesh,const AABB& p_aabb) {
-
- Mesh *mesh = mesh_owner.get( p_mesh );
- ERR_FAIL_COND(!mesh);
-
- mesh->custom_aabb=p_aabb;
-
-}
-
-AABB RasterizerGLES1::mesh_get_custom_aabb(RID p_mesh) const {
-
- const Mesh *mesh = mesh_owner.get( p_mesh );
- ERR_FAIL_COND_V(!mesh,AABB());
-
- return mesh->custom_aabb;
-}
-
-
-/* MULTIMESH API */
-
-RID RasterizerGLES1::multimesh_create() {
-
- return multimesh_owner.make_rid( memnew( MultiMesh ));
-}
-
-void RasterizerGLES1::multimesh_set_instance_count(RID p_multimesh,int p_count) {
-
- MultiMesh *multimesh = multimesh_owner.get(p_multimesh);
- ERR_FAIL_COND(!multimesh);
-
- multimesh->elements.clear(); // make sure to delete everything, so it "fails" in all implementations
- multimesh->elements.resize(p_count);
-
-}
-int RasterizerGLES1::multimesh_get_instance_count(RID p_multimesh) const {
-
- MultiMesh *multimesh = multimesh_owner.get(p_multimesh);
- ERR_FAIL_COND_V(!multimesh,-1);
-
- return multimesh->elements.size();
-}
-
-void RasterizerGLES1::multimesh_set_mesh(RID p_multimesh,RID p_mesh) {
-
- MultiMesh *multimesh = multimesh_owner.get(p_multimesh);
- ERR_FAIL_COND(!multimesh);
-
- multimesh->mesh=p_mesh;
-
-}
-void RasterizerGLES1::multimesh_set_aabb(RID p_multimesh,const AABB& p_aabb) {
-
- MultiMesh *multimesh = multimesh_owner.get(p_multimesh);
- ERR_FAIL_COND(!multimesh);
- multimesh->aabb=p_aabb;
-}
-void RasterizerGLES1::multimesh_instance_set_transform(RID p_multimesh,int p_index,const Transform& p_transform) {
-
- MultiMesh *multimesh = multimesh_owner.get(p_multimesh);
- ERR_FAIL_COND(!multimesh);
- ERR_FAIL_INDEX(p_index,multimesh->elements.size());
- MultiMesh::Element &e=multimesh->elements[p_index];
-
- e.matrix[0]=p_transform.basis.elements[0][0];
- e.matrix[1]=p_transform.basis.elements[1][0];
- e.matrix[2]=p_transform.basis.elements[2][0];
- e.matrix[3]=0;
- e.matrix[4]=p_transform.basis.elements[0][1];
- e.matrix[5]=p_transform.basis.elements[1][1];
- e.matrix[6]=p_transform.basis.elements[2][1];
- e.matrix[7]=0;
- e.matrix[8]=p_transform.basis.elements[0][2];
- e.matrix[9]=p_transform.basis.elements[1][2];
- e.matrix[10]=p_transform.basis.elements[2][2];
- e.matrix[11]=0;
- e.matrix[12]=p_transform.origin.x;
- e.matrix[13]=p_transform.origin.y;
- e.matrix[14]=p_transform.origin.z;
- e.matrix[15]=1;
-
-}
-void RasterizerGLES1::multimesh_instance_set_color(RID p_multimesh,int p_index,const Color& p_color) {
-
- MultiMesh *multimesh = multimesh_owner.get(p_multimesh);
- ERR_FAIL_COND(!multimesh)
- ERR_FAIL_INDEX(p_index,multimesh->elements.size());
- MultiMesh::Element &e=multimesh->elements[p_index];
- e.color[0]=CLAMP(p_color.r*255,0,255);
- e.color[1]=CLAMP(p_color.g*255,0,255);
- e.color[2]=CLAMP(p_color.b*255,0,255);
- e.color[3]=CLAMP(p_color.a*255,0,255);
-
-
-}
-
-RID RasterizerGLES1::multimesh_get_mesh(RID p_multimesh) const {
-
- MultiMesh *multimesh = multimesh_owner.get(p_multimesh);
- ERR_FAIL_COND_V(!multimesh,RID());
-
- return multimesh->mesh;
-}
-AABB RasterizerGLES1::multimesh_get_aabb(RID p_multimesh) const {
-
- MultiMesh *multimesh = multimesh_owner.get(p_multimesh);
- ERR_FAIL_COND_V(!multimesh,AABB());
-
- return multimesh->aabb;
-}
-
-Transform RasterizerGLES1::multimesh_instance_get_transform(RID p_multimesh,int p_index) const {
-
- MultiMesh *multimesh = multimesh_owner.get(p_multimesh);
- ERR_FAIL_COND_V(!multimesh,Transform());
-
- ERR_FAIL_INDEX_V(p_index,multimesh->elements.size(),Transform());
- MultiMesh::Element &e=multimesh->elements[p_index];
-
- Transform tr;
-
- tr.basis.elements[0][0]=e.matrix[0];
- tr.basis.elements[1][0]=e.matrix[1];
- tr.basis.elements[2][0]=e.matrix[2];
- tr.basis.elements[0][1]=e.matrix[4];
- tr.basis.elements[1][1]=e.matrix[5];
- tr.basis.elements[2][1]=e.matrix[6];
- tr.basis.elements[0][2]=e.matrix[8];
- tr.basis.elements[1][2]=e.matrix[9];
- tr.basis.elements[2][2]=e.matrix[10];
- tr.origin.x=e.matrix[12];
- tr.origin.y=e.matrix[13];
- tr.origin.z=e.matrix[14];
-
- return tr;
-}
-Color RasterizerGLES1::multimesh_instance_get_color(RID p_multimesh,int p_index) const {
-
- MultiMesh *multimesh = multimesh_owner.get(p_multimesh);
- ERR_FAIL_COND_V(!multimesh,Color());
- ERR_FAIL_INDEX_V(p_index,multimesh->elements.size(),Color());
- MultiMesh::Element &e=multimesh->elements[p_index];
- Color c;
- c.r=e.color[0]/255.0;
- c.g=e.color[1]/255.0;
- c.b=e.color[2]/255.0;
- c.a=e.color[3]/255.0;
-
- return c;
-
-}
-
-void RasterizerGLES1::multimesh_set_visible_instances(RID p_multimesh,int p_visible) {
-
- MultiMesh *multimesh = multimesh_owner.get(p_multimesh);
- ERR_FAIL_COND(!multimesh);
- multimesh->visible=p_visible;
-
-}
-
-int RasterizerGLES1::multimesh_get_visible_instances(RID p_multimesh) const {
-
- MultiMesh *multimesh = multimesh_owner.get(p_multimesh);
- ERR_FAIL_COND_V(!multimesh,-1);
- return multimesh->visible;
-
-}
-
-/* IMMEDIATE API */
-
-
-RID RasterizerGLES1::immediate_create() {
-
- Immediate *im = memnew( Immediate );
- return immediate_owner.make_rid(im);
-
-}
-
-void RasterizerGLES1::immediate_begin(RID p_immediate, VS::PrimitiveType p_rimitive, RID p_texture){
-
-
-}
-void RasterizerGLES1::immediate_vertex(RID p_immediate,const Vector3& p_vertex){
-
-
-}
-void RasterizerGLES1::immediate_normal(RID p_immediate,const Vector3& p_normal){
-
-
-}
-void RasterizerGLES1::immediate_tangent(RID p_immediate,const Plane& p_tangent){
-
-
-}
-void RasterizerGLES1::immediate_color(RID p_immediate,const Color& p_color){
-
-
-}
-void RasterizerGLES1::immediate_uv(RID p_immediate,const Vector2& tex_uv){
-
-
-}
-void RasterizerGLES1::immediate_uv2(RID p_immediate,const Vector2& tex_uv){
-
-
-}
-
-void RasterizerGLES1::immediate_end(RID p_immediate){
-
-
-}
-void RasterizerGLES1::immediate_clear(RID p_immediate) {
-
-
-}
-
-AABB RasterizerGLES1::immediate_get_aabb(RID p_immediate) const {
-
- return AABB(Vector3(-1,-1,-1),Vector3(2,2,2));
-}
-
-void RasterizerGLES1::immediate_set_material(RID p_immediate,RID p_material) {
-
- Immediate *im = immediate_owner.get(p_immediate);
- ERR_FAIL_COND(!im);
- im->material=p_material;
-}
-
-RID RasterizerGLES1::immediate_get_material(RID p_immediate) const {
-
- const Immediate *im = immediate_owner.get(p_immediate);
- ERR_FAIL_COND_V(!im,RID());
- return im->material;
-
-}
-
-
-/* PARTICLES API */
-
-RID RasterizerGLES1::particles_create() {
-
- Particles *particles = memnew( Particles );
- ERR_FAIL_COND_V(!particles,RID());
- return particles_owner.make_rid(particles);
-}
-
-void RasterizerGLES1::particles_set_amount(RID p_particles, int p_amount) {
-
- ERR_FAIL_COND(p_amount<1);
- Particles* particles = particles_owner.get( p_particles );
- ERR_FAIL_COND(!particles);
- particles->data.amount=p_amount;
-
-}
-
-int RasterizerGLES1::particles_get_amount(RID p_particles) const {
-
- Particles* particles = particles_owner.get( p_particles );
- ERR_FAIL_COND_V(!particles,-1);
- return particles->data.amount;
-
-}
-
-void RasterizerGLES1::particles_set_emitting(RID p_particles, bool p_emitting) {
-
- Particles* particles = particles_owner.get( p_particles );
- ERR_FAIL_COND(!particles);
- particles->data.emitting=p_emitting;;
-
-}
-bool RasterizerGLES1::particles_is_emitting(RID p_particles) const {
-
- const Particles* particles = particles_owner.get( p_particles );
- ERR_FAIL_COND_V(!particles,false);
- return particles->data.emitting;
-
-}
-
-void RasterizerGLES1::particles_set_visibility_aabb(RID p_particles, const AABB& p_visibility) {
-
- Particles* particles = particles_owner.get( p_particles );
- ERR_FAIL_COND(!particles);
- particles->data.visibility_aabb=p_visibility;
-
-}
-
-void RasterizerGLES1::particles_set_emission_half_extents(RID p_particles, const Vector3& p_half_extents) {
-
- Particles* particles = particles_owner.get( p_particles );
- ERR_FAIL_COND(!particles);
-
- particles->data.emission_half_extents=p_half_extents;
-}
-Vector3 RasterizerGLES1::particles_get_emission_half_extents(RID p_particles) const {
-
- Particles* particles = particles_owner.get( p_particles );
- ERR_FAIL_COND_V(!particles,Vector3());
-
- return particles->data.emission_half_extents;
-}
-
-void RasterizerGLES1::particles_set_emission_base_velocity(RID p_particles, const Vector3& p_base_velocity) {
-
- Particles* particles = particles_owner.get( p_particles );
- ERR_FAIL_COND(!particles);
-
- particles->data.emission_base_velocity=p_base_velocity;
-}
-
-Vector3 RasterizerGLES1::particles_get_emission_base_velocity(RID p_particles) const {
-
- Particles* particles = particles_owner.get( p_particles );
- ERR_FAIL_COND_V(!particles,Vector3());
-
- return particles->data.emission_base_velocity;
-}
-
-
-void RasterizerGLES1::particles_set_emission_points(RID p_particles, const DVector<Vector3>& p_points) {
-
- Particles* particles = particles_owner.get( p_particles );
- ERR_FAIL_COND(!particles);
-
- particles->data.emission_points=p_points;
-}
-
-DVector<Vector3> RasterizerGLES1::particles_get_emission_points(RID p_particles) const {
-
- Particles* particles = particles_owner.get( p_particles );
- ERR_FAIL_COND_V(!particles,DVector<Vector3>());
-
- return particles->data.emission_points;
-
-}
-
-void RasterizerGLES1::particles_set_gravity_normal(RID p_particles, const Vector3& p_normal) {
-
- Particles* particles = particles_owner.get( p_particles );
- ERR_FAIL_COND(!particles);
-
- particles->data.gravity_normal=p_normal;
-
-}
-Vector3 RasterizerGLES1::particles_get_gravity_normal(RID p_particles) const {
-
- Particles* particles = particles_owner.get( p_particles );
- ERR_FAIL_COND_V(!particles,Vector3());
-
- return particles->data.gravity_normal;
-}
-
-
-AABB RasterizerGLES1::particles_get_visibility_aabb(RID p_particles) const {
-
- const Particles* particles = particles_owner.get( p_particles );
- ERR_FAIL_COND_V(!particles,AABB());
- return particles->data.visibility_aabb;
-
-}
-
-void RasterizerGLES1::particles_set_variable(RID p_particles, VS::ParticleVariable p_variable,float p_value) {
-
- ERR_FAIL_INDEX(p_variable,VS::PARTICLE_VAR_MAX);
-
- Particles* particles = particles_owner.get( p_particles );
- ERR_FAIL_COND(!particles);
- particles->data.particle_vars[p_variable]=p_value;
-
-}
-float RasterizerGLES1::particles_get_variable(RID p_particles, VS::ParticleVariable p_variable) const {
-
- const Particles* particles = particles_owner.get( p_particles );
- ERR_FAIL_COND_V(!particles,-1);
- return particles->data.particle_vars[p_variable];
-}
-
-void RasterizerGLES1::particles_set_randomness(RID p_particles, VS::ParticleVariable p_variable,float p_randomness) {
-
- Particles* particles = particles_owner.get( p_particles );
- ERR_FAIL_COND(!particles);
- particles->data.particle_randomness[p_variable]=p_randomness;
-
-}
-float RasterizerGLES1::particles_get_randomness(RID p_particles, VS::ParticleVariable p_variable) const {
-
- const Particles* particles = particles_owner.get( p_particles );
- ERR_FAIL_COND_V(!particles,-1);
- return particles->data.particle_randomness[p_variable];
-
-}
-
-void RasterizerGLES1::particles_set_color_phases(RID p_particles, int p_phases) {
-
- Particles* particles = particles_owner.get( p_particles );
- ERR_FAIL_COND(!particles);
- ERR_FAIL_COND( p_phases<0 || p_phases>VS::MAX_PARTICLE_COLOR_PHASES );
- particles->data.color_phase_count=p_phases;
-
-}
-int RasterizerGLES1::particles_get_color_phases(RID p_particles) const {
-
- Particles* particles = particles_owner.get( p_particles );
- ERR_FAIL_COND_V(!particles,-1);
- return particles->data.color_phase_count;
-}
-
-
-void RasterizerGLES1::particles_set_color_phase_pos(RID p_particles, int p_phase, float p_pos) {
-
- ERR_FAIL_INDEX(p_phase, VS::MAX_PARTICLE_COLOR_PHASES);
- if (p_pos<0.0)
- p_pos=0.0;
- if (p_pos>1.0)
- p_pos=1.0;
-
- Particles* particles = particles_owner.get( p_particles );
- ERR_FAIL_COND(!particles);
- particles->data.color_phases[p_phase].pos=p_pos;
-
-}
-float RasterizerGLES1::particles_get_color_phase_pos(RID p_particles, int p_phase) const {
-
- ERR_FAIL_INDEX_V(p_phase, VS::MAX_PARTICLE_COLOR_PHASES, -1.0);
-
- const Particles* particles = particles_owner.get( p_particles );
- ERR_FAIL_COND_V(!particles,-1);
- return particles->data.color_phases[p_phase].pos;
-
-}
-
-void RasterizerGLES1::particles_set_color_phase_color(RID p_particles, int p_phase, const Color& p_color) {
-
- ERR_FAIL_INDEX(p_phase, VS::MAX_PARTICLE_COLOR_PHASES);
- Particles* particles = particles_owner.get( p_particles );
- ERR_FAIL_COND(!particles);
- particles->data.color_phases[p_phase].color=p_color;
-
- //update alpha
- particles->has_alpha=false;
- for(int i=0;i<VS::MAX_PARTICLE_COLOR_PHASES;i++) {
- if (particles->data.color_phases[i].color.a<0.99)
- particles->has_alpha=true;
- }
-
-}
-
-Color RasterizerGLES1::particles_get_color_phase_color(RID p_particles, int p_phase) const {
-
- ERR_FAIL_INDEX_V(p_phase, VS::MAX_PARTICLE_COLOR_PHASES, Color());
-
- const Particles* particles = particles_owner.get( p_particles );
- ERR_FAIL_COND_V(!particles,Color());
- return particles->data.color_phases[p_phase].color;
-
-}
-
-void RasterizerGLES1::particles_set_attractors(RID p_particles, int p_attractors) {
-
- Particles* particles = particles_owner.get( p_particles );
- ERR_FAIL_COND(!particles);
- ERR_FAIL_COND( p_attractors<0 || p_attractors>VisualServer::MAX_PARTICLE_ATTRACTORS );
- particles->data.attractor_count=p_attractors;
-
-}
-int RasterizerGLES1::particles_get_attractors(RID p_particles) const {
-
- Particles* particles = particles_owner.get( p_particles );
- ERR_FAIL_COND_V(!particles,-1);
- return particles->data.attractor_count;
-}
-
-void RasterizerGLES1::particles_set_attractor_pos(RID p_particles, int p_attractor, const Vector3& p_pos) {
-
- Particles* particles = particles_owner.get( p_particles );
- ERR_FAIL_COND(!particles);
- ERR_FAIL_INDEX(p_attractor,particles->data.attractor_count);
- particles->data.attractors[p_attractor].pos=p_pos;;
-}
-Vector3 RasterizerGLES1::particles_get_attractor_pos(RID p_particles,int p_attractor) const {
-
- Particles* particles = particles_owner.get( p_particles );
- ERR_FAIL_COND_V(!particles,Vector3());
- ERR_FAIL_INDEX_V(p_attractor,particles->data.attractor_count,Vector3());
- return particles->data.attractors[p_attractor].pos;
-}
-
-void RasterizerGLES1::particles_set_attractor_strength(RID p_particles, int p_attractor, float p_force) {
-
- Particles* particles = particles_owner.get( p_particles );
- ERR_FAIL_COND(!particles);
- ERR_FAIL_INDEX(p_attractor,particles->data.attractor_count);
- particles->data.attractors[p_attractor].force=p_force;
-}
-
-float RasterizerGLES1::particles_get_attractor_strength(RID p_particles,int p_attractor) const {
-
- Particles* particles = particles_owner.get( p_particles );
- ERR_FAIL_COND_V(!particles,0);
- ERR_FAIL_INDEX_V(p_attractor,particles->data.attractor_count,0);
- return particles->data.attractors[p_attractor].force;
-}
-
-void RasterizerGLES1::particles_set_material(RID p_particles, RID p_material,bool p_owned) {
-
- Particles* particles = particles_owner.get( p_particles );
- ERR_FAIL_COND(!particles);
- if (particles->material_owned && particles->material.is_valid())
- free(particles->material);
-
- particles->material_owned=p_owned;
-
- particles->material=p_material;
-
-}
-RID RasterizerGLES1::particles_get_material(RID p_particles) const {
-
- const Particles* particles = particles_owner.get( p_particles );
- ERR_FAIL_COND_V(!particles,RID());
- return particles->material;
-
-}
-
-void RasterizerGLES1::particles_set_use_local_coordinates(RID p_particles, bool p_enable) {
-
- Particles* particles = particles_owner.get( p_particles );
- ERR_FAIL_COND(!particles);
- particles->data.local_coordinates=p_enable;
-
-}
-
-bool RasterizerGLES1::particles_is_using_local_coordinates(RID p_particles) const {
-
- const Particles* particles = particles_owner.get( p_particles );
- ERR_FAIL_COND_V(!particles,false);
- return particles->data.local_coordinates;
-}
-bool RasterizerGLES1::particles_has_height_from_velocity(RID p_particles) const {
-
- const Particles* particles = particles_owner.get( p_particles );
- ERR_FAIL_COND_V(!particles,false);
- return particles->data.height_from_velocity;
-}
-
-void RasterizerGLES1::particles_set_height_from_velocity(RID p_particles, bool p_enable) {
-
- Particles* particles = particles_owner.get( p_particles );
- ERR_FAIL_COND(!particles);
- particles->data.height_from_velocity=p_enable;
-
-}
-
-AABB RasterizerGLES1::particles_get_aabb(RID p_particles) const {
-
- const Particles* particles = particles_owner.get( p_particles );
- ERR_FAIL_COND_V(!particles,AABB());
- return particles->data.visibility_aabb;
-}
-
-/* SKELETON API */
-
-RID RasterizerGLES1::skeleton_create() {
-
- Skeleton *skeleton = memnew( Skeleton );
- ERR_FAIL_COND_V(!skeleton,RID());
- return skeleton_owner.make_rid( skeleton );
-}
-void RasterizerGLES1::skeleton_resize(RID p_skeleton,int p_bones) {
-
- Skeleton *skeleton = skeleton_owner.get( p_skeleton );
- ERR_FAIL_COND(!skeleton);
- if (p_bones == skeleton->bones.size()) {
- return;
- };
-
- skeleton->bones.resize(p_bones);
-
-}
-int RasterizerGLES1::skeleton_get_bone_count(RID p_skeleton) const {
-
- Skeleton *skeleton = skeleton_owner.get( p_skeleton );
- ERR_FAIL_COND_V(!skeleton, -1);
- return skeleton->bones.size();
-}
-void RasterizerGLES1::skeleton_bone_set_transform(RID p_skeleton,int p_bone, const Transform& p_transform) {
-
- Skeleton *skeleton = skeleton_owner.get( p_skeleton );
- ERR_FAIL_COND(!skeleton);
- ERR_FAIL_INDEX( p_bone, skeleton->bones.size() );
-
- skeleton->bones[p_bone] = p_transform;
-}
-
-Transform RasterizerGLES1::skeleton_bone_get_transform(RID p_skeleton,int p_bone) {
-
- Skeleton *skeleton = skeleton_owner.get( p_skeleton );
- ERR_FAIL_COND_V(!skeleton, Transform());
- ERR_FAIL_INDEX_V( p_bone, skeleton->bones.size(), Transform() );
-
- // something
- return skeleton->bones[p_bone];
-}
-
-
-/* LIGHT API */
-
-RID RasterizerGLES1::light_create(VS::LightType p_type) {
-
- Light *light = memnew( Light );
- light->type=p_type;
- return light_owner.make_rid(light);
-}
-
-VS::LightType RasterizerGLES1::light_get_type(RID p_light) const {
-
- Light *light = light_owner.get(p_light);
- ERR_FAIL_COND_V(!light,VS::LIGHT_OMNI);
- return light->type;
-}
-
-void RasterizerGLES1::light_set_color(RID p_light,VS::LightColor p_type, const Color& p_color) {
-
- Light *light = light_owner.get(p_light);
- ERR_FAIL_COND(!light);
- ERR_FAIL_INDEX( p_type, 3 );
- light->colors[p_type]=p_color;
-}
-Color RasterizerGLES1::light_get_color(RID p_light,VS::LightColor p_type) const {
-
- Light *light = light_owner.get(p_light);
- ERR_FAIL_COND_V(!light, Color());
- ERR_FAIL_INDEX_V( p_type, 3, Color() );
- return light->colors[p_type];
-}
-
-void RasterizerGLES1::light_set_shadow(RID p_light,bool p_enabled) {
-
- Light *light = light_owner.get(p_light);
- ERR_FAIL_COND(!light);
- light->shadow_enabled=p_enabled;
-}
-
-bool RasterizerGLES1::light_has_shadow(RID p_light) const {
-
- Light *light = light_owner.get(p_light);
- ERR_FAIL_COND_V(!light,false);
- return light->shadow_enabled;
-}
-
-void RasterizerGLES1::light_set_volumetric(RID p_light,bool p_enabled) {
-
- Light *light = light_owner.get(p_light);
- ERR_FAIL_COND(!light);
- light->volumetric_enabled=p_enabled;
-
-}
-bool RasterizerGLES1::light_is_volumetric(RID p_light) const {
-
- Light *light = light_owner.get(p_light);
- ERR_FAIL_COND_V(!light,false);
- return light->volumetric_enabled;
-}
-
-void RasterizerGLES1::light_set_projector(RID p_light,RID p_texture) {
-
- Light *light = light_owner.get(p_light);
- ERR_FAIL_COND(!light);
- light->projector=p_texture;
-}
-RID RasterizerGLES1::light_get_projector(RID p_light) const {
-
- Light *light = light_owner.get(p_light);
- ERR_FAIL_COND_V(!light,RID());
- return light->projector;
-}
-
-void RasterizerGLES1::light_set_var(RID p_light, VS::LightParam p_var, float p_value) {
-
- Light * light = light_owner.get( p_light );
- ERR_FAIL_COND(!light);
- ERR_FAIL_INDEX( p_var, VS::LIGHT_PARAM_MAX );
-
- light->vars[p_var]=p_value;
-}
-float RasterizerGLES1::light_get_var(RID p_light, VS::LightParam p_var) const {
-
- Light * light = light_owner.get( p_light );
- ERR_FAIL_COND_V(!light,0);
-
- ERR_FAIL_INDEX_V( p_var, VS::LIGHT_PARAM_MAX,0 );
-
- return light->vars[p_var];
-}
-
-void RasterizerGLES1::light_set_operator(RID p_light,VS::LightOp p_op) {
-
- Light * light = light_owner.get( p_light );
- ERR_FAIL_COND(!light);
-
-
-};
-
-VS::LightOp RasterizerGLES1::light_get_operator(RID p_light) const {
-
- return VS::LightOp(0);
-};
-
-void RasterizerGLES1::light_omni_set_shadow_mode(RID p_light,VS::LightOmniShadowMode p_mode) {
-
-
-}
-
-VS::LightOmniShadowMode RasterizerGLES1::light_omni_get_shadow_mode(RID p_light) const{
-
- return VS::LightOmniShadowMode(0);
-}
-
-void RasterizerGLES1::light_directional_set_shadow_mode(RID p_light,VS::LightDirectionalShadowMode p_mode) {
-
-
-}
-
-VS::LightDirectionalShadowMode RasterizerGLES1::light_directional_get_shadow_mode(RID p_light) const {
-
- return VS::LIGHT_DIRECTIONAL_SHADOW_ORTHOGONAL;
-}
-
-void RasterizerGLES1::light_directional_set_shadow_param(RID p_light,VS::LightDirectionalShadowParam p_param, float p_value) {
-
-
-}
-
-float RasterizerGLES1::light_directional_get_shadow_param(RID p_light,VS::LightDirectionalShadowParam p_param) const {
-
- return 0;
-}
-
-
-AABB RasterizerGLES1::light_get_aabb(RID p_light) const {
-
- Light *light = light_owner.get( p_light );
- ERR_FAIL_COND_V(!light,AABB());
-
- switch( light->type ) {
-
- case VS::LIGHT_SPOT: {
-
- float len=light->vars[VS::LIGHT_PARAM_RADIUS];
- float size=Math::tan(Math::deg2rad(light->vars[VS::LIGHT_PARAM_SPOT_ANGLE]))*len;
- return AABB( Vector3( -size,-size,-len ), Vector3( size*2, size*2, len ) );
- } break;
- case VS::LIGHT_OMNI: {
-
- float r = light->vars[VS::LIGHT_PARAM_RADIUS];
- return AABB( -Vector3(r,r,r), Vector3(r,r,r)*2 );
- } break;
- case VS::LIGHT_DIRECTIONAL: {
-
- return AABB();
- } break;
- default: {}
- }
-
- ERR_FAIL_V( AABB() );
-}
-
-
-RID RasterizerGLES1::light_instance_create(RID p_light) {
-
- Light *light = light_owner.get( p_light );
- ERR_FAIL_COND_V(!light, RID());
-
- LightInstance *light_instance = memnew( LightInstance );
-
- light_instance->light=p_light;
- light_instance->base=light;
- light_instance->last_pass=0;
-
- return light_instance_owner.make_rid( light_instance );
-}
-void RasterizerGLES1::light_instance_set_transform(RID p_light_instance,const Transform& p_transform) {
-
- LightInstance *lighti = light_instance_owner.get( p_light_instance );
- ERR_FAIL_COND(!lighti);
- lighti->transform=p_transform;
-
-}
-
-bool RasterizerGLES1::light_instance_has_shadow(RID p_light_instance) const {
-
- return false;
-
- /*
- LightInstance *lighti = light_instance_owner.get( p_light_instance );
- ERR_FAIL_COND_V(!lighti, false);
-
- if (!lighti->base->shadow_enabled)
- return false;
-
- if (lighti->base->type==VS::LIGHT_DIRECTIONAL) {
- if (lighti->shadow_pass!=scene_pass)
- return false;
-
- } else {
- if (lighti->shadow_pass!=frame)
- return false;
- }*/
-
-
-
- //return !lighti->shadow_buffers.empty();
-
-}
-
-
-bool RasterizerGLES1::light_instance_assign_shadow(RID p_light_instance) {
-
- return false;
-
-}
-
-
-Rasterizer::ShadowType RasterizerGLES1::light_instance_get_shadow_type(RID p_light_instance) const {
-
- LightInstance *lighti = light_instance_owner.get( p_light_instance );
- ERR_FAIL_COND_V(!lighti,Rasterizer::SHADOW_NONE);
-
- switch(lighti->base->type) {
-
- case VS::LIGHT_DIRECTIONAL: return SHADOW_PSM; break;
- case VS::LIGHT_OMNI: return SHADOW_DUAL_PARABOLOID; break;
- case VS::LIGHT_SPOT: return SHADOW_SIMPLE; break;
- }
-
- return Rasterizer::SHADOW_NONE;
-}
-
-Rasterizer::ShadowType RasterizerGLES1::light_instance_get_shadow_type(RID p_light_instance,bool p_far) const {
-
- return SHADOW_NONE;
-}
-void RasterizerGLES1::light_instance_set_shadow_transform(RID p_light_instance, int p_index, const CameraMatrix& p_camera, const Transform& p_transform, float p_split_near,float p_split_far) {
-
-
-}
-
-int RasterizerGLES1::light_instance_get_shadow_passes(RID p_light_instance) const {
-
- return 0;
-}
-
-bool RasterizerGLES1::light_instance_get_pssm_shadow_overlap(RID p_light_instance) const {
-
- return false;
-}
-
-void RasterizerGLES1::light_instance_set_custom_transform(RID p_light_instance, int p_index, const CameraMatrix& p_camera, const Transform& p_transform, float p_split_near,float p_split_far) {
-
- LightInstance *lighti = light_instance_owner.get( p_light_instance );
- ERR_FAIL_COND(!lighti);
-
- ERR_FAIL_COND(lighti->base->type!=VS::LIGHT_DIRECTIONAL);
- ERR_FAIL_INDEX(p_index,1);
-
- lighti->custom_projection=p_camera;
- lighti->custom_transform=p_transform;
-
-}
-void RasterizerGLES1::shadow_clear_near() {
-
-
-}
-
-bool RasterizerGLES1::shadow_allocate_near(RID p_light) {
-
- return false;
-}
-
-bool RasterizerGLES1::shadow_allocate_far(RID p_light) {
-
- return false;
-}
-
-/* PARTICLES INSTANCE */
-
-RID RasterizerGLES1::particles_instance_create(RID p_particles) {
-
- ERR_FAIL_COND_V(!particles_owner.owns(p_particles),RID());
- ParticlesInstance *particles_instance = memnew( ParticlesInstance );
- ERR_FAIL_COND_V(!particles_instance, RID() );
- particles_instance->particles=p_particles;
- return particles_instance_owner.make_rid(particles_instance);
-}
-
-void RasterizerGLES1::particles_instance_set_transform(RID p_particles_instance,const Transform& p_transform) {
-
- ParticlesInstance *particles_instance=particles_instance_owner.get(p_particles_instance);
- ERR_FAIL_COND(!particles_instance);
- particles_instance->transform=p_transform;
-}
-
-
-/* RENDER API */
-/* all calls (inside begin/end shadow) are always warranted to be in the following order: */
-
-
-RID RasterizerGLES1::viewport_data_create() {
-
- return RID();
-}
-
-RID RasterizerGLES1::render_target_create(){
-
- return RID();
-
-}
-void RasterizerGLES1::render_target_set_size(RID p_render_target, int p_width, int p_height){
-
-
-}
-RID RasterizerGLES1::render_target_get_texture(RID p_render_target) const{
-
- return RID();
-
-}
-bool RasterizerGLES1::render_target_renedered_in_frame(RID p_render_target){
-
- return false;
-}
-
-
-void RasterizerGLES1::begin_frame() {
-
-
- window_size = Size2( OS::get_singleton()->get_video_mode().width, OS::get_singleton()->get_video_mode().height );
- //print_line("begin frame - winsize: "+window_size);
-
- double time = (OS::get_singleton()->get_ticks_usec()/1000); // get msec
- time/=1000.0; // make secs
- time_delta=time-last_time;
- last_time=time;
- frame++;
- clear_viewport(Color(1,0,0.5));
-
- _rinfo.vertex_count=0;
- _rinfo.object_count=0;
- _rinfo.mat_change_count=0;
- _rinfo.shader_change_count=0;
-
-
-// material_shader.set_uniform_default(MaterialShaderGLES1::SCREENZ_SCALE, Math::fmod(time, 3600.0));
- /* nehe ?*/
-
-// glClearColor(0,0,1,1);
-// glClear(GL_COLOR_BUFFER_BIT); //should not clear if anything else cleared..
-}
-
-void RasterizerGLES1::capture_viewport(Image* r_capture) {
-
-
-}
-
-
-void RasterizerGLES1::clear_viewport(const Color& p_color) {
-
- glScissor( viewport.x, window_size.height-(viewport.height+viewport.y), viewport.width,viewport.height );
- glEnable(GL_SCISSOR_TEST);
- glClearColor(p_color.r,p_color.g,p_color.b,p_color.a);
- glClear(GL_COLOR_BUFFER_BIT); //should not clear if anything else cleared..
- glDisable(GL_SCISSOR_TEST);
-
-};
-
-void RasterizerGLES1::set_viewport(const VS::ViewportRect& p_viewport) {
-
-
-
- viewport=p_viewport;
- //print_line("viewport: "+itos(p_viewport.x)+","+itos(p_viewport.y)+","+itos(p_viewport.width)+","+itos(p_viewport.height));
-
- glViewport( viewport.x, window_size.height-(viewport.height+viewport.y), viewport.width,viewport.height );
-}
-
-void RasterizerGLES1::set_render_target(RID p_render_target, bool p_transparent_bg, bool p_vflip) {
-
-
-}
-
-
-void RasterizerGLES1::begin_scene(RID p_viewport_data,RID p_env,VS::ScenarioDebugMode p_debug) {
-
-
- opaque_render_list.clear();
- alpha_render_list.clear();
- light_instance_count=0;
- scene_fx = NULL; // p_env.is_valid() ? fx_owner.get(p_env) : NULL;
- scene_pass++;
- last_light_id=0;
- directional_light_count=0;
-
-
- //set state
-
- glCullFace(GL_FRONT);
- cull_front=true;
-};
-
-void RasterizerGLES1::begin_shadow_map( RID p_light_instance, int p_shadow_pass ) {
-
-}
-
-void RasterizerGLES1::set_camera(const Transform& p_world,const CameraMatrix& p_projection) {
-
- camera_transform=p_world;
- camera_transform_inverse=camera_transform.inverse();
- camera_projection=p_projection;
- camera_plane = Plane( camera_transform.origin, camera_transform.basis.get_axis(2) );
- camera_z_near=camera_projection.get_z_near();
- camera_z_far=camera_projection.get_z_far();
- camera_projection.get_viewport_size(camera_vp_size.x,camera_vp_size.y);
-}
-
-void RasterizerGLES1::add_light( RID p_light_instance ) {
-
-#define LIGHT_FADE_TRESHOLD 0.05
-
- ERR_FAIL_COND( light_instance_count >= MAX_SCENE_LIGHTS );
-
- LightInstance *li = light_instance_owner.get(p_light_instance);
- ERR_FAIL_COND(!li);
-
-
- /* make light hash */
-
- // actually, not really a hash, but helps to sort the lights
- // and avoid recompiling redudant shader versions
-
-
- li->last_pass=scene_pass;
- li->sort_key=light_instance_count;
-
- switch(li->base->type) {
-
- case VisualServer::LIGHT_DIRECTIONAL: {
-
- li->light_vector = camera_transform_inverse.basis.xform(li->transform.basis.get_axis(2)).normalized();
- if (directional_light_count<MAX_HW_LIGHTS) {
-
- directional_lights[directional_light_count++]=li;
- }
-
- } break;
- case VisualServer::LIGHT_OMNI: {
-
- float radius = li->base->vars[VisualServer::LIGHT_PARAM_RADIUS];
- if (radius==0)
- radius=0.0001;
- li->linear_att=(1/LIGHT_FADE_TRESHOLD)/radius;
- li->light_vector = camera_transform_inverse.xform(li->transform.origin);
-
- } break;
- case VisualServer::LIGHT_SPOT: {
-
- float radius = li->base->vars[VisualServer::LIGHT_PARAM_RADIUS];
- if (radius==0)
- radius=0.0001;
- li->linear_att=(1/LIGHT_FADE_TRESHOLD)/radius;
- li->light_vector = camera_transform_inverse.xform(li->transform.origin);
- li->spot_vector = -camera_transform_inverse.basis.xform(li->transform.basis.get_axis(2)).normalized();
- //li->sort_key|=LIGHT_SPOT_BIT; // this way, omnis go first, spots go last and less shader versions are generated
-
- /*
- if (li->base->projector.is_valid()) {
-
- float far = li->base->vars[ VS::LIGHT_VAR_RADIUS ];
- ERR_FAIL_COND( far<=0 );
- float near= far/200.0;
- if (near<0.05)
- near=0.05;
-
- float angle = li->base->vars[ VS::LIGHT_VAR_SPOT_ANGLE ];
-
- //CameraMatrix proj;
- //proj.set_perspective( angle*2.0, 1.0, near, far );
-
- //Transform modelview=Transform(camera_transform_inverse * li->transform).inverse();
- //li->projector_mtx= proj * modelview;
-
- }*/
- } break;
- }
-
- light_instances[light_instance_count++]=li;
-
-}
-
-void RasterizerGLES1::_add_geometry( const Geometry* p_geometry, const InstanceData *p_instance, const Geometry *p_geometry_cmp, const GeometryOwner *p_owner) {
-
- Material *m=NULL;
- RID m_src=p_instance->material_override.is_valid() ? p_instance->material_override : p_geometry->material;
-
- if (m_src)
- m=material_owner.get( m_src );
-
- if (!m) {
- m=material_owner.get( default_material );
- }
-
- ERR_FAIL_COND(!m);
-
-
- if (m->last_pass!=frame) {
-
- m->last_pass=frame;
- }
-
-
- LightInstance *lights[RenderList::MAX_LIGHTS];
- int light_count=0;
-
- RenderList *render_list=&opaque_render_list;
- if (m->fixed_flags[VS::FIXED_MATERIAL_FLAG_USE_ALPHA] || m->blend_mode!=VS::MATERIAL_BLEND_MODE_MIX) {
- render_list = &alpha_render_list;
- };
-
- if (!m->flags[VS::MATERIAL_FLAG_UNSHADED]) {
-
- int lis = p_instance->light_instances.size();
-
- for(int i=0;i<lis;i++) {
- if (light_count>=RenderList::MAX_LIGHTS)
- break;
-
- LightInstance *li=light_instance_owner.get( p_instance->light_instances[i] );
-
- if (!li || li->last_pass!=scene_pass) //lit by light not in visible scene
- continue;
- lights[light_count++]=li;
- }
- }
-
- RenderList::Element *e = render_list->add_element();
-
- e->geometry=p_geometry;
-// e->geometry_cmp=p_geometry_cmp;
- e->material=m;
- e->instance=p_instance;
- //e->depth=camera_plane.distance_to(p_world->origin);
- e->depth=camera_transform.origin.distance_to(p_instance->transform.origin);
- e->owner=p_owner;
- if (p_instance->skeleton.is_valid())
- e->skeleton=skeleton_owner.get(p_instance->skeleton);
- else
- e->skeleton=NULL;
- e->mirror=p_instance->mirror;
- if (m->flags[VS::MATERIAL_FLAG_INVERT_FACES])
- e->mirror=!e->mirror;
-
- e->light_key=0;
- e->light_count=0;
-
-
- if (!shadow) {
-
-
- if (m->flags[VS::MATERIAL_FLAG_UNSHADED]) {
-
-
- e->light_key--; //special key for all the shadeless people
- } else if (light_count) {
-
- for(int i=0;i<light_count;i++) {
-
- e->lights[i]=lights[i]->sort_key;
- }
-
- e->light_count=light_count;
- int poslight_count=light_count;
- if (poslight_count>1) {
- SortArray<uint16_t> light_sort;
- light_sort.sort(&e->lights[0],poslight_count); //generate an equal sort key
- }
- }
-
- }
-
-}
-
-
-void RasterizerGLES1::add_mesh( const RID& p_mesh, const InstanceData *p_data) {
-
- Mesh *mesh = mesh_owner.get(p_mesh);
- ERR_FAIL_COND(!mesh);
-
- int ssize = mesh->surfaces.size();
-
- for (int i=0;i<ssize;i++) {
-
- Surface *s = mesh->surfaces[i];
- _add_geometry(s,p_data,s,NULL);
- }
-
- mesh->last_pass=frame;
-
-}
-
-void RasterizerGLES1::add_multimesh( const RID& p_multimesh, const InstanceData *p_data){
-
- MultiMesh *multimesh = multimesh_owner.get(p_multimesh);
- ERR_FAIL_COND(!multimesh);
-
- if (!multimesh->mesh.is_valid())
- return;
- if (multimesh->elements.empty())
- return;
-
- Mesh *mesh = mesh_owner.get(multimesh->mesh);
- ERR_FAIL_COND(!mesh);
-
- int surf_count = mesh->surfaces.size();
- if (multimesh->last_pass!=scene_pass) {
-
- multimesh->cache_surfaces.resize(surf_count);
- for(int i=0;i<surf_count;i++) {
-
- multimesh->cache_surfaces[i].material=mesh->surfaces[i]->material;
- multimesh->cache_surfaces[i].has_alpha=mesh->surfaces[i]->has_alpha;
- multimesh->cache_surfaces[i].surface=mesh->surfaces[i];
- }
-
- multimesh->last_pass=scene_pass;
- }
-
- for(int i=0;i<surf_count;i++) {
-
- _add_geometry(&multimesh->cache_surfaces[i],p_data,multimesh->cache_surfaces[i].surface,multimesh);
- }
-
-
-}
-
-void RasterizerGLES1::add_particles( const RID& p_particle_instance, const InstanceData *p_data){
-
- //print_line("adding particles");
- ParticlesInstance *particles_instance = particles_instance_owner.get(p_particle_instance);
- ERR_FAIL_COND(!particles_instance);
- Particles *p=particles_owner.get( particles_instance->particles );
- ERR_FAIL_COND(!p);
-
- _add_geometry(p,p_data,p,particles_instance);
-
-}
-
-
-void RasterizerGLES1::_set_cull(bool p_front,bool p_reverse_cull) {
-
- bool front = p_front;
- if (p_reverse_cull)
- front=!front;
-
- if (front!=cull_front) {
-
- glCullFace(front?GL_FRONT:GL_BACK);
- cull_front=front;
- }
-}
-
-
-void RasterizerGLES1::_setup_fixed_material(const Geometry *p_geometry,const Material *p_material) {
-
- if (!shadow) {
-
- ///ambient @TODO offer global ambient group option
-
- //GLenum side = use_shaders?GL_FRONT:GL_FRONT_AND_BACK;
- GLenum side = GL_FRONT_AND_BACK;
-
-
- ///diffuse
- Color diffuse_color=p_material->parameters[VS::FIXED_MATERIAL_PARAM_DIFFUSE];
- float diffuse_rgba[4]={
- diffuse_color.r,
- diffuse_color.g,
- diffuse_color.b,
- diffuse_color.a
- };
-
- //color array overrides this
- glColor4f( diffuse_rgba[0],diffuse_rgba[1],diffuse_rgba[2],diffuse_rgba[3]);
- last_color=diffuse_color;
- glMaterialfv(side,GL_AMBIENT,diffuse_rgba);
- glMaterialfv(side,GL_DIFFUSE,diffuse_rgba);
- //specular
-
- const Color specular_color=p_material->parameters[VS::FIXED_MATERIAL_PARAM_SPECULAR];
- float specular_rgba[4]={
- specular_color.r,
- specular_color.g,
- specular_color.b,
- 1.0
- };
-
- glMaterialfv(side,GL_SPECULAR,specular_rgba);
-
- const Color emission=p_material->parameters[VS::FIXED_MATERIAL_PARAM_EMISSION];
-
-
- float emission_rgba[4]={
- emission.r,
- emission.g,
- emission.b,
- 1.0 //p_material->parameters[VS::FIXED_MATERIAL_PARAM_DETAIL_MIX]
- };
-
- glMaterialfv(side,GL_EMISSION,emission_rgba);
-
- glMaterialf(side,GL_SHININESS,p_material->parameters[VS::FIXED_MATERIAL_PARAM_SPECULAR_EXP]);
-
- Plane sparams=p_material->parameters[VS::FIXED_MATERIAL_PARAM_SHADE_PARAM];
- //depth test?
-
-
- }
-
-
- if (p_material->textures[VS::FIXED_MATERIAL_PARAM_DIFFUSE].is_valid()) {
-
- Texture *texture = texture_owner.get( p_material->textures[VS::FIXED_MATERIAL_PARAM_DIFFUSE] );
- ERR_FAIL_COND(!texture);
- glEnable(GL_TEXTURE_2D);
- glActiveTexture(GL_TEXTURE0);
- glBindTexture( GL_TEXTURE_2D,texture->tex_id );
- } else {
-
- glDisable(GL_TEXTURE_2D);
- }
-
-}
-
-void RasterizerGLES1::_setup_material(const Geometry *p_geometry,const Material *p_material) {
-
- if (p_material->flags[VS::MATERIAL_FLAG_DOUBLE_SIDED])
- glDisable(GL_CULL_FACE);
- else {
- glEnable(GL_CULL_FACE);
- }
-
-/* if (p_material->flags[VS::MATERIAL_FLAG_WIREFRAME])
- glPolygonMode(GL_FRONT_AND_BACK,GL_LINE);
- else
- glPolygonMode(GL_FRONT_AND_BACK,GL_FILL);*/
-
- if (p_material->line_width > 0)
- glLineWidth(p_material->line_width);
-
- if (!shadow) {
-
-
- if (blend_mode!=p_material->blend_mode) {
- switch(p_material->blend_mode) {
-
-
- case VS::MATERIAL_BLEND_MODE_MIX: {
- //glBlendEquation(GL_FUNC_ADD);
- glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
-
- } break;
- case VS::MATERIAL_BLEND_MODE_ADD: {
-
- //glBlendEquation(GL_FUNC_ADD);
- glBlendFunc(GL_SRC_ALPHA,GL_ONE);
-
- } break;
- case VS::MATERIAL_BLEND_MODE_SUB: {
-
- //glBlendEquation(GL_FUNC_SUBTRACT);
- glBlendFunc(GL_SRC_ALPHA,GL_ONE);
- } break;
- case VS::MATERIAL_BLEND_MODE_MUL: {
- //glBlendEquation(GL_FUNC_ADD);
- glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
-
- } break;
-
- }
- blend_mode=p_material->blend_mode;
- }
-
- if (lighting!=!p_material->flags[VS::MATERIAL_FLAG_UNSHADED]) {
- if (p_material->flags[VS::MATERIAL_FLAG_UNSHADED]) {
- glDisable(GL_LIGHTING);
- } else {
- glEnable(GL_LIGHTING);
- }
- lighting=!p_material->flags[VS::MATERIAL_FLAG_UNSHADED];
- }
-
- }
-
- bool current_depth_write=p_material->depth_draw_mode!=VS::MATERIAL_DEPTH_DRAW_ALWAYS; //broken
- bool current_depth_test=!p_material->flags[VS::MATERIAL_FLAG_ONTOP];
-
-
- _setup_fixed_material(p_geometry,p_material);
-
- if (current_depth_write!=depth_write) {
-
- depth_write=current_depth_write;
- glDepthMask(depth_write);
- }
-
- if (current_depth_test!=depth_test) {
-
- depth_test=current_depth_test;
- if (depth_test)
- glEnable(GL_DEPTH_TEST);
- else
- glDisable(GL_DEPTH_TEST);
- }
-}
-/*
-static const MaterialShaderGLES1::Conditionals _gl_light_version[4][3]={
- {MaterialShaderGLES1::LIGHT_0_DIRECTIONAL,MaterialShaderGLES1::LIGHT_0_OMNI,MaterialShaderGLES1::LIGHT_0_SPOT},
- {MaterialShaderGLES1::LIGHT_1_DIRECTIONAL,MaterialShaderGLES1::LIGHT_1_OMNI,MaterialShaderGLES1::LIGHT_1_SPOT},
- {MaterialShaderGLES1::LIGHT_2_DIRECTIONAL,MaterialShaderGLES1::LIGHT_2_OMNI,MaterialShaderGLES1::LIGHT_2_SPOT},
- {MaterialShaderGLES1::LIGHT_3_DIRECTIONAL,MaterialShaderGLES1::LIGHT_3_OMNI,MaterialShaderGLES1::LIGHT_3_SPOT}
-};
-
-static const MaterialShaderGLES1::Conditionals _gl_light_shadow[4]={
- MaterialShaderGLES1::LIGHT_0_SHADOW,
- MaterialShaderGLES1::LIGHT_1_SHADOW,
- MaterialShaderGLES1::LIGHT_2_SHADOW,
- MaterialShaderGLES1::LIGHT_3_SHADOW
-};
-*/
-
-
-void RasterizerGLES1::_setup_light(LightInstance* p_instance, int p_idx) {
-
- Light* ld = p_instance->base;
-
-// material_shader.set_conditional(MaterialShaderGLES1::LIGHT_0_DIRECTIONAL, true);
-
- //material_shader.set_uniform_default(MaterialShaderGLES1::LIGHT_0_DIFFUSE, ld->colors[VS::LIGHT_COLOR_DIFFUSE]);
- //material_shader.set_uniform_default(MaterialShaderGLES1::LIGHT_0_SPECULAR, ld->colors[VS::LIGHT_COLOR_SPECULAR]);
- //material_shader.set_uniform_default(MaterialShaderGLES1::LIGHT_0_AMBIENT, ld->colors[VS::LIGHT_COLOR_AMBIENT]);
-
- GLenum glid = GL_LIGHT0+p_idx;
-
- Color diff_color = ld->colors[VS::LIGHT_COLOR_DIFFUSE];
- float emult = ld->vars[VS::LIGHT_PARAM_ENERGY];
-
- if (ld->type!=VS::LIGHT_DIRECTIONAL)
- emult*=4.0;
-
- GLfloat diffuse_sdark[4]={
- diff_color.r*emult,
- diff_color.g*emult,
- diff_color.b*emult,
- 1.0
- };
-
- glLightfv(glid , GL_DIFFUSE, diffuse_sdark);
-
- Color amb_color = Color(0,0,0);
- GLfloat amb_stexsize[4]={
- amb_color.r,
- amb_color.g,
- amb_color.b,
- 1.0
- };
-
- glLightfv(glid , GL_AMBIENT, amb_stexsize );
-
- Color spec_color = ld->colors[VS::LIGHT_COLOR_SPECULAR];
- GLfloat spec_op[4]={
- spec_color.r,
- spec_color.g,
- spec_color.b,
- 1.0
- };
-
- glLightfv(glid , GL_SPECULAR, spec_op );
-
- switch(ld->type) {
-
- case VS::LIGHT_DIRECTIONAL: {
-
- glMatrixMode(GL_MODELVIEW);
- glPushMatrix();
- glLoadIdentity();
-
- glLightf(glid,GL_CONSTANT_ATTENUATION, 1);
- glLightf(glid,GL_LINEAR_ATTENUATION, 0);
- glLightf(glid,GL_QUADRATIC_ATTENUATION,0); // energy
-
- float lightdir[4]={
- p_instance->light_vector.x,
- p_instance->light_vector.y,
- p_instance->light_vector.z,
- 0.0
- };
-
- glLightfv(glid,GL_POSITION,lightdir); //at modelview
- glLightf(glid,GL_SPOT_CUTOFF,180.0);
- glLightf(glid,GL_SPOT_EXPONENT, 0);
-
- float sdir[4]={
- 0,
- 0,
- -1,
- 0
- };
-
- glLightfv(glid,GL_SPOT_DIRECTION,sdir); //at modelview
-
-// material_shader.set_uniform_default(MaterialShaderGLES1::LIGHT_0_DIRECTION, p_instance->light_vector);
- glPopMatrix();
-
- } break;
-
- case VS::LIGHT_OMNI: {
-
-
- glLightf(glid,GL_SPOT_CUTOFF,180.0);
- glLightf(glid,GL_SPOT_EXPONENT, 0);
-
-
- glLightf(glid,GL_CONSTANT_ATTENUATION, 0);
- glLightf(glid,GL_LINEAR_ATTENUATION, p_instance->linear_att);
- glLightf(glid,GL_QUADRATIC_ATTENUATION, 0); // wut?
-
- glMatrixMode(GL_MODELVIEW);
- glPushMatrix();
- glLoadIdentity();
- float lightpos[4]={
- p_instance->light_vector.x,
- p_instance->light_vector.y,
- p_instance->light_vector.z,
- 1.0
- };
-
- glLightfv(glid,GL_POSITION,lightpos); //at modelview
-
- glPopMatrix();
-
-
- } break;
- case VS::LIGHT_SPOT: {
-
- glLightf(glid,GL_SPOT_CUTOFF, ld->vars[VS::LIGHT_PARAM_SPOT_ANGLE]);
- glLightf(glid,GL_SPOT_EXPONENT, ld->vars[VS::LIGHT_PARAM_SPOT_ATTENUATION]);
-
-
- glLightf(glid,GL_CONSTANT_ATTENUATION, 0);
- glLightf(glid,GL_LINEAR_ATTENUATION, p_instance->linear_att);
- glLightf(glid,GL_QUADRATIC_ATTENUATION, 0); // wut?
-
-
- glMatrixMode(GL_MODELVIEW);
- glPushMatrix();
- glLoadIdentity();
- float lightpos[4]={
- p_instance->light_vector.x,
- p_instance->light_vector.y,
- p_instance->light_vector.z,
- 1.0
- };
-
- glLightfv(glid,GL_POSITION,lightpos); //at modelview
-
- float lightdir[4]={
- p_instance->spot_vector.x,
- p_instance->spot_vector.y,
- p_instance->spot_vector.z,
- 1.0
- };
-
- glLightfv(glid,GL_SPOT_DIRECTION,lightdir); //at modelview
-
- glPopMatrix();
-
-
-
- } break;
-
- default: break;
- }
-};
-
-
-
-
-
-void RasterizerGLES1::_setup_lights(const uint16_t * p_lights,int p_light_count) {
-
- if (shadow)
- return;
-
-
-
- for (int i=directional_light_count; i<MAX_HW_LIGHTS; i++) {
-
- if (i<(directional_light_count+p_light_count)) {
-
-
- glEnable(GL_LIGHT0 + i);
- _setup_light(light_instances[p_lights[i]], i);
-
- } else {
- glDisable(GL_LIGHT0 + i);
-
- }
- }
-
-}
-
-
-
-static const GLenum gl_client_states[] = {
-
- GL_VERTEX_ARRAY,
- GL_NORMAL_ARRAY,
- 0, // ARRAY_TANGENT
- 0,//GL_COLOR_ARRAY,
- GL_TEXTURE_COORD_ARRAY, // ARRAY_TEX_UV
- 0,//GL_TEXTURE_COORD_ARRAY, // ARRAY_TEX_UV2
- 0, // ARRAY_BONES
- 0, // ARRAY_WEIGHTS
-};
-
-static const int gl_texcoord_index[VS::ARRAY_MAX-1] = {
-
- -1,
- -1,
- -1, // ARRAY_TANGENT
- -1,
- 0, // ARRAY_TEX_UV
- -1,//1, // ARRAY_TEX_UV2
- -1, // ARRAY_BONES
- -1, // ARRAY_WEIGHTS
-};
-
-
-Error RasterizerGLES1::_setup_geometry(const Geometry *p_geometry, const Material* p_material, const Skeleton *p_skeleton,const float *p_morphs) {
-
-
- switch(p_geometry->type) {
-
- case Geometry::GEOMETRY_MULTISURFACE:
- case Geometry::GEOMETRY_SURFACE: {
-
-
-
- const Surface *surf=NULL;
- if (p_geometry->type==Geometry::GEOMETRY_SURFACE)
- surf=static_cast<const Surface*>(p_geometry);
- else if (p_geometry->type==Geometry::GEOMETRY_MULTISURFACE)
- surf=static_cast<const MultiMeshSurface*>(p_geometry)->surface;
-
-
- if (surf->format != surf->configured_format) {
- if (OS::get_singleton()->is_stdout_verbose()) {
-
- print_line("has format: "+itos(surf->format));
- print_line("configured format: "+itos(surf->configured_format));
- }
- ERR_EXPLAIN("Missing arrays (not set) in surface");
- }
- ERR_FAIL_COND_V( surf->format != surf->configured_format, ERR_UNCONFIGURED );
- uint8_t *base=0;
- int stride=surf->stride;
- bool use_VBO = (surf->array_local==0);
- _setup_geometry_vinfo=surf->array_len;
-
- bool skeleton_valid = p_skeleton && (surf->format&VS::ARRAY_FORMAT_BONES) && (surf->format&VS::ARRAY_FORMAT_WEIGHTS) && !p_skeleton->bones.empty() && p_skeleton->bones.size() > surf->max_bone;
-
-
-
- if (!use_VBO) {
-
- base = surf->array_local;
- glBindBuffer(GL_ARRAY_BUFFER, 0);
- bool can_copy_to_local=surf->local_stride * surf->array_len <= skinned_buffer_size;
- if (!can_copy_to_local)
- skeleton_valid=false;
-
- /* compute morphs */
-
- if (p_morphs && surf->morph_target_count && can_copy_to_local) {
-
- base = skinned_buffer;
- stride=surf->local_stride;
-
- //copy all first
- float coef=1.0;
-
- for(int i=0;i<surf->morph_target_count;i++) {
- if (surf->mesh->morph_target_mode==VS::MORPH_MODE_NORMALIZED)
- coef-=p_morphs[i];
- ERR_FAIL_COND_V( surf->morph_format != surf->morph_targets_local[i].configured_format, ERR_INVALID_DATA );
-
- }
-
-
- for(int i=0;i<VS::ARRAY_MAX-1;i++) {
-
- const Surface::ArrayData& ad=surf->array[i];
- if (ad.size==0)
- continue;
-
- int ofs = ad.ofs;
- int src_stride=surf->stride;
- int dst_stride=surf->local_stride;
- int count = surf->array_len;
-
- switch(i) {
-
- case VS::ARRAY_VERTEX:
- case VS::ARRAY_NORMAL:
- case VS::ARRAY_TANGENT:
- {
-
- for(int k=0;k<count;k++) {
-
- const float *src = (const float*)&surf->array_local[ofs+k*src_stride];
- float *dst = (float*)&base[ofs+k*dst_stride];
-
- dst[0]= src[0]*coef;
- dst[1]= src[1]*coef;
- dst[2]= src[2]*coef;
- } break;
-
- } break;
- case VS::ARRAY_TEX_UV:
- case VS::ARRAY_TEX_UV2: {
-
- for(int k=0;k<count;k++) {
-
- const float *src = (const float*)&surf->array_local[ofs+k*src_stride];
- float *dst = (float*)&base[ofs+k*dst_stride];
-
- dst[0]= src[0]*coef;
- dst[1]= src[1]*coef;
- } break;
-
- } break;
- }
- }
-
-
- for(int j=0;j<surf->morph_target_count;j++) {
-
- for(int i=0;i<VS::ARRAY_MAX-1;i++) {
-
- const Surface::ArrayData& ad=surf->array[i];
- if (ad.size==0)
- continue;
-
-
- int ofs = ad.ofs;
- int dst_stride=surf->local_stride;
- int count = surf->array_len;
- const uint8_t *morph=surf->morph_targets_local[j].array;
- float w = p_morphs[j];
-
- switch(i) {
-
- case VS::ARRAY_VERTEX:
- case VS::ARRAY_NORMAL:
- case VS::ARRAY_TANGENT:
- {
-
- for(int k=0;k<count;k++) {
-
- const float *src_morph = (const float*)&morph[ofs+k*dst_stride];
- float *dst = (float*)&base[ofs+k*dst_stride];
-
- dst[0]+= src_morph[0]*w;
- dst[1]+= src_morph[1]*w;
- dst[2]+= src_morph[2]*w;
- } break;
-
- } break;
- case VS::ARRAY_TEX_UV:
- case VS::ARRAY_TEX_UV2: {
-
- for(int k=0;k<count;k++) {
-
- const float *src_morph = (const float*)&morph[ofs+k*dst_stride];
- float *dst = (float*)&base[ofs+k*dst_stride];
-
- dst[0]+= src_morph[0]*w;
- dst[1]+= src_morph[1]*w;
- } break;
-
- } break;
- }
- }
- }
-
- } else if (skeleton_valid) {
-
- base = skinned_buffer;
- //copy stuff and get it ready for the skeleton
-
- int len = surf->array_len;
- int src_stride = surf->stride;
- int dst_stride = surf->stride - ( surf->array[VS::ARRAY_BONES].size + surf->array[VS::ARRAY_WEIGHTS].size );
-
- for(int i=0;i<len;i++) {
- const uint8_t *src = &surf->array_local[i*src_stride];
- uint8_t *dst = &base[i*dst_stride];
- memcpy(dst,src,dst_stride);
- }
-
-
- stride=dst_stride;
- }
-
-
- if (skeleton_valid) {
- //transform stuff
-
- const uint8_t *src_weights=&surf->array_local[surf->array[VS::ARRAY_WEIGHTS].ofs];
- const uint8_t *src_bones=&surf->array_local[surf->array[VS::ARRAY_BONES].ofs];
- int src_stride = surf->stride;
- int count = surf->array_len;
- const Transform *skeleton = &p_skeleton->bones[0];
-
- for(int i=0;i<VS::ARRAY_MAX-1;i++) {
-
- const Surface::ArrayData& ad=surf->array[i];
- if (ad.size==0)
- continue;
-
- int ofs = ad.ofs;
-
-
- switch(i) {
-
- case VS::ARRAY_VERTEX: {
- for(int k=0;k<count;k++) {
-
- float *ptr= (float*)&base[ofs+k*stride];
- const GLfloat* weights = reinterpret_cast<const GLfloat*>(&src_weights[k*src_stride]);
- const GLfloat *bones = reinterpret_cast<const GLfloat*>(&src_bones[k*src_stride]);
-
- Vector3 src( ptr[0], ptr[1], ptr[2] );
- Vector3 dst;
- for(int j=0;j<VS::ARRAY_WEIGHTS_SIZE;j++) {
-
- float w = weights[j];
- if (w==0)
- break;
-
- //print_line("accum "+itos(i)+" += "+rtos(Math::ftoi(bones[j]))+" * "+skeleton[ Math::ftoi(bones[j]) ]+" * "+rtos(w));
- dst+=skeleton[ Math::fast_ftoi(bones[j]) ].xform(src) * w;
- }
-
- ptr[0]=dst.x;
- ptr[1]=dst.y;
- ptr[2]=dst.z;
-
- } break;
-
- } break;
- case VS::ARRAY_NORMAL:
- case VS::ARRAY_TANGENT: {
- for(int k=0;k<count;k++) {
-
- float *ptr= (float*)&base[ofs+k*stride];
- const GLfloat* weights = reinterpret_cast<const GLfloat*>(&src_weights[k*src_stride]);
- const GLfloat *bones = reinterpret_cast<const GLfloat*>(&src_bones[k*src_stride]);
-
- Vector3 src( ptr[0], ptr[1], ptr[2] );
- Vector3 dst;
- for(int j=0;j<VS::ARRAY_WEIGHTS_SIZE;j++) {
-
- float w = weights[j];
- if (w==0)
- break;
-
- //print_line("accum "+itos(i)+" += "+rtos(Math::ftoi(bones[j]))+" * "+skeleton[ Math::ftoi(bones[j]) ]+" * "+rtos(w));
- dst+=skeleton[ Math::fast_ftoi(bones[j]) ].basis.xform(src) * w;
- }
-
- ptr[0]=dst.x;
- ptr[1]=dst.y;
- ptr[2]=dst.z;
-
- } break;
-
- } break;
- }
- }
-
- }
-
- } else {
-
- glBindBuffer(GL_ARRAY_BUFFER, surf->vertex_id);
- };
-
-
- for (int i=0;i<(VS::ARRAY_MAX-1);i++) {
-
- const Surface::ArrayData& ad=surf->array[i];
-
-// if (!gl_texcoord_shader[i])
-// continue;
-
- if (ad.size==0 || i==VS::ARRAY_BONES || i==VS::ARRAY_WEIGHTS || gl_client_states[i]==0 ) {
-
- if (gl_texcoord_index[i] != -1) {
- glClientActiveTexture(GL_TEXTURE0+gl_texcoord_index[i]);
- }
-
- if (gl_client_states[i] != 0)
- glDisableClientState(gl_client_states[i]);
-
- if (i == VS::ARRAY_COLOR) {
- glColor4f(last_color.r,last_color.g,last_color.b,last_color.a);
- };
- continue; // this one is disabled.
- }
-
- if (gl_texcoord_index[i] != -1) {
- glClientActiveTexture(GL_TEXTURE0+gl_texcoord_index[i]);
- }
-
- glEnableClientState(gl_client_states[i]);
-
- switch (i) {
-
- case VS::ARRAY_VERTEX: {
-
- glVertexPointer(3,ad.datatype,stride,&base[ad.ofs]);
-
- } break; /* fallthrough to normal */
- case VS::ARRAY_NORMAL: {
-
- glNormalPointer(ad.datatype,stride,&base[ad.ofs]);
- } break;
- case VS::ARRAY_COLOR: {
- glColorPointer(4,ad.datatype,stride,&base[ad.ofs]);
- } break;
- case VS::ARRAY_TEX_UV:
- case VS::ARRAY_TEX_UV2: {
-
- glTexCoordPointer(2,ad.datatype,stride,&base[ad.ofs]);
- } break;
- case VS::ARRAY_TANGENT: {
-
- //glVertexAttribPointer(i, 4, use_VBO?GL_BYTE:GL_FLOAT, use_VBO?GL_TRUE:GL_FALSE, stride, &base[ad.ofs]);
-
- } break;
- case VS::ARRAY_BONES:
- case VS::ARRAY_WEIGHTS: {
-
- //do none
- //glVertexAttribPointer(i, 4, GL_FLOAT, GL_FALSE, surf->stride, &base[ad.ofs]);
-
- } break;
- case VS::ARRAY_INDEX:
- ERR_PRINT("Bug");
- break;
- };
- }
-
-
- } break;
-
- default: break;
-
- };
-
- return OK;
-};
-
-static const GLenum gl_primitive[]={
- GL_POINTS,
- GL_LINES,
- GL_LINE_STRIP,
- GL_LINE_LOOP,
- GL_TRIANGLES,
- GL_TRIANGLE_STRIP,
- GL_TRIANGLE_FAN
-};
-
-static const GLenum gl_poly_primitive[4]={
- GL_POINTS,
- GL_LINES,
- GL_TRIANGLES,
- //GL_QUADS
-
-};
-
-
-void RasterizerGLES1::_render(const Geometry *p_geometry,const Material *p_material, const Skeleton* p_skeleton, const GeometryOwner *p_owner) {
-
-
- _rinfo.object_count++;
-
- switch(p_geometry->type) {
-
- case Geometry::GEOMETRY_SURFACE: {
-
- Surface *s = (Surface*)p_geometry;
-
- _rinfo.vertex_count+=s->array_len;
-
- if (s->packed && s->array_local==0) {
-
- float sc = (1.0/32767.0)*s->vertex_scale;
-
- glMatrixMode(GL_MODELVIEW);
- glPushMatrix();
- glScalef(sc,sc,sc);
- if (s->format&VS::ARRAY_FORMAT_TEX_UV) {
- float uvs=(1.0/32767.0)*s->uv_scale;
- //glActiveTexture(GL_TEXTURE0);
- glClientActiveTexture(GL_TEXTURE0);
- glMatrixMode(GL_TEXTURE);
- glPushMatrix();
- glScalef(uvs,uvs,uvs);
- }
-
-
- }
-
-
- if (s->index_array_len>0) {
-
- if (s->index_array_local) {
-
- glBindBuffer(GL_ELEMENT_ARRAY_BUFFER,0);
- glDrawElements(gl_primitive[s->primitive], s->index_array_len, (s->array_len>(1<<16))?GL_UNSIGNED_SHORT:GL_UNSIGNED_SHORT, s->index_array_local);
-
- } else {
- // print_line("indices: "+itos(s->index_array_local) );
-
- glBindBuffer(GL_ELEMENT_ARRAY_BUFFER,s->index_id);
- glDrawElements(gl_primitive[s->primitive],s->index_array_len, (s->array_len>(1<<16))?GL_UNSIGNED_SHORT:GL_UNSIGNED_SHORT,0);
- }
-
-
- } else {
-
- glDrawArrays(gl_primitive[s->primitive],0,s->array_len);
-
- };
-
- if (s->packed && s->array_local==0) {
- if (s->format&VS::ARRAY_FORMAT_TEX_UV) {
- glPopMatrix();
- glMatrixMode(GL_MODELVIEW);
- }
- glPopMatrix();
- };
- } break;
-
- case Geometry::GEOMETRY_MULTISURFACE: {
-
- Surface *s = static_cast<const MultiMeshSurface*>(p_geometry)->surface;
- const MultiMesh *mm = static_cast<const MultiMesh*>(p_owner);
- int element_count=mm->elements.size();
-
- if (element_count==0)
- return;
-
- const MultiMesh::Element *elements=&mm->elements[0];
-
- _rinfo.vertex_count+=s->array_len*element_count;
-
-
- if (s->index_array_len>0) {
-
-
- glBindBuffer(GL_ELEMENT_ARRAY_BUFFER,s->index_id);
- for(int i=0;i<element_count;i++) {
- //glUniformMatrix4fv(material_shader.get_uniform_location(MaterialShaderGLES1::INSTANCE_TRANSFORM), 1, false, elements[i].matrix);
- glDrawElements(gl_primitive[s->primitive],s->index_array_len, (s->array_len>(1<<16))?GL_UNSIGNED_SHORT:GL_UNSIGNED_SHORT,0);
- }
-
-
- } else {
-
- for(int i=0;i<element_count;i++) {
-// glUniformMatrix4fv(material_shader.get_uniform_location(MaterialShaderGLES1::INSTANCE_TRANSFORM), 1, false, elements[i].matrix);
- glDrawArrays(gl_primitive[s->primitive],0,s->array_len);
- }
-
-
- };
- } break;
- case Geometry::GEOMETRY_PARTICLES: {
-
-
- //print_line("particulinas");
- const Particles *particles = static_cast<const Particles*>( p_geometry );
- ERR_FAIL_COND(!p_owner);
- ParticlesInstance *particles_instance = (ParticlesInstance*)p_owner;
-
- ParticleSystemProcessSW &pp = particles_instance->particles_process;
- float td = time_delta; //MIN(time_delta,1.0/10.0);
- pp.process(&particles->data,particles_instance->transform,td);
- ERR_EXPLAIN("A parameter in the particle system is not correct.");
- ERR_FAIL_COND(!pp.valid);
- glBindBuffer(GL_ELEMENT_ARRAY_BUFFER,0); //unbind
- glBindBuffer(GL_ARRAY_BUFFER,0);
-
-
- Transform camera;
- if (shadow)
- camera=shadow->transform;
- else
- camera=camera_transform;
-
- particle_draw_info.prepare(&particles->data,&pp,particles_instance->transform,camera);
-
- _rinfo.vertex_count+=4*particles->data.amount;
-
- {
- static const Vector3 points[4]={
- Vector3(-1.0,1.0,0),
- Vector3(1.0,1.0,0),
- Vector3(1.0,-1.0,0),
- Vector3(-1.0,-1.0,0)
- };
- static const Vector3 uvs[4]={
- Vector3(0.0,0.0,0.0),
- Vector3(1.0,0.0,0.0),
- Vector3(1.0,1.0,0.0),
- Vector3(0,1.0,0.0)
- };
- static const Vector3 normals[4]={
- Vector3(0,0,1),
- Vector3(0,0,1),
- Vector3(0,0,1),
- Vector3(0,0,1)
- };
-
- static const Plane tangents[4]={
- Plane(Vector3(1,0,0),0),
- Plane(Vector3(1,0,0),0),
- Plane(Vector3(1,0,0),0),
- Plane(Vector3(1,0,0),0)
- };
-
-
- glMatrixMode(GL_MODELVIEW);
- glPushMatrix();
- _gl_load_transform(camera_transform_inverse);
- for(int i=0;i<particles->data.amount;i++) {
-
- ParticleSystemDrawInfoSW::ParticleDrawInfo &pinfo=*particle_draw_info.draw_info_order[i];
- if (!pinfo.data->active)
- continue;
- glPushMatrix();
- _gl_mult_transform(pinfo.transform);
-
- glColor4f(pinfo.color.r*last_color.r,pinfo.color.g*last_color.g,pinfo.color.b*last_color.b,pinfo.color.a*last_color.a);
- _draw_primitive(4,points,normals,NULL,uvs,tangents);
- glPopMatrix();
-
- }
- glPopMatrix();
-
- }
-
- } break;
- default: break;
- };
-
-};
-
-void RasterizerGLES1::_setup_shader_params(const Material *p_material) {
-#if 0
- int idx=0;
- int tex_idx=0;
-
- for(Map<StringName,Variant>::Element *E=p_material->shader_cache->params.front();E;E=E->next(),idx++) {
-
- Variant v; //
- v = E->get();
- const Map<StringName,Variant>::Element *F=p_material->shader_params.find(E->key());
- if (F)
- v=F->get();
-
- switch(v.get_type() ) {
- case Variant::OBJECT:
- case Variant::_RID: {
-
- RID tex=v;
- if (!tex.is_valid())
- break;
-
- Texture *texture = texture_owner.get(tex);
- if (!texture)
- break;
- glUniform1i( material_shader.get_custom_uniform_location(idx), tex_idx);
- glActiveTexture(tex_idx);
- glBindTexture(texture->target,texture->tex_id);
-
- } break;
- case Variant::COLOR: {
-
- Color c=v;
- material_shader.set_custom_uniform(idx,Vector3(c.r,c.g,c.b));
- } break;
- default: {
-
- material_shader.set_custom_uniform(idx,v);
- } break;
- }
-
- }
-#endif
-
-}
-
-void RasterizerGLES1::_render_list_forward(RenderList *p_render_list,bool p_reverse_cull) {
-
- const Material *prev_material=NULL;
- uint64_t prev_light_key=0;
- const Skeleton *prev_skeleton=NULL;
- const Geometry *prev_geometry=NULL;
-
- Geometry::Type prev_geometry_type=Geometry::GEOMETRY_INVALID;
-
- for (int i=0;i<p_render_list->element_count;i++) {
-
- RenderList::Element *e = p_render_list->elements[i];
- const Material *material = e->material;
- uint64_t light_key = e->light_key;
- const Skeleton *skeleton = e->skeleton;
- const Geometry *geometry = e->geometry;
-
- if (material!=prev_material || geometry->type!=prev_geometry_type) {
- _setup_material(e->geometry,material);
- _rinfo.mat_change_count++;
- //_setup_material_overrides(e->material,NULL,material_overrides);
- //_setup_material_skeleton(material,skeleton);
- } else {
-
- if (prev_skeleton!=skeleton) {
- //_setup_material_skeleton(material,skeleton);
- };
- }
-
-
- if (geometry!=prev_geometry || geometry->type!=prev_geometry_type || prev_skeleton!=skeleton) {
-
- _setup_geometry(geometry, material,e->skeleton,e->instance->morph_values.ptr());
- };
-
- if (i==0 || light_key!=prev_light_key)
- _setup_lights(e->lights,e->light_count);
-
- _set_cull(e->mirror,p_reverse_cull);
-
- glMatrixMode(GL_MODELVIEW);
- glPopMatrix();
- glPushMatrix();
-
-
- if (e->instance->billboard || e->instance->depth_scale) {
-
- Transform xf=e->instance->transform;
- if (e->instance->depth_scale) {
-
- if (camera_projection.matrix[3][3]) {
- //orthogonal matrix, try to do about the same
- //with viewport size
- //real_t w = Math::abs( 1.0/(2.0*(p_projection.matrix[0][0])) );
- real_t h = Math::abs( 1.0/(2.0*camera_projection.matrix[1][1]) );
- float sc = (h*2.0); //consistent with Y-fov
- xf.basis.scale( Vector3(sc,sc,sc));
- } else {
- //just scale by depth
- real_t sc = -camera_plane.distance_to(xf.origin);
- xf.basis.scale( Vector3(sc,sc,sc));
- }
- }
-
- if (e->instance->billboard) {
-
- Vector3 scale = xf.basis.get_scale();
- xf.set_look_at(xf.origin,xf.origin+camera_transform.get_basis().get_axis(2),camera_transform.get_basis().get_axis(1));
- xf.basis.scale(scale);
- }
- _gl_mult_transform(xf); // for fixed pipeline
-
- } else {
- _gl_mult_transform(e->instance->transform); // for fixed pipeline
- }
-
-
-
- //bool changed_shader = material_shader.bind();
- //if ( changed_shader && material->shader_cache && !material->shader_cache->params.empty())
- // _setup_shader_params(material);
-
- _render(geometry, material, skeleton,e->owner);
-
-
-
- prev_material=material;
- prev_skeleton=skeleton;
- prev_geometry=geometry;
- prev_light_key=e->light_key;
- prev_geometry_type=geometry->type;
- }
-
-
-
-};
-
-
-
-void RasterizerGLES1::end_scene() {
-
- glEnable(GL_BLEND);
- glDepthMask(GL_TRUE);
- glEnable(GL_DEPTH_TEST);
- glDisable(GL_SCISSOR_TEST);
- depth_write=true;
- depth_test=true;
-
- if (scene_fx && scene_fx->skybox_active) {
-
- //skybox
- } else if (scene_fx && scene_fx->bgcolor_active) {
-
- glClearColor(scene_fx->bgcolor.r,scene_fx->bgcolor.g,scene_fx->bgcolor.b,1.0);
-
- } else {
-
- glClearColor(0.3,0.3,0.3,1.0);
- }
-#ifdef GLES_OVER_GL
- //glClearDepth(1.0);
-#else
- //glClearDepthf(1.0);
-#endif
-
- glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
-
- if (scene_fx && scene_fx->fog_active) {
-
- /*
- glEnable(GL_FOG);
- glFogf(GL_FOG_MODE,GL_LINEAR);
- glFogf(GL_FOG_DENSITY,scene_fx->fog_attenuation);
- glFogf(GL_FOG_START,scene_fx->fog_near);
- glFogf(GL_FOG_END,scene_fx->fog_far);
- glFogfv(GL_FOG_COLOR,scene_fx->fog_color_far.components);
- glLightfv(GL_LIGHT5,GL_DIFFUSE,scene_fx->fog_color_near.components);
-
- material_shader.set_conditional( MaterialShaderGLES1::USE_FOG,true);
- */
- }
-
-
-
- for(int i=0;i<directional_light_count;i++) {
-
- glEnable(GL_LIGHT0+i);
- _setup_light(directional_lights[i],i);
- }
-
- opaque_render_list.sort_mat_light();
-
- //material_shader.set_uniform_camera(MaterialShaderGLES1::PROJECTION_MATRIX, camera_projection);
-
- /*
- printf("setting projection to ");
- for (int i=0; i<16; i++) {
- printf("%f, ", ((float*)camera_projection.matrix)[i]);
- };
- printf("\n");
-
- print_line(String("setting camera to ")+camera_transform_inverse);
- */
-// material_shader.set_uniform_default(MaterialShaderGLES1::CAMERA_INVERSE, camera_transform_inverse);
-
- //projection
- //glEnable(GL_RESCALE_NORMAL);
- glEnable(GL_NORMALIZE);
-
- glMatrixMode(GL_PROJECTION);
- glLoadMatrixf(&camera_projection.matrix[0][0]);
- //modelview (fixedpipie)
- glMatrixMode(GL_MODELVIEW);
- _gl_load_transform(camera_transform_inverse);
- glPushMatrix();
-
- glDisable(GL_BLEND);
-
- blend_mode=VS::MATERIAL_BLEND_MODE_MIX;
- lighting=true;
- glEnable(GL_LIGHTING);
- glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
-
- _render_list_forward(&opaque_render_list);
-
-
- alpha_render_list.sort_z();
- glEnable(GL_BLEND);
-
- _render_list_forward(&alpha_render_list);
-
- glPopMatrix();
-
-
-// material_shader.set_conditional( MaterialShaderGLES1::USE_FOG,false);
-
- _debug_shadows();
-}
-void RasterizerGLES1::end_shadow_map() {
-#if 0
- ERR_FAIL_COND(!shadow);
- ERR_FAIL_INDEX(shadow_pass,shadow->shadow_buffers.size());
-
- glDisable(GL_BLEND);
- glDisable(GL_SCISSOR_TEST);
- glEnable(GL_DEPTH_TEST);
- glDepthMask(true);
-
-
- ShadowBuffer *sb = shadow->shadow_buffers[shadow_pass];
-
- ERR_FAIL_COND(!sb);
-
- glBindFramebuffer(GL_FRAMEBUFFER, sb->fbo);
- glViewport(0, 0, sb->size, sb->size);
-
- glColorMask(0, 0, 0, 0);
-
- glEnable(GL_POLYGON_OFFSET_FILL);
- //glPolygonOffset(4,8);
- glPolygonOffset( 4.0f, 4096.0f);
- glPolygonOffset( 8.0f, 16.0f);
-
- glClearDepth(1.0f);
- glClear(GL_DEPTH_BUFFER_BIT);
- CameraMatrix cm;
- float z_near,z_far;
- Transform light_transform;
-
- float dp_direction=0.0;
- bool flip_facing=false;
-
- switch(shadow->base->type) {
-
- case VS::LIGHT_DIRECTIONAL: {
-
- cm = shadow->custom_projection;
- light_transform=shadow->custom_transform;
- z_near=cm.get_z_near();
- z_far=cm.get_z_far();
-
- } break;
- case VS::LIGHT_OMNI: {
-
- material_shader.set_conditional(MaterialShaderGLES1::USE_DUAL_PARABOLOID,true);
- dp_direction = shadow_pass?1.0:0.0;
- flip_facing = (shadow_pass == 1);
- light_transform=shadow->transform;
- z_near=0;
- z_far=shadow->base->vars[ VS::LIGHT_VAR_RADIUS ];
- } break;
- case VS::LIGHT_SPOT: {
-
- float far = shadow->base->vars[ VS::LIGHT_VAR_RADIUS ];
- ERR_FAIL_COND( far<=0 );
- float near= far/200.0;
- if (near<0.05)
- near=0.05;
-
- float angle = shadow->base->vars[ VS::LIGHT_VAR_SPOT_ANGLE ];
-
- cm.set_perspective( angle*2.0, 1.0, near, far );
- shadow->projection=cm; // cache
- light_transform=shadow->transform;
- z_near=cm.get_z_near();
- z_far=cm.get_z_far();
-
- } break;
- }
-
- Transform light_transform_inverse = light_transform.inverse();
-
- opaque_render_list.sort_mat();
-
- glLightf(GL_LIGHT5,GL_LINEAR_ATTENUATION,z_near);
- glLightf(GL_LIGHT5,GL_QUADRATIC_ATTENUATION,z_far);
- glLightf(GL_LIGHT5,GL_CONSTANT_ATTENUATION,dp_direction);
-
- glMatrixMode(GL_PROJECTION);
- glLoadMatrixf(&cm.matrix[0][0]);
- glMatrixMode(GL_MODELVIEW);
- _gl_load_transform(light_transform_inverse);
- glPushMatrix();
-
- for(int i=0;i<4;i++) {
- for(int j=0;j<3;j++) {
-
- material_shader.set_conditional(_gl_light_version[i][j],false); //start false by default
- }
- material_shader.set_conditional(_gl_light_shadow[i],false);
- }
-
- _render_list_forward(&opaque_render_list,flip_facing);
-
- material_shader.set_conditional(MaterialShaderGLES1::USE_DUAL_PARABOLOID,false);
- glViewport( viewport.x, window_size.height-(viewport.height+viewport.y), viewport.width,viewport.height );
- if (framebuffer.active)
- glBindFramebufferEXT(GL_FRAMEBUFFER,framebuffer.fbo);
- else
- glBindFramebufferEXT(GL_FRAMEBUFFER,0);
-
- glDisable(GL_POLYGON_OFFSET_FILL);
-
- glColorMask(1, 1, 1, 1);
- shadow=NULL;
-#endif
-}
-
-void RasterizerGLES1::_debug_draw_shadow(ShadowBuffer *p_buffer, const Rect2& p_rect) {
-
-/*
-
- Transform modelview;
- modelview.translate(-(viewport.width / 2.0f), -(viewport.height / 2.0f), 0.0f);
- modelview.scale( Vector3( 2.0f / viewport.width, -2.0f / viewport.height, 1.0f ) );
- modelview.translate(p_rect.pos.x, p_rect.pos.y, 0);
- material_shader.set_uniform_default(MaterialShaderGLES1::MODELVIEW_TRANSFORM, *e->transform);
- glBindTexture(GL_TEXTURE_2D,p_buffer->depth);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_MODE, GL_NONE);
-
- Vector3 coords[4]= {
- Vector3(p_rect.pos.x, p_rect.pos.y, 0 ),
- Vector3(p_rect.pos.x+p_rect.size.width,
- p_rect.pos.y, 0 ),
- Vector3(p_rect.pos.x+p_rect.size.width,
- p_rect.pos.y+p_rect.size.height, 0 ),
- Vector3(p_rect.pos.x,
- p_rect.pos.y+p_rect.size.height, 0 )
- };
-
- Vector3 texcoords[4]={
- Vector3( 0.0f,0.0f, 0),
- Vector3( 1.0f,0.0f, 0),
- Vector3( 1.0f, 1.0f, 0),
- Vector3( 0.0f, 1.0f, 0),
- };
-
- _draw_primitive(4,coords,0,0,texcoords);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_MODE, GL_COMPARE_R_TO_TEXTURE);
-*/
-}
-
-void RasterizerGLES1::_debug_draw_shadows_type(Vector<ShadowBuffer>& p_shadows,Point2& ofs) {
-
-
-// Size2 debug_size(128,128);
- Size2 debug_size(512,512);
-
- for (int i=0;i<p_shadows.size();i++) {
-
- ShadowBuffer *sb=&p_shadows[i];
-
- if (!sb->owner)
- continue;
-
- if (sb->owner->base->type==VS::LIGHT_DIRECTIONAL) {
-
- if (sb->owner->shadow_pass!=scene_pass-1)
- continue;
- } else {
-
- if (sb->owner->shadow_pass!=frame)
- continue;
- }
- _debug_draw_shadow(sb, Rect2( ofs, debug_size ));
- ofs.x+=debug_size.x;
- if ( (ofs.x+debug_size.x) > viewport.width ) {
-
- ofs.x=0;
- ofs.y+=debug_size.y;
- }
- }
-
-}
-
-
-void RasterizerGLES1::_debug_shadows() {
-
- return;
-#if 0
- canvas_begin();
- glUseProgram(0);
- glDisable(GL_BLEND);
- Size2 ofs;
-
- /*
- for(int i=0;i<16;i++) {
- glActiveTexture(GL_TEXTURE0+i);
- //glDisable(GL_TEXTURE_2D);
- }
- glActiveTexture(GL_TEXTURE0);
- //glEnable(GL_TEXTURE_2D);
- */
-
-
- _debug_draw_shadows_type(near_shadow_buffers,ofs);
- _debug_draw_shadows_type(far_shadow_buffers,ofs);
-#endif
-}
-
-void RasterizerGLES1::end_frame() {
-
- /*
- if (framebuffer.active) {
-
- canvas_begin(); //resets stuff and goes back to fixedpipe
- glBindFramebuffer(GL_FRAMEBUFFER,0);
-
- //copy to main bufferz
- glEnable(GL_TEXTURE_2D);
-
- glBindTexture(GL_TEXTURE_2D,framebuffer.color);
- glBegin(GL_QUADS);
- glTexCoord2f(0,0);
- glVertex2f(-1,-1);
- glTexCoord2f(0,1);
- glVertex2f(-1,+1);
- glTexCoord2f(1,1);
- glVertex2f(+1,+1);
- glTexCoord2f(1,0);
- glVertex2f(+1,-1);
- glEnd();
-
-
- }
- */
-
- //print_line("VTX: "+itos(_rinfo.vertex_count)+" OBJ: "+itos(_rinfo.object_count)+" MAT: "+itos(_rinfo.mat_change_count)+" SHD: "+itos(_rinfo.shader_change_count));
-
- OS::get_singleton()->swap_buffers();
-}
-
-/* CANVAS API */
-
-
-void RasterizerGLES1::reset_state() {
-
-
- glBindBuffer(GL_ELEMENT_ARRAY_BUFFER,0); //unbind
- glBindBuffer(GL_ARRAY_BUFFER,0);
-
- glActiveTexture(GL_TEXTURE0);
- glClientActiveTexture(GL_TEXTURE0);
- glMatrixMode(GL_TEXTURE);
- glLoadIdentity();
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glMatrixMode(GL_MODELVIEW);
- glLoadIdentity();
- glColor4f(1,1,1,1);
-
- glDisable(GL_CULL_FACE);
- glDisable(GL_DEPTH_TEST);
- glEnable(GL_BLEND);
-// glBlendEquation(GL_FUNC_ADD);
- glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
-// glPolygonMode(GL_FRONT_AND_BACK,GL_FILL);
- canvas_blend=VS::MATERIAL_BLEND_MODE_MIX;
- glLineWidth(1.0);
- glDisable(GL_LIGHTING);
-
-}
-
-_FORCE_INLINE_ static void _set_glcoloro(const Color& p_color,const float p_opac) {
-
- glColor4f(p_color.r, p_color.g, p_color.b, p_color.a*p_opac);
-}
-
-
-void RasterizerGLES1::canvas_begin() {
-
-
- reset_state();
- canvas_opacity=1.0;
- glEnable(GL_BLEND);
-
-
-}
-
-void RasterizerGLES1::canvas_disable_blending() {
-
- glDisable(GL_BLEND);
-}
-
-void RasterizerGLES1::canvas_set_opacity(float p_opacity) {
-
- canvas_opacity = p_opacity;
-}
-
-void RasterizerGLES1::canvas_set_blend_mode(VS::MaterialBlendMode p_mode) {
-
- switch(p_mode) {
-
- case VS::MATERIAL_BLEND_MODE_MIX: {
- //glBlendEquation(GL_FUNC_ADD);
- glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
-
- } break;
- case VS::MATERIAL_BLEND_MODE_ADD: {
-
- //glBlendEquation(GL_FUNC_ADD);
- glBlendFunc(GL_SRC_ALPHA,GL_ONE);
-
- } break;
- case VS::MATERIAL_BLEND_MODE_SUB: {
-
- //glBlendEquation(GL_FUNC_SUBTRACT);
- glBlendFunc(GL_SRC_ALPHA,GL_ONE);
- } break;
- case VS::MATERIAL_BLEND_MODE_MUL: {
- //glBlendEquation(GL_FUNC_ADD);
- glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
-
- } break;
-
- }
-
-}
-
-
-void RasterizerGLES1::canvas_begin_rect(const Matrix32& p_transform) {
-
- glMatrixMode(GL_MODELVIEW);
- glLoadIdentity();
- glScalef(2.0 / viewport.width, -2.0 / viewport.height, 0);
- glTranslatef((-(viewport.width / 2.0)), (-(viewport.height / 2.0)), 0);
- _gl_mult_transform(p_transform);
-
- glPushMatrix();
-
-}
-
-void RasterizerGLES1::canvas_set_clip(bool p_clip, const Rect2& p_rect) {
-
- if (p_clip) {
-
- glEnable(GL_SCISSOR_TEST);
- // glScissor(viewport.x+p_rect.pos.x,viewport.y+ (viewport.height-(p_rect.pos.y+p_rect.size.height)),
- //p_rect.size.width,p_rect.size.height);
- //glScissor(p_rect.pos.x,(viewport.height-(p_rect.pos.y+p_rect.size.height)),p_rect.size.width,p_rect.size.height);
- glScissor(viewport.x+p_rect.pos.x,viewport.y+ (window_size.y-(p_rect.pos.y+p_rect.size.height)),
- p_rect.size.width,p_rect.size.height);
- } else {
-
- glDisable(GL_SCISSOR_TEST);
- }
-
-
-}
-
-void RasterizerGLES1::canvas_end_rect() {
-
- glPopMatrix();
-}
-
-void RasterizerGLES1::canvas_draw_line(const Point2& p_from, const Point2& p_to,const Color& p_color,float p_width) {
-
- glDisable(GL_TEXTURE_2D);
- _set_glcoloro( p_color,canvas_opacity );
-
- Vector3 verts[2]={
- Vector3(p_from.x,p_from.y,0),
- Vector3(p_to.x,p_to.y,0)
- };
- Color colors[2]={
- p_color,
- p_color
- };
- colors[0].a*=canvas_opacity;
- colors[1].a*=canvas_opacity;
- glLineWidth(p_width);
- _draw_primitive(2,verts,0,colors,0);
-
-}
-
-static void _draw_textured_quad(const Rect2& p_rect, const Rect2& p_src_region, const Size2& p_tex_size,bool p_flip_h=false,bool p_flip_v=false ) {
-
-
- Vector3 texcoords[4]= {
- Vector3( p_src_region.pos.x/p_tex_size.width,
- p_src_region.pos.y/p_tex_size.height, 0),
-
- Vector3((p_src_region.pos.x+p_src_region.size.width)/p_tex_size.width,
- p_src_region.pos.y/p_tex_size.height, 0),
-
- Vector3( (p_src_region.pos.x+p_src_region.size.width)/p_tex_size.width,
- (p_src_region.pos.y+p_src_region.size.height)/p_tex_size.height, 0),
-
- Vector3( p_src_region.pos.x/p_tex_size.width,
- (p_src_region.pos.y+p_src_region.size.height)/p_tex_size.height, 0)
- };
-
-
- if (p_flip_h) {
- SWAP( texcoords[0], texcoords[1] );
- SWAP( texcoords[2], texcoords[3] );
- }
- if (p_flip_v) {
- SWAP( texcoords[1], texcoords[2] );
- SWAP( texcoords[0], texcoords[3] );
- }
-
- Vector3 coords[4]= {
- Vector3( p_rect.pos.x, p_rect.pos.y, 0 ),
- Vector3( p_rect.pos.x+p_rect.size.width, p_rect.pos.y, 0 ),
- Vector3( p_rect.pos.x+p_rect.size.width, p_rect.pos.y+p_rect.size.height, 0 ),
- Vector3( p_rect.pos.x,p_rect.pos.y+p_rect.size.height, 0 )
- };
-
- _draw_primitive(4,coords,0,0,texcoords);
-}
-
-static void _draw_quad(const Rect2& p_rect) {
-
- Vector3 coords[4]= {
- Vector3( p_rect.pos.x,p_rect.pos.y, 0 ),
- Vector3( p_rect.pos.x+p_rect.size.width,p_rect.pos.y, 0 ),
- Vector3( p_rect.pos.x+p_rect.size.width,p_rect.pos.y+p_rect.size.height, 0 ),
- Vector3( p_rect.pos.x,p_rect.pos.y+p_rect.size.height, 0 )
- };
-
- _draw_primitive(4,coords,0,0,0);
-
-}
-
-
-void RasterizerGLES1::canvas_draw_rect(const Rect2& p_rect, int p_flags, const Rect2& p_source,RID p_texture,const Color& p_modulate) {
-
- _set_glcoloro( p_modulate,canvas_opacity );
-
- if ( p_texture.is_valid() ) {
-
- glEnable(GL_TEXTURE_2D);
- Texture *texture = texture_owner.get( p_texture );
- ERR_FAIL_COND(!texture);
- glActiveTexture(GL_TEXTURE0);
- glBindTexture( GL_TEXTURE_2D,texture->tex_id );
-
- if (!(p_flags&CANVAS_RECT_REGION)) {
-
- Rect2 region = Rect2(0,0,texture->width,texture->height);
- _draw_textured_quad(p_rect,region,region.size,p_flags&CANVAS_RECT_FLIP_H,p_flags&CANVAS_RECT_FLIP_V);
-
- } else {
-
-
- _draw_textured_quad(p_rect, p_source, Size2(texture->width,texture->height),p_flags&CANVAS_RECT_FLIP_H,p_flags&CANVAS_RECT_FLIP_V );
-
- }
- } else {
-
- glDisable(GL_TEXTURE_2D);
- _draw_quad( p_rect );
-
- }
-
-
-}
-void RasterizerGLES1::canvas_draw_style_box(const Rect2& p_rect, RID p_texture,const float *p_margin, bool p_draw_center,const Color& p_modulate) {
-
- _set_glcoloro( p_modulate,canvas_opacity );
-
-
- Texture *texture = texture_owner.get( p_texture );
- ERR_FAIL_COND(!texture);
-
- glEnable(GL_TEXTURE_2D);
- glActiveTexture(GL_TEXTURE0);
- glBindTexture( GL_TEXTURE_2D,texture->tex_id );
-
-
- /* CORNERS */
-
- _draw_textured_quad( // top left
- Rect2( p_rect.pos, Size2(p_margin[MARGIN_LEFT],p_margin[MARGIN_TOP])),
- Rect2( Point2(), Size2(p_margin[MARGIN_LEFT],p_margin[MARGIN_TOP])),
- Size2( texture->width, texture->height ) );
-
- _draw_textured_quad( // top right
- Rect2( Point2( p_rect.pos.x + p_rect.size.width - p_margin[MARGIN_RIGHT], p_rect.pos.y), Size2(p_margin[MARGIN_RIGHT],p_margin[MARGIN_TOP])),
- Rect2( Point2(texture->width-p_margin[MARGIN_RIGHT],0), Size2(p_margin[MARGIN_RIGHT],p_margin[MARGIN_TOP])),
- Size2( texture->width, texture->height ) );
-
-
- _draw_textured_quad( // bottom left
- Rect2( Point2(p_rect.pos.x,p_rect.pos.y + p_rect.size.height - p_margin[MARGIN_BOTTOM]), Size2(p_margin[MARGIN_LEFT],p_margin[MARGIN_BOTTOM])),
- Rect2( Point2(0,texture->height-p_margin[MARGIN_BOTTOM]), Size2(p_margin[MARGIN_LEFT],p_margin[MARGIN_BOTTOM])),
- Size2( texture->width, texture->height ) );
-
- _draw_textured_quad( // bottom right
- Rect2( Point2( p_rect.pos.x + p_rect.size.width - p_margin[MARGIN_RIGHT], p_rect.pos.y + p_rect.size.height - p_margin[MARGIN_BOTTOM]), Size2(p_margin[MARGIN_RIGHT],p_margin[MARGIN_BOTTOM])),
- Rect2( Point2(texture->width-p_margin[MARGIN_RIGHT],texture->height-p_margin[MARGIN_BOTTOM]), Size2(p_margin[MARGIN_RIGHT],p_margin[MARGIN_BOTTOM])),
- Size2( texture->width, texture->height ) );
-
- Rect2 rect_center( p_rect.pos+Point2( p_margin[MARGIN_LEFT], p_margin[MARGIN_TOP]), Size2( p_rect.size.width - p_margin[MARGIN_LEFT] - p_margin[MARGIN_RIGHT], p_rect.size.height - p_margin[MARGIN_TOP] - p_margin[MARGIN_BOTTOM] ));
-
- Rect2 src_center( Point2( p_margin[MARGIN_LEFT], p_margin[MARGIN_TOP]), Size2( texture->width - p_margin[MARGIN_LEFT] - p_margin[MARGIN_RIGHT], texture->height - p_margin[MARGIN_TOP] - p_margin[MARGIN_BOTTOM] ));
-
-
- _draw_textured_quad( // top
- Rect2( Point2(rect_center.pos.x,p_rect.pos.y),Size2(rect_center.size.width,p_margin[MARGIN_TOP])),
- Rect2( Point2(p_margin[MARGIN_LEFT],0), Size2(src_center.size.width,p_margin[MARGIN_TOP])),
- Size2( texture->width, texture->height ) );
-
- _draw_textured_quad( // bottom
- Rect2( Point2(rect_center.pos.x,rect_center.pos.y+rect_center.size.height),Size2(rect_center.size.width,p_margin[MARGIN_BOTTOM])),
- Rect2( Point2(p_margin[MARGIN_LEFT],src_center.pos.y+src_center.size.height), Size2(src_center.size.width,p_margin[MARGIN_BOTTOM])),
- Size2( texture->width, texture->height ) );
-
- _draw_textured_quad( // left
- Rect2( Point2(p_rect.pos.x,rect_center.pos.y),Size2(p_margin[MARGIN_LEFT],rect_center.size.height)),
- Rect2( Point2(0,p_margin[MARGIN_TOP]), Size2(p_margin[MARGIN_LEFT],src_center.size.height)),
- Size2( texture->width, texture->height ) );
-
- _draw_textured_quad( // right
- Rect2( Point2(rect_center.pos.x+rect_center.size.width,rect_center.pos.y),Size2(p_margin[MARGIN_RIGHT],rect_center.size.height)),
- Rect2( Point2(src_center.pos.x+src_center.size.width,p_margin[MARGIN_TOP]), Size2(p_margin[MARGIN_RIGHT],src_center.size.height)),
- Size2( texture->width, texture->height ) );
-
- if (p_draw_center) {
-
- _draw_textured_quad(
- rect_center,
- src_center,
- Size2( texture->width, texture->height ));
- }
-
-}
-void RasterizerGLES1::canvas_draw_primitive(const Vector<Point2>& p_points, const Vector<Color>& p_colors,const Vector<Point2>& p_uvs, RID p_texture,float p_width) {
-
- ERR_FAIL_COND(p_points.size()<1);
- Vector3 verts[4];
- Vector3 uvs[4];
-
- _set_glcoloro( Color(1,1,1),canvas_opacity );
-
- for(int i=0;i<p_points.size();i++) {
-
- verts[i]=Vector3(p_points[i].x,p_points[i].y,0);
- }
-
- for(int i=0;i<p_uvs.size();i++) {
-
- uvs[i]=Vector3(p_uvs[i].x,p_uvs[i].y,0);
- }
-
- if (p_texture.is_valid()) {
- glEnable(GL_TEXTURE_2D);
- Texture *texture = texture_owner.get( p_texture );
- if (texture) {
- glActiveTexture(GL_TEXTURE0);
- glBindTexture( GL_TEXTURE_2D,texture->tex_id );
- }
- }
-
- glLineWidth(p_width);
- _draw_primitive(p_points.size(),&verts[0],NULL,p_colors.size()?&p_colors[0]:NULL,p_uvs.size()?uvs:NULL);
-
-}
-
-static const int _max_draw_poly_indices = 8*1024;
-static uint16_t _draw_poly_indices[_max_draw_poly_indices];
-static float _verts3[_max_draw_poly_indices];
-
-void RasterizerGLES1::canvas_draw_polygon(int p_vertex_count, const int* p_indices, const Vector2* p_vertices, const Vector2* p_uvs, const Color* p_colors,const RID& p_texture,bool p_singlecolor) {
-
- bool do_colors=false;
-
- //reset_state();
- if (p_singlecolor) {
- Color m = *p_colors;
- m.a*=canvas_opacity;
- glColor4f(m.r, m.g, m.b, m.a);
- } else if (!p_colors) {
- glColor4f(1, 1, 1, canvas_opacity);
- } else
- do_colors=true;
-
- glColor4f(1, 1, 1, 1);
-
- Texture* texture = NULL;
- if (p_texture.is_valid()) {
- glEnable(GL_TEXTURE_2D);
- texture = texture_owner.get( p_texture );
- if (texture) {
- glActiveTexture(GL_TEXTURE0);
- glBindTexture( GL_TEXTURE_2D,texture->tex_id );
- }
- }
-
- glEnableClientState(GL_VERTEX_ARRAY);
- glVertexPointer(2, GL_FLOAT, 0, (GLvoid*)p_vertices);
- if (do_colors) {
-
- glEnableClientState(GL_COLOR_ARRAY);
- glColorPointer(4,GL_FLOAT, 0, p_colors);
-
- } else {
- glDisableClientState(GL_COLOR_ARRAY);
- }
-
- if (texture && p_uvs) {
-
- glClientActiveTexture(GL_TEXTURE0);
- glEnableClientState(GL_TEXTURE_COORD_ARRAY);
- glTexCoordPointer(2, GL_FLOAT, 0, p_uvs);
-
- } else {
- glDisableClientState(GL_TEXTURE_COORD_ARRAY);
- }
-
- if (p_indices) {
-
- for (int i=0; i<p_vertex_count; i++) {
- _draw_poly_indices[i] = p_indices[i];
- };
- glDrawElements(GL_TRIANGLES, p_vertex_count, GL_UNSIGNED_SHORT, _draw_poly_indices );
- } else {
-
- glDrawArrays(GL_TRIANGLES,0,p_vertex_count);
- }
-
- glDisableClientState(GL_VERTEX_ARRAY);
- glDisableClientState(GL_COLOR_ARRAY);
- glDisableClientState(GL_TEXTURE_COORD_ARRAY);
-
-}
-
-void RasterizerGLES1::canvas_set_transform(const Matrix32& p_transform) {
-
- //restore
- glPopMatrix();
- glPushMatrix();
- //set
- _gl_mult_transform(p_transform);
-}
-
-/* FX */
-
-RID RasterizerGLES1::fx_create() {
-
- FX *fx = memnew( FX );
- ERR_FAIL_COND_V(!fx,RID());
- return fx_owner.make_rid(fx);
-
-}
-void RasterizerGLES1::fx_get_effects(RID p_fx,List<String> *p_effects) const {
-
- FX *fx = fx_owner.get(p_fx);
- ERR_FAIL_COND(!fx);
-
- p_effects->clear();
- p_effects->push_back("bgcolor");
- p_effects->push_back("skybox");
- p_effects->push_back("antialias");
- //p_effects->push_back("hdr");
- p_effects->push_back("glow"); // glow has a bloom parameter, too
- p_effects->push_back("ssao");
- p_effects->push_back("fog");
- p_effects->push_back("dof_blur");
- p_effects->push_back("toon");
- p_effects->push_back("edge");
-
-}
-void RasterizerGLES1::fx_set_active(RID p_fx,const String& p_effect, bool p_active) {
-
- FX *fx = fx_owner.get(p_fx);
- ERR_FAIL_COND(!fx);
-
- if (p_effect=="bgcolor")
- fx->bgcolor_active=p_active;
- else if (p_effect=="skybox")
- fx->skybox_active=p_active;
- else if (p_effect=="antialias")
- fx->antialias_active=p_active;
- else if (p_effect=="glow")
- fx->glow_active=p_active;
- else if (p_effect=="ssao")
- fx->ssao_active=p_active;
- else if (p_effect=="fog")
- fx->fog_active=p_active;
-// else if (p_effect=="dof_blur")
-// fx->dof_blur_active=p_active;
- else if (p_effect=="toon")
- fx->toon_active=p_active;
- else if (p_effect=="edge")
- fx->edge_active=p_active;
-}
-bool RasterizerGLES1::fx_is_active(RID p_fx,const String& p_effect) const {
-
- FX *fx = fx_owner.get(p_fx);
- ERR_FAIL_COND_V(!fx,false);
-
- if (p_effect=="bgcolor")
- return fx->bgcolor_active;
- else if (p_effect=="skybox")
- return fx->skybox_active;
- else if (p_effect=="antialias")
- return fx->antialias_active;
- else if (p_effect=="glow")
- return fx->glow_active;
- else if (p_effect=="ssao")
- return fx->ssao_active;
- else if (p_effect=="fog")
- return fx->fog_active;
- //else if (p_effect=="dof_blur")
- // return fx->dof_blur_active;
- else if (p_effect=="toon")
- return fx->toon_active;
- else if (p_effect=="edge")
- return fx->edge_active;
-
- return false;
-}
-void RasterizerGLES1::fx_get_effect_params(RID p_fx,const String& p_effect,List<PropertyInfo> *p_params) const {
-
- FX *fx = fx_owner.get(p_fx);
- ERR_FAIL_COND(!fx);
-
-
- if (p_effect=="bgcolor") {
-
- p_params->push_back( PropertyInfo( Variant::COLOR, "color" ) );
- } else if (p_effect=="skybox") {
- p_params->push_back( PropertyInfo( Variant::_RID, "cubemap" ) );
- } else if (p_effect=="antialias") {
-
- p_params->push_back( PropertyInfo( Variant::REAL, "tolerance", PROPERTY_HINT_RANGE,"1,128,1" ) );
-
- } else if (p_effect=="glow") {
-
- p_params->push_back( PropertyInfo( Variant::INT, "passes", PROPERTY_HINT_RANGE,"1,4,1" ) );
- p_params->push_back( PropertyInfo( Variant::REAL, "attenuation", PROPERTY_HINT_RANGE,"0.01,8.0,0.01" ) );
- p_params->push_back( PropertyInfo( Variant::REAL, "bloom", PROPERTY_HINT_RANGE,"-1.0,1.0,0.01" ) );
-
- } else if (p_effect=="ssao") {
-
- p_params->push_back( PropertyInfo( Variant::REAL, "radius", PROPERTY_HINT_RANGE,"0.0,16.0,0.01" ) );
- p_params->push_back( PropertyInfo( Variant::REAL, "max_distance", PROPERTY_HINT_RANGE,"0.0,256.0,0.01" ) );
- p_params->push_back( PropertyInfo( Variant::REAL, "range_max", PROPERTY_HINT_RANGE,"0.0,1.0,0.01" ) );
- p_params->push_back( PropertyInfo( Variant::REAL, "range_min", PROPERTY_HINT_RANGE,"0.0,1.0,0.01" ) );
- p_params->push_back( PropertyInfo( Variant::REAL, "attenuation", PROPERTY_HINT_RANGE,"0.0,8.0,0.01" ) );
-
- } else if (p_effect=="fog") {
-
- p_params->push_back( PropertyInfo( Variant::REAL, "begin", PROPERTY_HINT_RANGE,"0.0,8192,0.01" ) );
- p_params->push_back( PropertyInfo( Variant::REAL, "end", PROPERTY_HINT_RANGE,"0.0,8192,0.01" ) );
- p_params->push_back( PropertyInfo( Variant::REAL, "attenuation", PROPERTY_HINT_RANGE,"0.0,8.0,0.01" ) );
- p_params->push_back( PropertyInfo( Variant::COLOR, "color_begin" ) );
- p_params->push_back( PropertyInfo( Variant::COLOR, "color_end" ) );
- p_params->push_back( PropertyInfo( Variant::BOOL, "fog_bg" ) );
-
-// } else if (p_effect=="dof_blur") {
-// return fx->dof_blur_active;
- } else if (p_effect=="toon") {
- p_params->push_back( PropertyInfo( Variant::REAL, "treshold", PROPERTY_HINT_RANGE,"0.0,1.0,0.01" ) );
- p_params->push_back( PropertyInfo( Variant::REAL, "soft", PROPERTY_HINT_RANGE,"0.001,1.0,0.001" ) );
- } else if (p_effect=="edge") {
-
- }
-}
-Variant RasterizerGLES1::fx_get_effect_param(RID p_fx,const String& p_effect,const String& p_param) const {
-
- FX *fx = fx_owner.get(p_fx);
- ERR_FAIL_COND_V(!fx,Variant());
-
- if (p_effect=="bgcolor") {
-
- if (p_param=="color")
- return fx->bgcolor;
- } else if (p_effect=="skybox") {
- if (p_param=="cubemap")
- return fx->skybox_cubemap;
- } else if (p_effect=="antialias") {
-
- if (p_param=="tolerance")
- return fx->antialias_tolerance;
-
- } else if (p_effect=="glow") {
-
- if (p_param=="passes")
- return fx->glow_passes;
- if (p_param=="attenuation")
- return fx->glow_attenuation;
- if (p_param=="bloom")
- return fx->glow_bloom;
-
- } else if (p_effect=="ssao") {
-
- if (p_param=="attenuation")
- return fx->ssao_attenuation;
- if (p_param=="max_distance")
- return fx->ssao_max_distance;
- if (p_param=="range_max")
- return fx->ssao_range_max;
- if (p_param=="range_min")
- return fx->ssao_range_min;
- if (p_param=="radius")
- return fx->ssao_radius;
-
- } else if (p_effect=="fog") {
-
- if (p_param=="begin")
- return fx->fog_near;
- if (p_param=="end")
- return fx->fog_far;
- if (p_param=="attenuation")
- return fx->fog_attenuation;
- if (p_param=="color_begin")
- return fx->fog_color_near;
- if (p_param=="color_end")
- return fx->fog_color_far;
- if (p_param=="fog_bg")
- return fx->fog_bg;
-// } else if (p_effect=="dof_blur") {
-// return fx->dof_blur_active;
- } else if (p_effect=="toon") {
- if (p_param=="treshold")
- return fx->toon_treshold;
- if (p_param=="soft")
- return fx->toon_soft;
-
- } else if (p_effect=="edge") {
-
- }
- return Variant();
-}
-void RasterizerGLES1::fx_set_effect_param(RID p_fx,const String& p_effect, const String& p_param, const Variant& p_value) {
-
- FX *fx = fx_owner.get(p_fx);
- ERR_FAIL_COND(!fx);
-
- if (p_effect=="bgcolor") {
-
- if (p_param=="color")
- fx->bgcolor=p_value;
- } else if (p_effect=="skybox") {
- if (p_param=="cubemap")
- fx->skybox_cubemap=p_value;
-
- } else if (p_effect=="antialias") {
-
- if (p_param=="tolerance")
- fx->antialias_tolerance=p_value;
-
- } else if (p_effect=="glow") {
-
- if (p_param=="passes")
- fx->glow_passes=p_value;
- if (p_param=="attenuation")
- fx->glow_attenuation=p_value;
- if (p_param=="bloom")
- fx->glow_bloom=p_value;
-
- } else if (p_effect=="ssao") {
-
- if (p_param=="attenuation")
- fx->ssao_attenuation=p_value;
- if (p_param=="radius")
- fx->ssao_radius=p_value;
- if (p_param=="max_distance")
- fx->ssao_max_distance=p_value;
- if (p_param=="range_max")
- fx->ssao_range_max=p_value;
- if (p_param=="range_min")
- fx->ssao_range_min=p_value;
-
- } else if (p_effect=="fog") {
-
- if (p_param=="begin")
- fx->fog_near=p_value;
- if (p_param=="end")
- fx->fog_far=p_value;
- if (p_param=="attenuation")
- fx->fog_attenuation=p_value;
- if (p_param=="color_begin")
- fx->fog_color_near=p_value;
- if (p_param=="color_end")
- fx->fog_color_far=p_value;
- if (p_param=="fog_bg")
- fx->fog_bg=p_value;
-// } else if (p_effect=="dof_blur") {
-// fx->dof_blur_active=p_value;
- } else if (p_effect=="toon") {
-
- if (p_param=="treshold")
- fx->toon_treshold=p_value;
- if (p_param=="soft")
- fx->toon_soft=p_value;
-
- } else if (p_effect=="edge") {
-
- }
-
-}
-
-/* ENVIRONMENT */
-
-RID RasterizerGLES1::environment_create() {
-
- Environment * env = memnew( Environment );
- return environment_owner.make_rid(env);
-}
-
-void RasterizerGLES1::environment_set_background(RID p_env,VS::EnvironmentBG p_bg) {
-
- ERR_FAIL_INDEX(p_bg,VS::ENV_BG_MAX);
- Environment * env = environment_owner.get(p_env);
- ERR_FAIL_COND(!env);
- env->bg_mode=p_bg;
-}
-
-VS::EnvironmentBG RasterizerGLES1::environment_get_background(RID p_env) const{
-
- const Environment * env = environment_owner.get(p_env);
- ERR_FAIL_COND_V(!env,VS::ENV_BG_MAX);
- return env->bg_mode;
-}
-
-void RasterizerGLES1::environment_set_background_param(RID p_env,VS::EnvironmentBGParam p_param, const Variant& p_value){
-
- ERR_FAIL_INDEX(p_param,VS::ENV_BG_PARAM_MAX);
- Environment * env = environment_owner.get(p_env);
- ERR_FAIL_COND(!env);
- env->bg_param[p_param]=p_value;
-
-}
-Variant RasterizerGLES1::environment_get_background_param(RID p_env,VS::EnvironmentBGParam p_param) const{
-
- ERR_FAIL_INDEX_V(p_param,VS::ENV_BG_PARAM_MAX,Variant());
- const Environment * env = environment_owner.get(p_env);
- ERR_FAIL_COND_V(!env,Variant());
- return env->bg_param[p_param];
-
-}
-
-void RasterizerGLES1::environment_set_enable_fx(RID p_env,VS::EnvironmentFx p_effect,bool p_enabled){
-
- ERR_FAIL_INDEX(p_effect,VS::ENV_FX_MAX);
- Environment * env = environment_owner.get(p_env);
- ERR_FAIL_COND(!env);
- env->fx_enabled[p_effect]=p_enabled;
-}
-bool RasterizerGLES1::environment_is_fx_enabled(RID p_env,VS::EnvironmentFx p_effect) const{
-
- ERR_FAIL_INDEX_V(p_effect,VS::ENV_FX_MAX,false);
- const Environment * env = environment_owner.get(p_env);
- ERR_FAIL_COND_V(!env,false);
- return env->fx_enabled[p_effect];
-
-}
-
-void RasterizerGLES1::environment_fx_set_param(RID p_env,VS::EnvironmentFxParam p_param,const Variant& p_value){
-
- ERR_FAIL_INDEX(p_param,VS::ENV_FX_PARAM_MAX);
- Environment * env = environment_owner.get(p_env);
- ERR_FAIL_COND(!env);
- env->fx_param[p_param]=p_value;
-}
-Variant RasterizerGLES1::environment_fx_get_param(RID p_env,VS::EnvironmentFxParam p_param) const{
-
- ERR_FAIL_INDEX_V(p_param,VS::ENV_FX_PARAM_MAX,Variant());
- const Environment * env = environment_owner.get(p_env);
- ERR_FAIL_COND_V(!env,Variant());
- return env->fx_param[p_param];
-
-}
-
-/* SAMPLED LIGHT */
-
-RID RasterizerGLES1::sampled_light_dp_create(int p_width,int p_height) {
-
- return sampled_light_owner.make_rid(memnew(SampledLight));
-}
-
-void RasterizerGLES1::sampled_light_dp_update(RID p_sampled_light, const Color *p_data, float p_multiplier) {
-
-
-}
-
-/*MISC*/
-
-bool RasterizerGLES1::is_texture(const RID& p_rid) const {
-
- return texture_owner.owns(p_rid);
-}
-bool RasterizerGLES1::is_material(const RID& p_rid) const {
-
- return material_owner.owns(p_rid);
-}
-bool RasterizerGLES1::is_mesh(const RID& p_rid) const {
-
- return mesh_owner.owns(p_rid);
-}
-
-bool RasterizerGLES1::is_immediate(const RID& p_rid) const {
-
- return immediate_owner.owns(p_rid);
-}
-
-bool RasterizerGLES1::is_multimesh(const RID& p_rid) const {
-
- return multimesh_owner.owns(p_rid);
-}
-bool RasterizerGLES1::is_particles(const RID &p_beam) const {
-
- return particles_owner.owns(p_beam);
-}
-
-bool RasterizerGLES1::is_light(const RID& p_rid) const {
-
- return light_owner.owns(p_rid);
-}
-bool RasterizerGLES1::is_light_instance(const RID& p_rid) const {
-
- return light_instance_owner.owns(p_rid);
-}
-bool RasterizerGLES1::is_particles_instance(const RID& p_rid) const {
-
- return particles_instance_owner.owns(p_rid);
-}
-bool RasterizerGLES1::is_skeleton(const RID& p_rid) const {
-
- return skeleton_owner.owns(p_rid);
-}
-bool RasterizerGLES1::is_environment(const RID& p_rid) const {
-
- return environment_owner.owns(p_rid);
-}
-bool RasterizerGLES1::is_fx(const RID& p_rid) const {
-
- return fx_owner.owns(p_rid);
-}
-bool RasterizerGLES1::is_shader(const RID& p_rid) const {
-
- return false;
-}
-
-void RasterizerGLES1::free(const RID& p_rid) {
-
- if (texture_owner.owns(p_rid)) {
-
- // delete the texture
- Texture *texture = texture_owner.get(p_rid);
-
- glDeleteTextures( 1,&texture->tex_id );
- _rinfo.texture_mem-=texture->total_data_size;
- texture_owner.free(p_rid);
- memdelete(texture);
-
- } else if (shader_owner.owns(p_rid)) {
-
- // delete the texture
- Shader *shader = shader_owner.get(p_rid);
-
-
-
- shader_owner.free(p_rid);
- memdelete(shader);
-
- } else if (material_owner.owns(p_rid)) {
-
- Material *material = material_owner.get( p_rid );
- ERR_FAIL_COND(!material);
-
- material_owner.free(p_rid);
- memdelete(material);
-
- } else if (mesh_owner.owns(p_rid)) {
-
- Mesh *mesh = mesh_owner.get(p_rid);
- ERR_FAIL_COND(!mesh);
- for (int i=0;i<mesh->surfaces.size();i++) {
-
- Surface *surface = mesh->surfaces[i];
- if (surface->array_local != 0) {
- memfree(surface->array_local);
- };
- if (surface->index_array_local != 0) {
- memfree(surface->index_array_local);
- };
-
- if (mesh->morph_target_count>0) {
-
- for(int i=0;i<mesh->morph_target_count;i++) {
-
- memfree(surface->morph_targets_local[i].array);
- }
- memfree(surface->morph_targets_local);
- surface->morph_targets_local=NULL;
- }
-
- if (surface->vertex_id)
- glDeleteBuffers(1,&surface->vertex_id);
- if (surface->index_id)
- glDeleteBuffers(1,&surface->index_id);
-
- memdelete( surface );
- };
-
- mesh->surfaces.clear();
-
- mesh_owner.free(p_rid);
- memdelete(mesh);
-
- } else if (multimesh_owner.owns(p_rid)) {
-
- MultiMesh *multimesh = multimesh_owner.get(p_rid);
- ERR_FAIL_COND(!multimesh);
-
- multimesh_owner.free(p_rid);
- memdelete(multimesh);
-
- } else if (particles_owner.owns(p_rid)) {
-
- Particles *particles = particles_owner.get(p_rid);
- ERR_FAIL_COND(!particles);
-
- particles_owner.free(p_rid);
- memdelete(particles);
- } else if (immediate_owner.owns(p_rid)) {
-
- Immediate *immediate = immediate_owner.get(p_rid);
- ERR_FAIL_COND(!immediate);
-
- immediate_owner.free(p_rid);
- memdelete(immediate);
- } else if (particles_instance_owner.owns(p_rid)) {
-
- ParticlesInstance *particles_isntance = particles_instance_owner.get(p_rid);
- ERR_FAIL_COND(!particles_isntance);
-
- particles_instance_owner.free(p_rid);
- memdelete(particles_isntance);
-
- } else if (skeleton_owner.owns(p_rid)) {
-
- Skeleton *skeleton = skeleton_owner.get( p_rid );
- ERR_FAIL_COND(!skeleton)
-
- skeleton_owner.free(p_rid);
- memdelete(skeleton);
-
- } else if (light_owner.owns(p_rid)) {
-
- Light *light = light_owner.get( p_rid );
- ERR_FAIL_COND(!light)
-
- light_owner.free(p_rid);
- memdelete(light);
-
- } else if (light_instance_owner.owns(p_rid)) {
-
- LightInstance *light_instance = light_instance_owner.get( p_rid );
- ERR_FAIL_COND(!light_instance);
- light_instance->clear_shadow_buffers();
- light_instance_owner.free(p_rid);
- memdelete( light_instance );
-
- } else if (fx_owner.owns(p_rid)) {
-
- FX *fx = fx_owner.get( p_rid );
- ERR_FAIL_COND(!fx);
-
- fx_owner.free(p_rid);
- memdelete( fx );
-
- } else if (environment_owner.owns(p_rid)) {
-
- Environment *env = environment_owner.get( p_rid );
- ERR_FAIL_COND(!env);
-
- environment_owner.free(p_rid);
- memdelete( env );
- } else if (sampled_light_owner.owns(p_rid)) {
-
- SampledLight *sampled_light = sampled_light_owner.get( p_rid );
- ERR_FAIL_COND(!sampled_light);
-
- sampled_light_owner.free(p_rid);
- memdelete( sampled_light );
- };
-}
-
-
-void RasterizerGLES1::custom_shade_model_set_shader(int p_model, RID p_shader) {
-
-
-};
-
-RID RasterizerGLES1::custom_shade_model_get_shader(int p_model) const {
-
- return RID();
-};
-
-void RasterizerGLES1::custom_shade_model_set_name(int p_model, const String& p_name) {
-
-};
-
-String RasterizerGLES1::custom_shade_model_get_name(int p_model) const {
-
- return String();
-};
-
-void RasterizerGLES1::custom_shade_model_set_param_info(int p_model, const List<PropertyInfo>& p_info) {
-
-};
-
-void RasterizerGLES1::custom_shade_model_get_param_info(int p_model, List<PropertyInfo>* p_info) const {
-
-};
-
-
-void RasterizerGLES1::ShadowBuffer::init(int p_size) {
-
-
-#if 0
- size=p_size;
-
- glActiveTexture(GL_TEXTURE0);
- glGenTextures(1, &depth);
- ERR_FAIL_COND(depth==0);
-
- /* Setup Depth Texture */
- glBindTexture(GL_TEXTURE_2D, depth);
- glTexImage2D (GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT, p_size, p_size, 0, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT, NULL);
-
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_MODE, GL_COMPARE_R_TO_TEXTURE);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_FUNC, GL_LEQUAL);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_BORDER);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_BORDER);
- float border_color[]={1.0f, 1.0f, 1.0f, 1.0f};
- glTexParameterfv(GL_TEXTURE_2D, GL_TEXTURE_BORDER_COLOR, border_color);
-
- /* Create FBO */
- glGenFramebuffers(1, &fbo);
-
- ERR_FAIL_COND( fbo==0 );
-
- glBindFramebuffer(GL_FRAMEBUFFER, fbo);
- glFramebufferTexture2D(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_TEXTURE_2D, depth, 0);
- glDrawBuffer(GL_FALSE);
- glReadBuffer(GL_FALSE);
-
- /* Check FBO creation */
- GLenum status = glCheckFramebufferStatusEXT(GL_FRAMEBUFFER);
-
- ERR_FAIL_COND( status==GL_FRAMEBUFFER_UNSUPPORTED );
-
- glBindFramebufferEXT(GL_FRAMEBUFFER, 0);
-#endif
-
-}
-
-void RasterizerGLES1::_init_shadow_buffers() {
-
- int near_shadow_size=GLOBAL_DEF("rasterizer/near_shadow_size",512);
- int far_shadow_size=GLOBAL_DEF("rasterizer/far_shadow_size",64);
-
- near_shadow_buffers.resize( GLOBAL_DEF("rasterizer/near_shadow_count",4) );
- far_shadow_buffers.resize( GLOBAL_DEF("rasterizer/far_shadow_count",16) );
-
- shadow_near_far_split_size_ratio = GLOBAL_DEF("rasterizer/shadow_near_far_split_size_ratio",0.3);
-
- for (int i=0;i<near_shadow_buffers.size();i++) {
-
- near_shadow_buffers[i].init(near_shadow_size );
- }
-
- for (int i=0;i<far_shadow_buffers.size();i++) {
-
- far_shadow_buffers[i].init(far_shadow_size);
- }
-
-}
-
-
-void RasterizerGLES1::_update_framebuffer() {
-
- return;
-
-#if 0
- bool want_16 = GLOBAL_DEF("rasterizer/support_hdr",true);
- int blur_buffer_div=GLOBAL_DEF("rasterizer/blur_buffer_div",4);
- bool use_fbo = GLOBAL_DEF("rasterizer/use_fbo",true);
-
-
- if (blur_buffer_div<1)
- blur_buffer_div=2;
-
-
- if (use_fbo==framebuffer.active && framebuffer.width==window_size.width && framebuffer.height==window_size.height && framebuffer.buff16==want_16)
- return; //nuthin to change
-
- if (framebuffer.fbo!=0) {
-
- WARN_PRINT("Resizing the screen multiple times while using to FBOs may decrease performance on some hardware.");
- //free the framebuffarz
- glDeleteRenderbuffers(1,&framebuffer.fbo);
- glDeleteTextures(1,&framebuffer.depth);
- glDeleteTextures(1,&framebuffer.color);
- for(int i=0;i<2;i++) {
- glDeleteRenderbuffers(1,&framebuffer.blur[i].fbo);
- glDeleteTextures(1,&framebuffer.blur[i].color);
-
- }
-
- framebuffer.fbo=0;
- }
-
- framebuffer.active=use_fbo;
- framebuffer.width=window_size.width;
- framebuffer.height=window_size.height;
- framebuffer.buff16=want_16;
-
-
- if (!use_fbo)
- return;
-
-
- glGenFramebuffers(1, &framebuffer.fbo);
- glBindFramebuffer(GL_FRAMEBUFFER, framebuffer.fbo);
-
- print_line("generating fbo, id: "+itos(framebuffer.fbo));
- //depth
- glGenTextures(1, &framebuffer.depth);
-
- glBindTexture(GL_TEXTURE_2D, framebuffer.depth);
- glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT24, framebuffer.width, framebuffer.height, 0, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT, NULL);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_MODE, GL_NONE );
- glFramebufferTexture2D(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_TEXTURE_2D, framebuffer.depth, 0);
- //color
- glGenTextures(1, &framebuffer.color);
- glBindTexture(GL_TEXTURE_2D, framebuffer.color);
- glTexImage2D(GL_TEXTURE_2D, 0, want_16?GL_RGB16F:GL_RGBA8, framebuffer.width, framebuffer.height, 0, GL_RGBA, want_16?GL_HALF_FLOAT:GL_UNSIGNED_BYTE, NULL);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
- glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, framebuffer.color, 0);
- GLenum status = glCheckFramebufferStatus(GL_FRAMEBUFFER);
- ERR_FAIL_COND( status != GL_FRAMEBUFFER_COMPLETE );
-
- for(int i=0;i<2;i++) {
-
- glGenFramebuffers(1, &framebuffer.blur[i].fbo);
- glBindFramebuffer(GL_FRAMEBUFFER, framebuffer.blur[i].fbo);
-
- glGenTextures(1, &framebuffer.blur[i].color);
- glBindTexture(GL_TEXTURE_2D, framebuffer.blur[i].color);
- glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, framebuffer.width/blur_buffer_div, framebuffer.height/blur_buffer_div, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
- glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, framebuffer.blur[i].color, 0);
-
- status = glCheckFramebufferStatus(GL_FRAMEBUFFER);
- ERR_FAIL_COND( status != GL_FRAMEBUFFER_COMPLETE );
- }
-
- glBindFramebuffer(GL_FRAMEBUFFER, 0);
-#endif
-}
-
-void RasterizerGLES1::init() {
-
-#ifdef GLES_OVER_GL
- glewInit();
-#endif
-
-
-
-
- scene_pass=1;
- if (ContextGL::get_singleton())
- ContextGL::get_singleton()->make_current();
-
-
-
- Set<String> extensions;
- Vector<String> strings = String((const char*)glGetString( GL_EXTENSIONS )).split(" ",false);
- for(int i=0;i<strings.size();i++) {
-
- extensions.insert(strings[i]);
-// print_line(strings[i]);
- }
-
-
-
- GLint tmp = 0;
-// glGetIntegerv(GL_MAX_VERTEX_ATTRIBS, &tmp);
-// print_line("GL_MAX_VERTEX_ATTRIBS "+itos(tmp));
-
- glEnable(GL_DEPTH_TEST);
- glDepthFunc(GL_LEQUAL);
- glFrontFace(GL_CW);
- //glEnable(GL_TEXTURE_2D);
-
- default_material=create_default_material();
-
- _init_shadow_buffers();
-
- shadow=NULL;
- shadow_pass=0;
-
- framebuffer.fbo=0;
- framebuffer.width=0;
- framebuffer.height=0;
- framebuffer.buff16=false;
- framebuffer.blur[0].fbo=false;
- framebuffer.blur[1].fbo=false;
- framebuffer.active=false;
-
- //do a single initial clear
- glClearColor(0,0,0,1);
- //glClearDepth(1.0);
- glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
-
- skinned_buffer_size = GLOBAL_DEF("rasterizer/skinned_buffer_size",DEFAULT_SKINNED_BUFFER_SIZE);
- skinned_buffer = memnew_arr( uint8_t, skinned_buffer_size );
-
- glGenTextures(1, &white_tex);
- unsigned char whitetexdata[8*8*3];
- for(int i=0;i<8*8*3;i++) {
- whitetexdata[i]=255;
- }
- glActiveTexture(GL_TEXTURE0);
- glBindTexture(GL_TEXTURE_2D,white_tex);
- glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, 8, 8, 0, GL_RGB, GL_UNSIGNED_BYTE,whitetexdata);
-
- npo2_textures_available=false;
- pvr_supported=extensions.has("GL_IMG_texture_compression_pvrtc");
- etc_supported=true;
- s3tc_supported=false;
- _rinfo.texture_mem=0;
-
-
-}
-
-void RasterizerGLES1::finish() {
-
- memdelete(skinned_buffer);
-}
-
-int RasterizerGLES1::get_render_info(VS::RenderInfo p_info) {
-
- switch(p_info) {
-
- case VS::INFO_OBJECTS_IN_FRAME: {
-
- return _rinfo.object_count;
- } break;
- case VS::INFO_VERTICES_IN_FRAME: {
-
- return _rinfo.vertex_count;
- } break;
- case VS::INFO_MATERIAL_CHANGES_IN_FRAME: {
-
- return _rinfo.mat_change_count;
- } break;
- case VS::INFO_SHADER_CHANGES_IN_FRAME: {
-
- return _rinfo.shader_change_count;
- } break;
- case VS::INFO_USAGE_VIDEO_MEM_TOTAL: {
-
- return 0;
- } break;
- case VS::INFO_VIDEO_MEM_USED: {
-
- return get_render_info(VS::INFO_TEXTURE_MEM_USED)+get_render_info(VS::INFO_VERTEX_MEM_USED);
- } break;
- case VS::INFO_TEXTURE_MEM_USED: {
-
- _rinfo.texture_mem;
- } break;
- case VS::INFO_VERTEX_MEM_USED: {
-
- return 0;
- } break;
- }
-
- return false;
-}
-
-bool RasterizerGLES1::needs_to_draw_next_frame() const {
-
- return false;
-}
-
-void RasterizerGLES1::reload_vram() {
-
- glEnable(GL_DEPTH_TEST);
- glDepthFunc(GL_LEQUAL);
- glFrontFace(GL_CW);
-
- //do a single initial clear
- glClearColor(0,0,0,1);
- //glClearDepth(1.0);
- glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
-
-/*
- glGenTextures(1, &white_tex);
- unsigned char whitetexdata[8*8*3];
- for(int i=0;i<8*8*3;i++) {
- whitetexdata[i]=255;
- }
- glActiveTexture(GL_TEXTURE0);
- glBindTexture(GL_TEXTURE_2D,white_tex);
- glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, 8, 8, 0, GL_RGB, GL_UNSIGNED_BYTE,whitetexdata);
- glGenerateMipmap(GL_TEXTURE_2D);
- glBindTexture(GL_TEXTURE_2D,0);
-
-*/
- glEnable(GL_TEXTURE_2D);
- glActiveTexture(GL_TEXTURE0);
-
- List<RID> textures;
- texture_owner.get_owned_list(&textures);
- keep_copies=false;
- for(List<RID>::Element *E=textures.front();E;E=E->next()) {
-
- RID tid = E->get();
- Texture *t=texture_owner.get(tid);
- ERR_CONTINUE(!t);
- t->tex_id=0;
- t->data_size=0;
- glGenTextures(1, &t->tex_id);
- t->active=false;
- texture_allocate(tid,t->width,t->height,t->format,t->flags);
- bool had_image=false;
- for(int i=0;i<6;i++) {
- if (!t->image[i].empty()) {
- texture_set_data(tid,t->image[i],VS::CubeMapSide(i));
- had_image=true;
- }
- }
-
- if (!had_image && t->reloader) {
- Object *rl = ObjectDB::get_instance(t->reloader);
- if (rl)
- rl->call(t->reloader_func,tid);
- }
- }
-
- keep_copies=true;
-
-
-}
-
-bool RasterizerGLES1::has_feature(VS::Features p_feature) const {
-
- switch( p_feature) {
- case VS::FEATURE_SHADERS: return false;
- case VS::FEATURE_NEEDS_RELOAD_HOOK: return use_reload_hooks;
- default: return false;
-
- }
-
-}
-
-
-RasterizerGLES1::RasterizerGLES1(bool p_keep_copies,bool p_use_reload_hooks) {
- keep_copies=p_keep_copies;
- pack_arrays=false;
- use_reload_hooks=p_use_reload_hooks;
-
- frame = 0;
-};
-
-RasterizerGLES1::~RasterizerGLES1() {
-
-};
-
-
-#endif
diff --git a/drivers/gles1/rasterizer_gles1.h b/drivers/gles1/rasterizer_gles1.h
deleted file mode 100644
index d3e38f3ded..0000000000
--- a/drivers/gles1/rasterizer_gles1.h
+++ /dev/null
@@ -1,1256 +0,0 @@
-/*************************************************************************/
-/* rasterizer_gles1.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* http://www.godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-#ifndef RASTERIZER_GLES1_H
-#define RASTERIZER_GLES1_H
-
-#include "servers/visual/rasterizer.h"
-
-#ifdef GLES1_ENABLED
-
-#include "image.h"
-#include "rid.h"
-#include "servers/visual_server.h"
-#include "list.h"
-#include "map.h"
-#include "camera_matrix.h"
-#include "sort.h"
-
-#include "platform_config.h"
-#ifndef GLES1_INCLUDE_H
-#include <GLES/gl.h>
-#else
-#include GLES1_INCLUDE_H
-#endif
-
-
-
-#include "servers/visual/particle_system_sw.h"
-
-/**
- @author Juan Linietsky <reduzio@gmail.com>
-*/
-class RasterizerGLES1 : public Rasterizer {
-
- enum {
-
- MAX_SCENE_LIGHTS=2048,
- LIGHT_SPOT_BIT=0x80,
- DEFAULT_SKINNED_BUFFER_SIZE = 1024 * 1024, // 10k vertices
- MAX_HW_LIGHTS = 1,
- };
-
-
- uint8_t *skinned_buffer;
- int skinned_buffer_size;
- bool pvr_supported;
- bool s3tc_supported;
- bool etc_supported;
- bool npo2_textures_available;
- bool pack_arrays;
- bool use_reload_hooks;
-
- Image _get_gl_image_and_format(const Image& p_image, Image::Format p_format, uint32_t p_flags,GLenum& r_gl_format,int &r_gl_components,bool &r_has_alpha_cache,bool &r_compressed);
-
-
- struct Texture {
-
- uint32_t flags;
- int width,height;
- int alloc_width, alloc_height;
- Image::Format format;
-
- GLenum target;
- GLenum gl_format_cache;
- int gl_components_cache;
- int data_size; //original data size, useful for retrieving back
- bool format_has_alpha;
- bool compressed;
- bool disallow_mipmaps;
- int total_data_size;
-
- Image image[6];
-
- bool active;
- GLuint tex_id;
-
- ObjectID reloader;
- StringName reloader_func;
-
- Texture() {
-
- flags=width=height=0;
- tex_id=0;
- data_size=0;
- format=Image::FORMAT_GRAYSCALE;
- gl_components_cache=0;
- format_has_alpha=false;
- active=false;
- disallow_mipmaps=false;
-// gen_mipmap=true;
- compressed=false;
- total_data_size=0;
- }
-
- ~Texture() {
-
- if (tex_id!=0) {
-
- glDeleteTextures(1,&tex_id);
- }
- }
- };
-
- mutable RID_Owner<Texture> texture_owner;
-
- struct Shader {
-
- String vertex_code;
- String fragment_code;
- String light_code;
- VS::ShaderMode mode;
- Map<StringName,Variant> params;
- int fragment_line;
- int vertex_line;
- int light_line;
- bool valid;
- bool has_alpha;
- bool use_world_transform;
-
- };
-
- mutable RID_Owner<Shader> shader_owner;
-
-
- struct Material {
-
- bool fixed_flags[VS::FIXED_MATERIAL_FLAG_MAX];
- bool flags[VS::MATERIAL_FLAG_MAX];
- Variant parameters[VisualServer::FIXED_MATERIAL_PARAM_MAX];
- RID textures[VisualServer::FIXED_MATERIAL_PARAM_MAX];
-
- VS::MaterialDepthDrawMode depth_draw_mode;
-
- Transform uv_transform;
- VS::FixedMaterialTexCoordMode texcoord_mode[VisualServer::FIXED_MATERIAL_PARAM_MAX];
-
- VS::MaterialBlendMode blend_mode;
-
- float line_width;
- float point_size;
- bool has_alpha;
-
- RID shader; // shader material
- uint64_t last_pass;
-
- Map<StringName,Variant> shader_params;
-
-
- Material() {
-
-
- for(int i=0;i<VS::FIXED_MATERIAL_FLAG_MAX;i++)
- flags[i]=false;
-
- for(int i=0;i<VS::MATERIAL_FLAG_MAX;i++)
- flags[i]=false;
- flags[VS::MATERIAL_FLAG_VISIBLE]=true;
-
- parameters[VS::FIXED_MATERIAL_PARAM_DIFFUSE] = Color(0.8, 0.8, 0.8);
- parameters[VS::FIXED_MATERIAL_PARAM_SPECULAR_EXP] = 12;
-
- for (int i=0; i<VisualServer::FIXED_MATERIAL_PARAM_MAX; i++) {
- texcoord_mode[i] = VS::FIXED_MATERIAL_TEXCOORD_UV;
- };
- depth_draw_mode=VS::MATERIAL_DEPTH_DRAW_OPAQUE_ONLY;
- line_width=1;
- has_alpha=false;
- blend_mode=VS::MATERIAL_BLEND_MODE_MIX;
- last_pass = 0;
- point_size = 1.0;
-
- }
- };
- mutable RID_Owner<Material> material_owner;
-
- void _material_check_alpha(Material *p_material);
-
-
- struct Geometry {
-
- enum Type {
- GEOMETRY_INVALID,
- GEOMETRY_SURFACE,
- GEOMETRY_POLY,
- GEOMETRY_PARTICLES,
- GEOMETRY_MULTISURFACE,
- };
-
- Type type;
- RID material;
- bool has_alpha;
- bool material_owned;
-
- Geometry() { has_alpha=false; material_owned = false; }
- virtual ~Geometry() {};
- };
-
- struct GeometryOwner {
-
- virtual ~GeometryOwner() {}
- };
-
- class Mesh;
-
- struct Surface : public Geometry {
-
- struct ArrayData {
-
- uint32_t ofs,size,datatype,count;
- bool normalize;
- bool bind;
-
- ArrayData() { ofs=0; size=0; count=0; datatype=0; normalize=0; bind=false;}
- };
-
- Mesh *mesh;
-
- Array data;
- Array morph_data;
- ArrayData array[VS::ARRAY_MAX];
- // support for vertex array objects
- GLuint array_object_id;
- // support for vertex buffer object
- GLuint vertex_id; // 0 means, unconfigured
- GLuint index_id; // 0 means, unconfigured
- // no support for the above, array in localmem.
- uint8_t *array_local;
- uint8_t *index_array_local;
-
- bool packed;
-
- struct MorphTarget {
- uint32_t configured_format;
- uint8_t *array;
- };
-
- MorphTarget* morph_targets_local;
- int morph_target_count;
- AABB aabb;
-
- int array_len;
- int index_array_len;
- int max_bone;
-
- float vertex_scale;
- float uv_scale;
- float uv2_scale;
-
- VS::PrimitiveType primitive;
-
- uint32_t format;
- uint32_t configured_format;
-
- int stride;
- int local_stride;
- uint32_t morph_format;
-
- bool active;
-
- Point2 uv_min;
- Point2 uv_max;
-
- Surface() {
-
-
- array_len=0;
- local_stride=0;
- morph_format=0;
- type=GEOMETRY_SURFACE;
- primitive=VS::PRIMITIVE_POINTS;
- index_array_len=0;
- vertex_scale=1.0;
- uv_scale=1.0;
- uv2_scale=1.0;
-
- format=0;
- stride=0;
- morph_targets_local=0;
- morph_target_count=0;
-
- array_local = index_array_local = 0;
- vertex_id = index_id = 0;
-
- active=false;
- packed=false;
- }
-
- ~Surface() {
-
- }
- };
-
-
- struct Mesh {
-
- bool active;
- Vector<Surface*> surfaces;
- int morph_target_count;
- VS::MorphTargetMode morph_target_mode;
- AABB custom_aabb;
-
- mutable uint64_t last_pass;
- Mesh() {
- morph_target_mode=VS::MORPH_MODE_NORMALIZED;
- morph_target_count=0;
- last_pass=0;
- active=false;
- }
- };
- mutable RID_Owner<Mesh> mesh_owner;
-
- Error _surface_set_arrays(Surface *p_surface, uint8_t *p_mem,uint8_t *p_index_mem,const Array& p_arrays,bool p_main);
-
- struct MultiMesh;
-
- struct MultiMeshSurface : public Geometry {
-
- Surface *surface;
- MultiMeshSurface() { type=GEOMETRY_MULTISURFACE; }
- };
-
- struct MultiMesh : public GeometryOwner {
-
- struct Element {
-
- float matrix[16];
- uint8_t color[4];
- };
-
- AABB aabb;
- RID mesh;
- int visible;
-
- //IDirect3DVertexBuffer9* instance_buffer;
- Vector<Element> elements;
- Vector<MultiMeshSurface> cache_surfaces;
- mutable uint64_t last_pass;
-
- MultiMesh() {
-
- last_pass=0;
- visible = -1;
- }
- };
-
- mutable RID_Owner<MultiMesh> multimesh_owner;
-
-
- struct Immediate {
-
- RID material;
- int empty;
- };
-
- mutable RID_Owner<Immediate> immediate_owner;
-
- struct Particles : public Geometry {
-
- ParticleSystemSW data; // software particle system
-
- Particles() {
- type=GEOMETRY_PARTICLES;
-
- }
- };
-
- mutable RID_Owner<Particles> particles_owner;
-
- struct ParticlesInstance : public GeometryOwner {
-
- RID particles;
-
- ParticleSystemProcessSW particles_process;
- Transform transform;
-
- ParticlesInstance() { }
- };
-
- mutable RID_Owner<ParticlesInstance> particles_instance_owner;
- ParticleSystemDrawInfoSW particle_draw_info;
-
- struct Skeleton {
-
- Vector<Transform> bones;
-
- };
-
- mutable RID_Owner<Skeleton> skeleton_owner;
-
-
- struct Light {
-
- VS::LightType type;
- float vars[VS::LIGHT_PARAM_MAX];
- Color colors[3];
- bool shadow_enabled;
- RID projector;
- bool volumetric_enabled;
- Color volumetric_color;
-
-
- Light() {
-
- vars[VS::LIGHT_PARAM_SPOT_ATTENUATION]=1;
- vars[VS::LIGHT_PARAM_SPOT_ANGLE]=45;
- vars[VS::LIGHT_PARAM_ATTENUATION]=1.0;
- vars[VS::LIGHT_PARAM_ENERGY]=1.0;
- vars[VS::LIGHT_PARAM_RADIUS]=1.0;
- vars[VS::LIGHT_PARAM_SHADOW_Z_OFFSET]=0.05;
-
- colors[VS::LIGHT_COLOR_DIFFUSE]=Color(1,1,1);
- colors[VS::LIGHT_COLOR_SPECULAR]=Color(1,1,1);
- shadow_enabled=false;
- volumetric_enabled=false;
- }
- };
-
-
- struct Environment {
-
-
- VS::EnvironmentBG bg_mode;
- Variant bg_param[VS::ENV_BG_PARAM_MAX];
- bool fx_enabled[VS::ENV_FX_MAX];
- Variant fx_param[VS::ENV_FX_PARAM_MAX];
-
- Environment() {
-
- bg_mode=VS::ENV_BG_DEFAULT_COLOR;
- bg_param[VS::ENV_BG_PARAM_COLOR]=Color(0,0,0);
- bg_param[VS::ENV_BG_PARAM_TEXTURE]=RID();
- bg_param[VS::ENV_BG_PARAM_CUBEMAP]=RID();
- bg_param[VS::ENV_BG_PARAM_ENERGY]=1.0;
-
- for(int i=0;i<VS::ENV_FX_MAX;i++)
- fx_enabled[i]=false;
-
- fx_param[VS::ENV_FX_PARAM_GLOW_BLUR_PASSES]=1;
- fx_param[VS::ENV_FX_PARAM_GLOW_BLOOM]=0.0;
- fx_param[VS::ENV_FX_PARAM_GLOW_BLOOM_TRESHOLD]=0.5;
- fx_param[VS::ENV_FX_PARAM_DOF_BLUR_PASSES]=1;
- fx_param[VS::ENV_FX_PARAM_DOF_BLUR_BEGIN]=100.0;
- fx_param[VS::ENV_FX_PARAM_DOF_BLUR_RANGE]=10.0;
- fx_param[VS::ENV_FX_PARAM_HDR_EXPOSURE]=0.4;
- fx_param[VS::ENV_FX_PARAM_HDR_WHITE]=1.0;
- fx_param[VS::ENV_FX_PARAM_HDR_GLOW_TRESHOLD]=0.95;
- fx_param[VS::ENV_FX_PARAM_HDR_GLOW_SCALE]=0.2;
- fx_param[VS::ENV_FX_PARAM_HDR_MIN_LUMINANCE]=0.4;
- fx_param[VS::ENV_FX_PARAM_HDR_MAX_LUMINANCE]=8.0;
- fx_param[VS::ENV_FX_PARAM_HDR_EXPOSURE_ADJUST_SPEED]=0.5;
- fx_param[VS::ENV_FX_PARAM_FOG_BEGIN]=100.0;
- fx_param[VS::ENV_FX_PARAM_FOG_ATTENUATION]=1.0;
- fx_param[VS::ENV_FX_PARAM_FOG_BEGIN_COLOR]=Color(0,0,0);
- fx_param[VS::ENV_FX_PARAM_FOG_END_COLOR]=Color(0,0,0);
- fx_param[VS::ENV_FX_PARAM_FOG_BG]=true;
- fx_param[VS::ENV_FX_PARAM_BCS_BRIGHTNESS]=1.0;
- fx_param[VS::ENV_FX_PARAM_BCS_CONTRAST]=1.0;
- fx_param[VS::ENV_FX_PARAM_BCS_SATURATION]=1.0;
-
- }
-
- };
-
- mutable RID_Owner<Environment> environment_owner;
-
- struct SampledLight {
-
- int w,h;
- };
-
- mutable RID_Owner<SampledLight> sampled_light_owner;
-
- struct ShadowBuffer;
-
- struct LightInstance {
-
- struct SplitInfo {
-
- CameraMatrix camera;
- Transform transform;
- float near;
- float far;
- };
-
- RID light;
- Light *base;
- Transform transform;
- CameraMatrix projection;
-
- Transform custom_transform;
- CameraMatrix custom_projection;
-
- Vector3 light_vector;
- Vector3 spot_vector;
- float linear_att;
-
- uint64_t shadow_pass;
- uint64_t last_pass;
- uint16_t sort_key;
-
- Vector<ShadowBuffer*> shadow_buffers;
-
- void clear_shadow_buffers() {
-
- for (int i=0;i<shadow_buffers.size();i++) {
-
- ShadowBuffer *sb=shadow_buffers[i];
- ERR_CONTINUE( sb->owner != this );
-
- sb->owner=NULL;
- }
-
- shadow_buffers.clear();
- }
-
- LightInstance() { shadow_pass=0; last_pass=0; sort_key=0; }
-
- };
- mutable RID_Owner<Light> light_owner;
- mutable RID_Owner<LightInstance> light_instance_owner;
-
- LightInstance *light_instances[MAX_SCENE_LIGHTS];
- LightInstance *directional_lights[4];
-// LightInstance *directional_light_instances[MAX_SCENE_LIGHTS];
- int light_instance_count;
- int directional_light_count;
- int last_light_id;
-
-
- struct RenderList {
-
- enum {
- MAX_ELEMENTS=4096,
- MAX_LIGHTS=4
- };
-
- struct Element {
-
-
- float depth;
- const InstanceData *instance;
- const Skeleton *skeleton;
- union {
- uint16_t lights[MAX_HW_LIGHTS];
- uint64_t light_key;
- };
-
- const Geometry *geometry;
- const Material *material;
- const GeometryOwner *owner;
- uint16_t light_count;
- bool mirror;
-
-
- };
-
-
- Element _elements[MAX_ELEMENTS];
- Element *elements[MAX_ELEMENTS];
- int element_count;
-
- void clear() {
-
- element_count=0;
- }
-
- struct SortZ {
-
- _FORCE_INLINE_ bool operator()(const Element* A, const Element* B ) const {
-
- return A->depth > B->depth;
- }
- };
-
- void sort_z() {
-
- SortArray<Element*,SortZ> sorter;
- sorter.sort(elements,element_count);
- }
-
-
- struct SortMat {
-
- _FORCE_INLINE_ bool operator()(const Element* A, const Element* B ) const {
- // TODO move to a single uint64 (one comparison)
- if (A->material == B->material) {
-
- return A->light_key < B->light_key;
- } else {
-
- return (A->material < B->material);
- }
- }
- };
-
- void sort_mat() {
-
- SortArray<Element*,SortMat> sorter;
- sorter.sort(elements,element_count);
- }
-
- struct SortMatLight {
-
- _FORCE_INLINE_ bool operator()(const Element* A, const Element* B ) const {
-
- if (A->material->flags[VS::MATERIAL_FLAG_UNSHADED] == B->material->flags[VS::MATERIAL_FLAG_UNSHADED]) {
-
- if (A->material == B->material) {
-
- if (A->geometry == B->geometry) {
-
- return A->light_key<B->light_key;
- } else
- return (A->geometry < B->geometry);
- } else {
-
- return (A->material < B->material);
- }
- } else {
-
- return (int(A->material->flags[VS::MATERIAL_FLAG_UNSHADED]) < int(B->material->flags[VS::MATERIAL_FLAG_UNSHADED]));
- }
- }
- };
-
- void sort_mat_light() {
-
- SortArray<Element*,SortMatLight> sorter;
- sorter.sort(elements,element_count);
- }
-
- _FORCE_INLINE_ Element* add_element() {
-
- if (element_count>MAX_ELEMENTS)
- return NULL;
- elements[element_count]=&_elements[element_count];
- return elements[element_count++];
- }
-
- RenderList() {
-
- element_count = 0;
- for (int i=0;i<MAX_ELEMENTS;i++)
- elements[i]=&_elements[i]; // assign elements
- }
- };
-
- RenderList opaque_render_list;
- RenderList alpha_render_list;
-
- RID default_material;
-
- struct FX {
-
- bool bgcolor_active;
- Color bgcolor;
-
- bool skybox_active;
- RID skybox_cubemap;
-
- bool antialias_active;
- float antialias_tolerance;
-
- bool glow_active;
- int glow_passes;
- float glow_attenuation;
- float glow_bloom;
-
- bool ssao_active;
- float ssao_attenuation;
- float ssao_radius;
- float ssao_max_distance;
- float ssao_range_max;
- float ssao_range_min;
- bool ssao_only;
-
- bool fog_active;
- float fog_near;
- float fog_far;
- float fog_attenuation;
- Color fog_color_near;
- Color fog_color_far;
- bool fog_bg;
-
- bool toon_active;
- float toon_treshold;
- float toon_soft;
-
- bool edge_active;
- Color edge_color;
- float edge_size;
-
- FX();
-
- };
- mutable RID_Owner<FX> fx_owner;
-
-
- FX *scene_fx;
- CameraMatrix camera_projection;
- Transform camera_transform;
- Transform camera_transform_inverse;
- float camera_z_near;
- float camera_z_far;
- Size2 camera_vp_size;
- Color last_color;
-
- Plane camera_plane;
-
- bool keep_copies;
-
- bool depth_write;
- bool depth_test;
- int blend_mode;
- bool lighting;
-
- _FORCE_INLINE_ void _add_geometry( const Geometry* p_geometry, const InstanceData *p_instance, const Geometry *p_geometry_cmp, const GeometryOwner *p_owner);
-
- void _render_list_forward(RenderList *p_render_list,bool p_reverse_cull=false);
-
- void _setup_light(LightInstance* p_instance, int p_idx);
- void _setup_lights(const uint16_t * p_lights,int p_light_count);
-
- _FORCE_INLINE_ void _setup_shader_params(const Material *p_material);
- void _setup_fixed_material(const Geometry *p_geometry,const Material *p_material);
- void _setup_material(const Geometry *p_geometry,const Material *p_material);
-
- Error _setup_geometry(const Geometry *p_geometry, const Material* p_material,const Skeleton *p_skeleton, const float *p_morphs);
- void _render(const Geometry *p_geometry,const Material *p_material, const Skeleton* p_skeleton, const GeometryOwner *p_owner);
-
-
- /***********/
- /* SHADOWS */
- /***********/
-
- struct ShadowBuffer {
-
- int size;
- GLuint fbo;
- GLuint depth;
- LightInstance *owner;
- void init(int p_size);
- ShadowBuffer() { size=0; depth=0; owner=NULL; }
- };
-
- Vector<ShadowBuffer> near_shadow_buffers;
- Vector<ShadowBuffer> far_shadow_buffers;
-
- LightInstance *shadow;
- int shadow_pass;
- void _init_shadow_buffers();
-
- float shadow_near_far_split_size_ratio;
- bool _allocate_shadow_buffers(LightInstance *p_instance, Vector<ShadowBuffer>& p_buffers);
- void _debug_draw_shadow(ShadowBuffer *p_buffer, const Rect2& p_rect);
- void _debug_draw_shadows_type(Vector<ShadowBuffer>& p_shadows,Point2& ofs);
- void _debug_shadows();
- void reset_state();
-
- /***********/
- /* FBOs */
- /***********/
-
-
- struct FrameBuffer {
-
- GLuint fbo;
- GLuint color;
- GLuint depth;
- int width,height;
- bool buff16;
- bool active;
-
- struct Blur {
-
- GLuint fbo;
- GLuint color;
- } blur[2];
-
- } framebuffer;
-
- void _update_framebuffer();
- void _process_glow_and_bloom();
-
- /*********/
- /* FRAME */
- /*********/
-
- struct _Rinfo {
-
- int texture_mem;
- int vertex_count;
- int object_count;
- int mat_change_count;
- int shader_change_count;
-
- } _rinfo;
-
- GLuint white_tex;
- RID canvas_tex;
- float canvas_opacity;
- VS::MaterialBlendMode canvas_blend;
- _FORCE_INLINE_ Texture* _bind_canvas_texture(const RID& p_texture);
-
-
- int _setup_geometry_vinfo;
-
- bool cull_front;
- _FORCE_INLINE_ void _set_cull(bool p_front,bool p_reverse_cull=false);
-
- Size2 window_size;
- VS::ViewportRect viewport;
- double last_time;
- double time_delta;
- uint64_t frame;
- uint64_t scene_pass;
-
- //void _draw_primitive(int p_points, const Vector3 *p_vertices, const Vector3 *p_normals, const Color* p_colors, const Vector3 *p_uvs,const Plane *p_tangents=NULL,int p_instanced=1);
- //void _draw_textured_quad(const Rect2& p_rect, const Rect2& p_src_region, const Size2& p_tex_size,bool p_h_flip=false, bool p_v_flip=false );
- //void _draw_quad(const Rect2& p_rect);
-
-public:
-
- /* TEXTURE API */
-
- virtual RID texture_create();
- virtual void texture_allocate(RID p_texture,int p_width, int p_height,Image::Format p_format,uint32_t p_flags=VS::TEXTURE_FLAGS_DEFAULT);
- virtual void texture_set_data(RID p_texture,const Image& p_image,VS::CubeMapSide p_cube_side=VS::CUBEMAP_LEFT);
- virtual Image texture_get_data(RID p_texture,VS::CubeMapSide p_cube_side=VS::CUBEMAP_LEFT) const;
- virtual void texture_set_flags(RID p_texture,uint32_t p_flags);
- virtual uint32_t texture_get_flags(RID p_texture) const;
- virtual Image::Format texture_get_format(RID p_texture) const;
- virtual uint32_t texture_get_width(RID p_texture) const;
- virtual uint32_t texture_get_height(RID p_texture) const;
- virtual bool texture_has_alpha(RID p_texture) const;
- virtual void texture_set_size_override(RID p_texture,int p_width, int p_height);
- virtual void texture_set_reload_hook(RID p_texture,ObjectID p_owner,const StringName& p_function) const;
-
- /* SHADER API */
-
- virtual RID shader_create(VS::ShaderMode p_mode=VS::SHADER_MATERIAL);
-
- virtual void shader_set_mode(RID p_shader,VS::ShaderMode p_mode);
- virtual VS::ShaderMode shader_get_mode(RID p_shader) const;
-
- virtual void shader_set_code(RID p_shader, const String& p_vertex, const String& p_fragment,const String& p_light,int p_vertex_ofs=0,int p_fragment_ofs=0,int p_light_ofs=0);
- virtual String shader_get_fragment_code(RID p_shader) const;
- virtual String shader_get_vertex_code(RID p_shader) const;
- virtual String shader_get_light_code(RID p_shader) const;
-
- virtual void shader_get_param_list(RID p_shader, List<PropertyInfo> *p_param_list) const;
-
- virtual void shader_set_default_texture_param(RID p_shader, const StringName& p_name, RID p_texture);
- virtual RID shader_get_default_texture_param(RID p_shader, const StringName& p_name) const;
-
- /* COMMON MATERIAL API */
-
- virtual RID material_create();
-
- virtual void material_set_shader(RID p_shader_material, RID p_shader);
- virtual RID material_get_shader(RID p_shader_material) const;
-
- virtual void material_set_param(RID p_material, const StringName& p_param, const Variant& p_value);
- virtual Variant material_get_param(RID p_material, const StringName& p_param) const;
-
- virtual void material_set_flag(RID p_material, VS::MaterialFlag p_flag,bool p_enabled);
- virtual bool material_get_flag(RID p_material,VS::MaterialFlag p_flag) const;
-
- virtual void material_set_depth_draw_mode(RID p_material, VS::MaterialDepthDrawMode p_mode);
- virtual VS::MaterialDepthDrawMode material_get_depth_draw_mode(RID p_material) const;
-
- virtual void material_set_blend_mode(RID p_material,VS::MaterialBlendMode p_mode);
- virtual VS::MaterialBlendMode material_get_blend_mode(RID p_material) const;
-
- virtual void material_set_line_width(RID p_material,float p_line_width);
- virtual float material_get_line_width(RID p_material) const;
-
- /* FIXED MATERIAL */
-
- virtual RID fixed_material_create();
-
- virtual void fixed_material_set_flag(RID p_material, VS::FixedMaterialFlags p_flag, bool p_enabled);
- virtual bool fixed_material_get_flag(RID p_material, VS::FixedMaterialFlags p_flag) const;
-
- virtual void fixed_material_set_parameter(RID p_material, VS::FixedMaterialParam p_parameter, const Variant& p_value);
- virtual Variant fixed_material_get_parameter(RID p_material,VS::FixedMaterialParam p_parameter) const;
-
- virtual void fixed_material_set_texture(RID p_material,VS::FixedMaterialParam p_parameter, RID p_texture);
- virtual RID fixed_material_get_texture(RID p_material,VS::FixedMaterialParam p_parameter) const;
-
- virtual void fixed_material_set_texcoord_mode(RID p_material,VS::FixedMaterialParam p_parameter, VS::FixedMaterialTexCoordMode p_mode);
- virtual VS::FixedMaterialTexCoordMode fixed_material_get_texcoord_mode(RID p_material,VS::FixedMaterialParam p_parameter) const;
-
- virtual void fixed_material_set_uv_transform(RID p_material,const Transform& p_transform);
- virtual Transform fixed_material_get_uv_transform(RID p_material) const;
-
- virtual void fixed_material_set_point_size(RID p_material,float p_size);
- virtual float fixed_material_get_point_size(RID p_material) const;
-
- /* MESH API */
-
-
- virtual RID mesh_create();
-
- virtual void mesh_add_surface(RID p_mesh,VS::PrimitiveType p_primitive,const Array& p_arrays,const Array& p_blend_shapes=Array(),bool p_alpha_sort=false);
- virtual Array mesh_get_surface_arrays(RID p_mesh,int p_surface) const;
- virtual Array mesh_get_surface_morph_arrays(RID p_mesh,int p_surface) const;
- virtual void mesh_add_custom_surface(RID p_mesh,const Variant& p_dat);
-
- virtual void mesh_set_morph_target_count(RID p_mesh,int p_amount);
- virtual int mesh_get_morph_target_count(RID p_mesh) const;
-
- virtual void mesh_set_morph_target_mode(RID p_mesh,VS::MorphTargetMode p_mode);
- virtual VS::MorphTargetMode mesh_get_morph_target_mode(RID p_mesh) const;
-
- virtual void mesh_surface_set_material(RID p_mesh, int p_surface, RID p_material,bool p_owned=false);
- virtual RID mesh_surface_get_material(RID p_mesh, int p_surface) const;
-
- virtual int mesh_surface_get_array_len(RID p_mesh, int p_surface) const;
- virtual int mesh_surface_get_array_index_len(RID p_mesh, int p_surface) const;
- virtual uint32_t mesh_surface_get_format(RID p_mesh, int p_surface) const;
- virtual VS::PrimitiveType mesh_surface_get_primitive_type(RID p_mesh, int p_surface) const;
-
- virtual void mesh_remove_surface(RID p_mesh,int p_index);
- virtual int mesh_get_surface_count(RID p_mesh) const;
-
- virtual AABB mesh_get_aabb(RID p_mesh,RID p_skeleton=RID()) const;
-
- virtual void mesh_set_custom_aabb(RID p_mesh,const AABB& p_aabb);
- virtual AABB mesh_get_custom_aabb(RID p_mesh) const;
-
- /* MULTIMESH API */
-
- virtual RID multimesh_create();
-
- virtual void multimesh_set_instance_count(RID p_multimesh,int p_count);
- virtual int multimesh_get_instance_count(RID p_multimesh) const;
-
- virtual void multimesh_set_mesh(RID p_multimesh,RID p_mesh);
- virtual void multimesh_set_aabb(RID p_multimesh,const AABB& p_aabb);
- virtual void multimesh_instance_set_transform(RID p_multimesh,int p_index,const Transform& p_transform);
- virtual void multimesh_instance_set_color(RID p_multimesh,int p_index,const Color& p_color);
-
- virtual RID multimesh_get_mesh(RID p_multimesh) const;
- virtual AABB multimesh_get_aabb(RID p_multimesh) const;;
-
- virtual Transform multimesh_instance_get_transform(RID p_multimesh,int p_index) const;
- virtual Color multimesh_instance_get_color(RID p_multimesh,int p_index) const;
-
- virtual void multimesh_set_visible_instances(RID p_multimesh,int p_visible);
- virtual int multimesh_get_visible_instances(RID p_multimesh) const;
-
- /* IMMEDIATE API */
-
- virtual RID immediate_create();
- virtual void immediate_begin(RID p_immediate,VS::PrimitiveType p_rimitive,RID p_texture=RID());
- virtual void immediate_vertex(RID p_immediate,const Vector3& p_vertex);
- virtual void immediate_normal(RID p_immediate,const Vector3& p_normal);
- virtual void immediate_tangent(RID p_immediate,const Plane& p_tangent);
- virtual void immediate_color(RID p_immediate,const Color& p_color);
- virtual void immediate_uv(RID p_immediate,const Vector2& tex_uv);
- virtual void immediate_uv2(RID p_immediate,const Vector2& tex_uv);
- virtual void immediate_end(RID p_immediate);
- virtual void immediate_clear(RID p_immediate);
- virtual AABB immediate_get_aabb(RID p_immediate) const;
- virtual void immediate_set_material(RID p_immediate,RID p_material);
- virtual RID immediate_get_material(RID p_immediate) const;
-
-
- /* PARTICLES API */
-
- virtual RID particles_create();
-
- virtual void particles_set_amount(RID p_particles, int p_amount);
- virtual int particles_get_amount(RID p_particles) const;
-
- virtual void particles_set_emitting(RID p_particles, bool p_emitting);
- virtual bool particles_is_emitting(RID p_particles) const;
-
- virtual void particles_set_visibility_aabb(RID p_particles, const AABB& p_visibility);
- virtual AABB particles_get_visibility_aabb(RID p_particles) const;
-
- virtual void particles_set_emission_half_extents(RID p_particles, const Vector3& p_half_extents);
- virtual Vector3 particles_get_emission_half_extents(RID p_particles) const;
-
- virtual void particles_set_emission_base_velocity(RID p_particles, const Vector3& p_base_velocity);
- virtual Vector3 particles_get_emission_base_velocity(RID p_particles) const;
-
- virtual void particles_set_emission_points(RID p_particles, const DVector<Vector3>& p_points);
- virtual DVector<Vector3> particles_get_emission_points(RID p_particles) const;
-
- virtual void particles_set_gravity_normal(RID p_particles, const Vector3& p_normal);
- virtual Vector3 particles_get_gravity_normal(RID p_particles) const;
-
- virtual void particles_set_variable(RID p_particles, VS::ParticleVariable p_variable,float p_value);
- virtual float particles_get_variable(RID p_particles, VS::ParticleVariable p_variable) const;
-
- virtual void particles_set_randomness(RID p_particles, VS::ParticleVariable p_variable,float p_randomness);
- virtual float particles_get_randomness(RID p_particles, VS::ParticleVariable p_variable) const;
-
- virtual void particles_set_color_phase_pos(RID p_particles, int p_phase, float p_pos);
- virtual float particles_get_color_phase_pos(RID p_particles, int p_phase) const;
-
- virtual void particles_set_color_phases(RID p_particles, int p_phases);
- virtual int particles_get_color_phases(RID p_particles) const;
-
- virtual void particles_set_color_phase_color(RID p_particles, int p_phase, const Color& p_color);
- virtual Color particles_get_color_phase_color(RID p_particles, int p_phase) const;
-
- virtual void particles_set_attractors(RID p_particles, int p_attractors);
- virtual int particles_get_attractors(RID p_particles) const;
-
- virtual void particles_set_attractor_pos(RID p_particles, int p_attractor, const Vector3& p_pos);
- virtual Vector3 particles_get_attractor_pos(RID p_particles,int p_attractor) const;
-
- virtual void particles_set_attractor_strength(RID p_particles, int p_attractor, float p_force);
- virtual float particles_get_attractor_strength(RID p_particles,int p_attractor) const;
-
- virtual void particles_set_material(RID p_particles, RID p_material,bool p_owned=false);
- virtual RID particles_get_material(RID p_particles) const;
-
- virtual AABB particles_get_aabb(RID p_particles) const;
-
- virtual void particles_set_height_from_velocity(RID p_particles, bool p_enable);
- virtual bool particles_has_height_from_velocity(RID p_particles) const;
-
- virtual void particles_set_use_local_coordinates(RID p_particles, bool p_enable);
- virtual bool particles_is_using_local_coordinates(RID p_particles) const;
-
- /* SKELETON API */
-
- virtual RID skeleton_create();
- virtual void skeleton_resize(RID p_skeleton,int p_bones);
- virtual int skeleton_get_bone_count(RID p_skeleton) const;
- virtual void skeleton_bone_set_transform(RID p_skeleton,int p_bone, const Transform& p_transform);
- virtual Transform skeleton_bone_get_transform(RID p_skeleton,int p_bone);
-
-
- /* LIGHT API */
-
- virtual RID light_create(VS::LightType p_type);
- virtual VS::LightType light_get_type(RID p_light) const;
-
- virtual void light_set_color(RID p_light,VS::LightColor p_type, const Color& p_color);
- virtual Color light_get_color(RID p_light,VS::LightColor p_type) const;
-
- virtual void light_set_shadow(RID p_light,bool p_enabled);
- virtual bool light_has_shadow(RID p_light) const;
-
- virtual void light_set_volumetric(RID p_light,bool p_enabled);
- virtual bool light_is_volumetric(RID p_light) const;
-
- virtual void light_set_projector(RID p_light,RID p_texture);
- virtual RID light_get_projector(RID p_light) const;
-
- virtual void light_set_var(RID p_light, VS::LightParam p_var, float p_value);
- virtual float light_get_var(RID p_light, VS::LightParam p_var) const;
-
- virtual void light_set_operator(RID p_light,VS::LightOp p_op);
- virtual VS::LightOp light_get_operator(RID p_light) const;
-
- virtual void light_omni_set_shadow_mode(RID p_light,VS::LightOmniShadowMode p_mode);
- virtual VS::LightOmniShadowMode light_omni_get_shadow_mode(RID p_light) const;
-
-
- virtual void light_directional_set_shadow_mode(RID p_light,VS::LightDirectionalShadowMode p_mode);
- virtual VS::LightDirectionalShadowMode light_directional_get_shadow_mode(RID p_light) const;
- virtual void light_directional_set_shadow_param(RID p_light,VS::LightDirectionalShadowParam p_param, float p_value);
- virtual float light_directional_get_shadow_param(RID p_light,VS::LightDirectionalShadowParam p_param) const;
-
- virtual AABB light_get_aabb(RID p_poly) const;
-
-
- virtual RID light_instance_create(RID p_light);
- virtual void light_instance_set_transform(RID p_light_instance,const Transform& p_transform);
-
- virtual bool light_instance_has_shadow(RID p_light_instance) const;
- virtual bool light_instance_assign_shadow(RID p_light_instance);
- virtual ShadowType light_instance_get_shadow_type(RID p_light_instance) const;
- virtual int light_instance_get_shadow_passes(RID p_light_instance) const;
- virtual bool light_instance_get_pssm_shadow_overlap(RID p_light_instance) const;
- virtual void light_instance_set_custom_transform(RID p_light_instance, int p_index, const CameraMatrix& p_camera, const Transform& p_transform, float p_split_near=0,float p_split_far=0);
- virtual int light_instance_get_shadow_size(RID p_light_instance, int p_index=0) const { return 1; }
-
- virtual ShadowType light_instance_get_shadow_type(RID p_light_instance,bool p_far=false) const;
- virtual void light_instance_set_shadow_transform(RID p_light_instance, int p_index, const CameraMatrix& p_camera, const Transform& p_transform, float p_split_near=0,float p_split_far=0);
-
- virtual void shadow_clear_near();
- virtual bool shadow_allocate_near(RID p_light);
- virtual bool shadow_allocate_far(RID p_light);
-
-
- /* PARTICLES INSTANCE */
-
- virtual RID particles_instance_create(RID p_particles);
- virtual void particles_instance_set_transform(RID p_particles_instance,const Transform& p_transform);
-
- /* VIEWPORT */
-
- virtual RID viewport_data_create();
-
- virtual RID render_target_create();
- virtual void render_target_set_size(RID p_render_target, int p_width, int p_height);
- virtual RID render_target_get_texture(RID p_render_target) const;
- virtual bool render_target_renedered_in_frame(RID p_render_target);
-
- /* RENDER API */
- /* all calls (inside begin/end shadow) are always warranted to be in the following order: */
-
- virtual void begin_frame();
-
- virtual void set_viewport(const VS::ViewportRect& p_viewport);
- virtual void set_render_target(RID p_render_target,bool p_transparent_bg=false,bool p_vflip=false);
- virtual void clear_viewport(const Color& p_color);
- virtual void capture_viewport(Image* r_capture);
-
-
- virtual void begin_scene(RID p_viewport_data,RID p_env,VS::ScenarioDebugMode p_debug);
- virtual void begin_shadow_map( RID p_light_instance, int p_shadow_pass );
-
- virtual void set_camera(const Transform& p_world,const CameraMatrix& p_projection);
-
- virtual void add_light( RID p_light_instance ); ///< all "add_light" calls happen before add_geometry calls
-
-
- virtual void add_mesh( const RID& p_mesh, const InstanceData *p_data);
- virtual void add_multimesh( const RID& p_multimesh, const InstanceData *p_data);
- virtual void add_immediate( const RID& p_immediate, const InstanceData *p_data) {}
- virtual void add_particles( const RID& p_particle_instance, const InstanceData *p_data);
-
- virtual void end_scene();
- virtual void end_shadow_map();
-
- virtual void end_frame();
-
- /* CANVAS API */
-
- virtual void canvas_begin();
- virtual void canvas_disable_blending();
- virtual void canvas_set_opacity(float p_opacity);
- virtual void canvas_set_blend_mode(VS::MaterialBlendMode p_mode);
- virtual void canvas_begin_rect(const Matrix32& p_transform);
- virtual void canvas_set_clip(bool p_clip, const Rect2& p_rect);
- virtual void canvas_end_rect();
- virtual void canvas_draw_line(const Point2& p_from, const Point2& p_to,const Color& p_color,float p_width);
- virtual void canvas_draw_rect(const Rect2& p_rect, int p_flags, const Rect2& p_source,RID p_texture,const Color& p_modulate);
- virtual void canvas_draw_style_box(const Rect2& p_rect, RID p_texture,const float *p_margins, bool p_draw_center=true,const Color& p_modulate=Color(1,1,1));
- virtual void canvas_draw_primitive(const Vector<Point2>& p_points, const Vector<Color>& p_colors,const Vector<Point2>& p_uvs, RID p_texture,float p_width);
- virtual void canvas_draw_polygon(int p_vertex_count, const int* p_indices, const Vector2* p_vertices, const Vector2* p_uvs, const Color* p_colors,const RID& p_texture,bool p_singlecolor);
- virtual void canvas_set_transform(const Matrix32& p_transform);
-
- /* FX */
-
- virtual RID fx_create();
- virtual void fx_get_effects(RID p_fx,List<String> *p_effects) const;
- virtual void fx_set_active(RID p_fx,const String& p_effect, bool p_active);
- virtual bool fx_is_active(RID p_fx,const String& p_effect) const;
- virtual void fx_get_effect_params(RID p_fx,const String& p_effect,List<PropertyInfo> *p_params) const;
- virtual Variant fx_get_effect_param(RID p_fx,const String& p_effect,const String& p_param) const;
- virtual void fx_set_effect_param(RID p_fx,const String& p_effect, const String& p_param, const Variant& p_pvalue);
-
- /* ENVIRONMENT */
-
- virtual RID environment_create();
-
- virtual void environment_set_background(RID p_env,VS::EnvironmentBG p_bg);
- virtual VS::EnvironmentBG environment_get_background(RID p_env) const;
-
- virtual void environment_set_background_param(RID p_env,VS::EnvironmentBGParam p_param, const Variant& p_value);
- virtual Variant environment_get_background_param(RID p_env,VS::EnvironmentBGParam p_param) const;
-
- virtual void environment_set_enable_fx(RID p_env,VS::EnvironmentFx p_effect,bool p_enabled);
- virtual bool environment_is_fx_enabled(RID p_env,VS::EnvironmentFx p_effect) const;
-
- virtual void environment_fx_set_param(RID p_env,VS::EnvironmentFxParam p_param,const Variant& p_value);
- virtual Variant environment_fx_get_param(RID p_env,VS::EnvironmentFxParam p_param) const;
-
- /* SAMPLED LIGHT */
- virtual RID sampled_light_dp_create(int p_width,int p_height);
- virtual void sampled_light_dp_update(RID p_sampled_light,const Color *p_data,float p_multiplier);
-
-
- /*MISC*/
-
- virtual bool is_texture(const RID& p_rid) const;
- virtual bool is_material(const RID& p_rid) const;
- virtual bool is_mesh(const RID& p_rid) const;
- virtual bool is_multimesh(const RID& p_rid) const;
- virtual bool is_immediate(const RID& p_rid) const;
- virtual bool is_particles(const RID &p_beam) const;
-
- virtual bool is_light(const RID& p_rid) const;
- virtual bool is_light_instance(const RID& p_rid) const;
- virtual bool is_particles_instance(const RID& p_rid) const;
- virtual bool is_skeleton(const RID& p_rid) const;
- virtual bool is_environment(const RID& p_rid) const;
- virtual bool is_fx(const RID& p_rid) const;
- virtual bool is_shader(const RID& p_rid) const;
-
- virtual void free(const RID& p_rid);
-
- virtual void custom_shade_model_set_shader(int p_model, RID p_shader);
- virtual RID custom_shade_model_get_shader(int p_model) const;
- virtual void custom_shade_model_set_name(int p_model, const String& p_name);
- virtual String custom_shade_model_get_name(int p_model) const;
- virtual void custom_shade_model_set_param_info(int p_model, const List<PropertyInfo>& p_info);
- virtual void custom_shade_model_get_param_info(int p_model, List<PropertyInfo>* p_info) const;
-
-
- virtual void init();
- virtual void finish();
-
- virtual int get_render_info(VS::RenderInfo p_info);
-
- void reload_vram();
-
- virtual bool needs_to_draw_next_frame() const;
-
- virtual bool has_feature(VS::Features p_feature) const;
-
-
-#ifdef TOOLS_ENABLED
- RasterizerGLES1(bool p_keep_copies=true,bool p_use_reload_hooks=false);
-#else
- RasterizerGLES1(bool p_keep_copies=false,bool p_use_reload_hooks=false);
-#endif
- virtual ~RasterizerGLES1();
-};
-
-#endif
-#endif
diff --git a/drivers/gles2/rasterizer_gles2.cpp b/drivers/gles2/rasterizer_gles2.cpp
index fdf73a6c21..5903be9d81 100644
--- a/drivers/gles2/rasterizer_gles2.cpp
+++ b/drivers/gles2/rasterizer_gles2.cpp
@@ -1411,6 +1411,9 @@ void RasterizerGLES2::shader_set_mode(RID p_shader,VS::ShaderMode p_mode) {
case VS::SHADER_MATERIAL: {
material_shader.free_custom_shader(shader->custom_code_id);
} break;
+ case VS::SHADER_CANVAS_ITEM: {
+ canvas_shader.free_custom_shader(shader->custom_code_id);
+ } break;
}
shader->custom_code_id=0;
@@ -1422,6 +1425,9 @@ void RasterizerGLES2::shader_set_mode(RID p_shader,VS::ShaderMode p_mode) {
case VS::SHADER_MATERIAL: {
shader->custom_code_id=material_shader.create_custom_shader();
} break;
+ case VS::SHADER_CANVAS_ITEM: {
+ shader->custom_code_id=canvas_shader.create_custom_shader();
+ } break;
}
_shader_make_dirty(shader);
@@ -1545,17 +1551,20 @@ void RasterizerGLES2::shader_set_default_texture_param(RID p_shader, const Strin
Shader *shader=shader_owner.get(p_shader);
ERR_FAIL_COND(!shader);
- ERR_FAIL_COND(!texture_owner.owns(p_texture));
+ ERR_FAIL_COND(p_texture.is_valid() && !texture_owner.owns(p_texture));
if (p_texture.is_valid())
shader->default_textures[p_name]=p_texture;
else
shader->default_textures.erase(p_name);
+ _shader_make_dirty(shader);
+
}
RID RasterizerGLES2::shader_get_default_texture_param(RID p_shader, const StringName& p_name) const{
const Shader *shader=shader_owner.get(p_shader);
+ ERR_FAIL_COND_V(!shader,RID());
const Map<StringName,RID>::Element *E=shader->default_textures.find(p_name);
if (!E)
@@ -1563,6 +1572,22 @@ RID RasterizerGLES2::shader_get_default_texture_param(RID p_shader, const String
return E->get();
}
+Variant RasterizerGLES2::shader_get_default_param(RID p_shader, const StringName& p_name) {
+
+ Shader *shader=shader_owner.get(p_shader);
+ ERR_FAIL_COND_V(!shader,Variant());
+
+ //update shader params if necesary
+ //make sure the shader is compiled and everything
+ //so the actual parameters can be properly retrieved!
+ if (shader->dirty_list.in_list()) {
+ _update_shader(shader);
+ }
+ if (shader->valid && shader->uniforms.has(p_name))
+ return shader->uniforms[p_name].default_value;
+
+ return Variant();
+}
/* COMMON MATERIAL API */
@@ -1606,6 +1631,7 @@ void RasterizerGLES2::material_set_param(RID p_material, const StringName& p_par
material->shader_version=0; //get default!
} else {
E->get().value=p_value;
+ E->get().inuse=true;
}
} else {
@@ -1613,6 +1639,7 @@ void RasterizerGLES2::material_set_param(RID p_material, const StringName& p_par
ud.index=-1;
ud.value=p_value;
ud.istexture=p_value.get_type()==Variant::_RID; /// cache it being texture
+ ud.inuse=true;
material->shader_params[p_param]=ud; //may be got at some point, or erased
}
@@ -1644,7 +1671,7 @@ Variant RasterizerGLES2::material_get_param(RID p_material, const StringName& p_
}
- if (material->shader_params.has(p_param))
+ if (material->shader_params.has(p_param) && material->shader_params[p_param].inuse)
return material->shader_params[p_param].value;
else
return Variant();
@@ -4430,6 +4457,13 @@ void RasterizerGLES2::_update_shader( Shader* p_shader) const {
if (err) {
return; //invalid
}
+ } else if (p_shader->mode==VS::SHADER_CANVAS_ITEM) {
+
+ Error err = shader_precompiler.compile(p_shader->vertex_code,ShaderLanguage::SHADER_CANVAS_ITEM_VERTEX,vertex_code,vertex_globals,vertex_flags,&p_shader->uniforms);
+ if (err) {
+ return; //invalid
+ }
+
}
//print_line("compiled vertex: "+vertex_code);
@@ -4439,9 +4473,16 @@ void RasterizerGLES2::_update_shader( Shader* p_shader) const {
String fragment_code;
String fragment_globals;
- Error err = shader_precompiler.compile(p_shader->fragment_code,(p_shader->mode==VS::SHADER_MATERIAL?ShaderLanguage::SHADER_MATERIAL_FRAGMENT:ShaderLanguage::SHADER_POST_PROCESS),fragment_code,fragment_globals,fragment_flags,&p_shader->uniforms);
- if (err) {
- return; //invalid
+ if (p_shader->mode==VS::SHADER_MATERIAL) {
+ Error err = shader_precompiler.compile(p_shader->fragment_code,ShaderLanguage::SHADER_MATERIAL_FRAGMENT,fragment_code,fragment_globals,fragment_flags,&p_shader->uniforms);
+ if (err) {
+ return; //invalid
+ }
+ } else if (p_shader->mode==VS::SHADER_CANVAS_ITEM) {
+ Error err = shader_precompiler.compile(p_shader->fragment_code,ShaderLanguage::SHADER_CANVAS_ITEM_FRAGMENT,fragment_code,fragment_globals,fragment_flags,&p_shader->uniforms);
+ if (err) {
+ return; //invalid
+ }
}
@@ -4454,6 +4495,11 @@ void RasterizerGLES2::_update_shader( Shader* p_shader) const {
if (err) {
return; //invalid
}
+ } else if (p_shader->mode==VS::SHADER_CANVAS_ITEM) {
+ Error err = shader_precompiler.compile(p_shader->light_code,(ShaderLanguage::SHADER_CANVAS_ITEM_LIGHT),light_code,light_globals,light_flags,&p_shader->uniforms);
+ if (err) {
+ return; //invalid
+ }
}
fragment_globals+=light_globals; //both fragment anyway
@@ -4514,7 +4560,39 @@ void RasterizerGLES2::_update_shader( Shader* p_shader) const {
}
material_shader.set_custom_shader_code(p_shader->custom_code_id,vertex_code, vertex_globals,fragment_code, light_code, fragment_globals,uniform_names,enablers);
- } else {
+ } else if (p_shader->mode==VS::SHADER_CANVAS_ITEM) {
+
+ Vector<const char*> enablers;
+
+ if (light_flags.uses_time || fragment_flags.uses_time || vertex_flags.uses_time) {
+ enablers.push_back("#define USE_TIME\n");
+ uses_time=true;
+ }
+ if (fragment_flags.uses_normal) {
+ enablers.push_back("#define NORMAL_USED\n");
+ }
+ if (light_flags.uses_light) {
+ enablers.push_back("#define USE_LIGHT_SHADER_CODE\n");
+ }
+ if (fragment_flags.use_var1_interp || vertex_flags.use_var1_interp)
+ enablers.push_back("#define ENABLE_VAR1_INTERP\n");
+ if (fragment_flags.use_var2_interp || vertex_flags.use_var2_interp)
+ enablers.push_back("#define ENABLE_VAR2_INTERP\n");
+ if (fragment_flags.uses_texscreen) {
+ enablers.push_back("#define ENABLE_TEXSCREEN\n");
+ }
+ if (fragment_flags.uses_screen_uv) {
+ enablers.push_back("#define ENABLE_SCREEN_UV\n");
+ }
+ if (fragment_flags.uses_texpixel_size) {
+ enablers.push_back("#define USE_TEXPIXEL_SIZE\n");
+ }
+
+ if (vertex_flags.uses_worldvec) {
+ enablers.push_back("#define USE_WORLD_VEC\n");
+ }
+ canvas_shader.set_custom_shader_code(p_shader->custom_code_id,vertex_code, vertex_globals,fragment_code, light_code, fragment_globals,uniform_names,enablers);
+
//postprocess_shader.set_custom_shader_code(p_shader->custom_code_id,vertex_code, vertex_globals,fragment_code, fragment_globals,uniform_names);
}
@@ -4525,7 +4603,9 @@ void RasterizerGLES2::_update_shader( Shader* p_shader) const {
p_shader->has_texscreen=fragment_flags.uses_texscreen;
p_shader->has_screen_uv=fragment_flags.uses_screen_uv;
p_shader->can_zpass=!fragment_flags.uses_discard && !vertex_flags.vertex_code_writes_vertex;
+ p_shader->uses_normal=fragment_flags.uses_normal || light_flags.uses_normal;
p_shader->uses_time=uses_time;
+ p_shader->uses_texpixel_size=fragment_flags.uses_texpixel_size;
p_shader->version++;
}
@@ -4876,31 +4956,58 @@ _FORCE_INLINE_ void RasterizerGLES2::_update_material_shader_params(Material *p_
Material::UniformData ud;
- bool keep=true;
+ bool keep=true; //keep material value
- if (!old_mparams.has(E->key()))
+ Map<StringName,Material::UniformData>::Element *OLD=old_mparams.find(E->key());
+ bool has_old = OLD;
+ bool old_inuse=has_old && old_mparams[E->key()].inuse;
+
+ ud.istexture=(E->get().type==ShaderLanguage::TYPE_TEXTURE || E->get().type==ShaderLanguage::TYPE_CUBEMAP);
+
+ if (!has_old || !old_inuse) {
keep=false;
- else if (old_mparams[E->key()].value.get_type()!=E->value().default_value.get_type()) {
+ }
+ else if (OLD->get().value.get_type()!=E->value().default_value.get_type()) {
- if (old_mparams[E->key()].value.get_type()==Variant::OBJECT) {
+ if (OLD->get().value.get_type()==Variant::INT && E->get().type==ShaderLanguage::TYPE_FLOAT) {
+ //handle common mistake using shaders (feeding ints instead of float)
+ OLD->get().value=float(OLD->get().value);
+ keep=true;
+ } else if (!ud.istexture && E->value().default_value.get_type()!=Variant::NIL) {
+
+ keep=false;
+ }
+ //type changed between old and new
+ /* if (old_mparams[E->key()].value.get_type()==Variant::OBJECT) {
if (E->value().default_value.get_type()!=Variant::_RID) //hackfor textures
keep=false;
} else if (!old_mparams[E->key()].value.is_num() || !E->value().default_value.get_type())
- keep=false;
+ keep=false;*/
+
+ //value is invalid because type differs and default is not null
+ ;
}
+
if (keep) {
ud.value=old_mparams[E->key()].value;
+
//print_line("KEEP: "+String(E->key()));
} else {
- ud.value=E->value().default_value;
+ if (ud.istexture && p_material->shader_cache->default_textures.has(E->key()))
+ ud.value=p_material->shader_cache->default_textures[E->key()];
+ else
+ ud.value=E->value().default_value;
+ old_inuse=false; //if reverted to default, obviously did not work
+
//print_line("NEW: "+String(E->key())+" because: hasold-"+itos(old_mparams.has(E->key())));
//if (old_mparams.has(E->key()))
// print_line(" told "+Variant::get_type_name(old_mparams[E->key()].value.get_type())+" tnew "+Variant::get_type_name(E->value().default_value.get_type()));
}
- ud.istexture=(E->get().type==ShaderLanguage::TYPE_TEXTURE || E->get().type==ShaderLanguage::TYPE_CUBEMAP);
+
ud.index=idx++;
+ ud.inuse=old_inuse;
mparams[E->key()]=ud;
}
@@ -5004,8 +5111,10 @@ bool RasterizerGLES2::_setup_material(const Geometry *p_geometry,const Material
int texcoord=0;
for (Map<StringName,Material::UniformData>::Element *E=p_material->shader_params.front();E;E=E->next()) {
+
if (E->get().index<0)
continue;
+// print_line(String(E->key())+": "+E->get().value);
if (E->get().istexture) {
//clearly a texture..
RID rid = E->get().value;
@@ -5021,23 +5130,8 @@ bool RasterizerGLES2::_setup_material(const Geometry *p_geometry,const Material
E->get().value=RID(); //nullify, invalid texture
rid=RID();
}
- } else {
-
-
}
- if (!rid.is_valid()) {
- //use from default textures
- Map<StringName,RID>::Element *F=p_material->shader_cache->default_textures.find(E->key());
- if (F) {
- t=texture_owner.get(F->get());
- if (!t) {
- p_material->shader_cache->default_textures.erase(E->key());
- }
- }
- }
-
-
glActiveTexture(GL_TEXTURE0+texcoord);
glUniform1i(loc,texcoord); //TODO - this could happen automatically on compile...
if (t) {
@@ -5061,15 +5155,10 @@ bool RasterizerGLES2::_setup_material(const Geometry *p_geometry,const Material
}
- for (Map<StringName,RID>::Element *E=p_material->shader_cache->default_textures.front();E;E=E->next()) {
- if (p_material->shader_params.has(E->key()))
- continue;
-
-
- }
if (p_material->shader_cache->has_texscreen && framebuffer.active) {
material_shader.set_uniform(MaterialShaderGLES2::TEXSCREEN_SCREEN_MULT,Vector2(float(viewport.width)/framebuffer.width,float(viewport.height)/framebuffer.height));
+ material_shader.set_uniform(MaterialShaderGLES2::TEXSCREEN_SCREEN_CLAMP,Color(0,0,float(viewport.width)/framebuffer.width,float(viewport.height)/framebuffer.height));
material_shader.set_uniform(MaterialShaderGLES2::TEXSCREEN_TEX,texcoord);
glActiveTexture(GL_TEXTURE0+texcoord);
glBindTexture(GL_TEXTURE_2D,framebuffer.sample_color);
@@ -7724,10 +7813,11 @@ void RasterizerGLES2::canvas_begin() {
canvas_tex=RID();
//material_shader.unbind();
canvas_shader.unbind();
+ canvas_shader.set_custom_shader(0);
canvas_shader.bind();
canvas_shader.set_uniform(CanvasShaderGLES2::TEXTURE, 0);
_set_color_attrib(Color(1,1,1));
- Transform canvas_transform;
+ canvas_transform=Transform();
canvas_transform.translate(-(viewport.width / 2.0f), -(viewport.height / 2.0f), 0.0f);
float csy = 1.0;
if (current_rt && current_rt_vflip)
@@ -7741,6 +7831,9 @@ void RasterizerGLES2::canvas_begin() {
canvas_opacity=1.0;
canvas_blend_mode=VS::MATERIAL_BLEND_MODE_MIX;
+ canvas_texscreen_used=false;
+ uses_texpixel_size=false;
+ canvas_last_shader=RID();
}
@@ -7823,7 +7916,7 @@ void RasterizerGLES2::canvas_end_rect() {
RasterizerGLES2::Texture* RasterizerGLES2::_bind_canvas_texture(const RID& p_texture) {
- if (p_texture==canvas_tex) {
+ if (p_texture==canvas_tex && !rebind_texpixel_size) {
if (canvas_tex.is_valid()) {
Texture*texture=texture_owner.get(p_texture);
return texture;
@@ -7831,14 +7924,16 @@ RasterizerGLES2::Texture* RasterizerGLES2::_bind_canvas_texture(const RID& p_tex
return NULL;
}
-
+ rebind_texpixel_size=false;
if (p_texture.is_valid()) {
+
Texture*texture=texture_owner.get(p_texture);
if (!texture) {
canvas_tex=RID();
glBindTexture(GL_TEXTURE_2D,white_tex);
+
return NULL;
}
@@ -7847,6 +7942,9 @@ RasterizerGLES2::Texture* RasterizerGLES2::_bind_canvas_texture(const RID& p_tex
glBindTexture(GL_TEXTURE_2D,texture->tex_id);
canvas_tex=p_texture;
+ if (uses_texpixel_size) {
+ canvas_shader.set_uniform(CanvasShaderGLES2::TEXPIXEL_SIZE,Size2(1.0/texture->width,1.0/texture->height));
+ }
return texture;
@@ -8217,6 +8315,342 @@ void RasterizerGLES2::canvas_set_transform(const Matrix32& p_transform) {
//canvas_transform = Variant(p_transform);
}
+
+void RasterizerGLES2::canvas_render_items(CanvasItem *p_item_list) {
+
+
+ CanvasItem *current_clip=NULL;
+
+ canvas_opacity=1.0;
+ while(p_item_list) {
+
+ CanvasItem *ci=p_item_list;
+
+ if (ci->vp_render) {
+ if (draw_viewport_func) {
+ draw_viewport_func(ci->vp_render->owner,ci->vp_render->udata,ci->vp_render->rect);
+ }
+ memdelete(ci->vp_render);
+ ci->vp_render=NULL;
+ canvas_last_shader=RID();
+ }
+
+ if (current_clip!=ci->final_clip_owner) {
+
+ current_clip=ci->final_clip_owner;
+
+ //setup clip
+ if (current_clip) {
+
+ glEnable(GL_SCISSOR_TEST);
+ glScissor(viewport.x+current_clip->final_clip_rect.pos.x,viewport.y+ (viewport.height-(current_clip->final_clip_rect.pos.y+current_clip->final_clip_rect.size.height)),
+ current_clip->final_clip_rect.size.width,current_clip->final_clip_rect.size.height);
+ } else {
+
+ glDisable(GL_SCISSOR_TEST);
+ }
+ }
+
+
+ //begin rect
+ CanvasItem *shader_owner = ci->shader_owner?ci->shader_owner:ci;
+
+ if (shader_owner->shader!=canvas_last_shader) {
+
+ Shader *shader = NULL;
+ if (shader_owner->shader.is_valid()) {
+ shader = this->shader_owner.get(shader_owner->shader);
+ if (shader && !shader->valid) {
+ shader=NULL;
+ }
+ }
+
+ if (shader) {
+ canvas_shader.set_custom_shader(shader->custom_code_id);
+ if (canvas_shader.bind())
+ rebind_texpixel_size=true;
+
+ if (shader_owner->shader_version!=shader->version) {
+ //todo optimize uniforms
+ shader_owner->shader_version=shader->version;
+ }
+ //this can be optimized..
+ int tex_id=1;
+ int idx=0;
+ for(Map<StringName,ShaderLanguage::Uniform>::Element *E=shader->uniforms.front();E;E=E->next()) {
+
+ Map<StringName,Variant>::Element *F=shader_owner->shader_param.find(E->key());
+
+ if ((E->get().type==ShaderLanguage::TYPE_TEXTURE || E->get().type==ShaderLanguage::TYPE_CUBEMAP)) {
+
+ RID rid;
+ if (F) {
+ rid=F->get();
+ }
+
+ if (!rid.is_valid()) {
+
+ Map<StringName,RID>::Element *DT=shader->default_textures.find(E->key());
+ if (DT) {
+ rid=DT->get();
+ }
+ }
+
+ if (rid.is_valid()) {
+
+ int loc = canvas_shader.get_custom_uniform_location(idx); //should be automatic..
+
+ glActiveTexture(GL_TEXTURE0+tex_id);
+ Texture *t=texture_owner.get(rid);
+ if (!t)
+ glBindTexture(GL_TEXTURE_2D,white_tex);
+ else
+ glBindTexture(t->target,t->tex_id);
+
+ glUniform1i(loc,tex_id);
+ tex_id++;
+ }
+ } else {
+ Variant &v=F?F->get():E->get().default_value;
+ canvas_shader.set_custom_uniform(idx,v);
+ }
+
+ idx++;
+ }
+
+
+ if (shader->has_texscreen && framebuffer.active) {
+
+ int x = viewport.x;
+ int y = window_size.height-(viewport.height+viewport.y);
+
+ canvas_shader.set_uniform(CanvasShaderGLES2::TEXSCREEN_SCREEN_MULT,Vector2(float(viewport.width)/framebuffer.width,float(viewport.height)/framebuffer.height));
+ canvas_shader.set_uniform(CanvasShaderGLES2::TEXSCREEN_SCREEN_CLAMP,Color(float(x)/framebuffer.width,float(y)/framebuffer.height,float(x+viewport.width)/framebuffer.width,float(y+viewport.height)/framebuffer.height));
+ canvas_shader.set_uniform(CanvasShaderGLES2::TEXSCREEN_TEX,tex_id);
+ glActiveTexture(GL_TEXTURE0+tex_id);
+ glBindTexture(GL_TEXTURE_2D,framebuffer.sample_color);
+ if (framebuffer.scale==1 && !canvas_texscreen_used) {
+#ifdef GLEW_ENABLED
+ glReadBuffer(GL_COLOR_ATTACHMENT0);
+#endif
+ glCopyTexSubImage2D(GL_TEXTURE_2D,0,x,y,x,y,viewport.width,viewport.height);
+ if (current_clip) {
+ // print_line(" a clip ");
+ }
+
+ canvas_texscreen_used=true;
+ }
+ tex_id++;
+
+ }
+
+ if (tex_id>1) {
+ glActiveTexture(GL_TEXTURE0);
+ }
+ if (shader->has_screen_uv) {
+ canvas_shader.set_uniform(CanvasShaderGLES2::SCREEN_UV_MULT,Vector2(1.0/viewport.width,1.0/viewport.height));
+ }
+
+ if (shader->uses_time) {
+ canvas_shader.set_uniform(CanvasShaderGLES2::TIME,Math::fmod(last_time,300.0));
+ draw_next_frame=true;
+ }
+ //if uses TIME - draw_next_frame=true
+
+ uses_texpixel_size=shader->uses_texpixel_size;
+
+ } else {
+ canvas_shader.set_custom_shader(0);
+ canvas_shader.bind();
+ uses_texpixel_size=false;
+
+ }
+
+
+ canvas_shader.set_uniform(CanvasShaderGLES2::PROJECTION_MATRIX,canvas_transform);
+ canvas_last_shader=shader_owner->shader;
+ }
+
+ canvas_shader.set_uniform(CanvasShaderGLES2::MODELVIEW_MATRIX,ci->final_transform);
+ canvas_shader.set_uniform(CanvasShaderGLES2::EXTRA_MATRIX,Matrix32());
+
+
+ bool reclip=false;
+
+ if (ci==p_item_list || ci->blend_mode!=canvas_blend_mode) {
+
+ switch(ci->blend_mode) {
+
+ case VS::MATERIAL_BLEND_MODE_MIX: {
+ glBlendEquation(GL_FUNC_ADD);
+ glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
+
+ } break;
+ case VS::MATERIAL_BLEND_MODE_ADD: {
+
+ glBlendEquation(GL_FUNC_ADD);
+ glBlendFunc(GL_SRC_ALPHA,GL_ONE);
+
+ } break;
+ case VS::MATERIAL_BLEND_MODE_SUB: {
+
+ glBlendEquation(GL_FUNC_SUBTRACT);
+ glBlendFunc(GL_SRC_ALPHA,GL_ONE);
+ } break;
+ case VS::MATERIAL_BLEND_MODE_MUL: {
+ glBlendEquation(GL_FUNC_ADD);
+ glBlendFunc(GL_DST_COLOR,GL_ZERO);
+ } break;
+ case VS::MATERIAL_BLEND_MODE_PREMULT_ALPHA: {
+ glBlendEquation(GL_FUNC_ADD);
+ glBlendFunc(GL_ONE,GL_ONE_MINUS_SRC_ALPHA);
+ } break;
+
+ }
+
+ canvas_blend_mode=ci->blend_mode;
+ }
+
+ int cc=ci->commands.size();
+ CanvasItem::Command **commands = ci->commands.ptr();
+
+ canvas_opacity = ci->final_opacity;
+
+ for(int i=0;i<cc;i++) {
+
+ CanvasItem::Command *c=commands[i];
+
+ switch(c->type) {
+ case CanvasItem::Command::TYPE_LINE: {
+
+ CanvasItem::CommandLine* line = static_cast<CanvasItem::CommandLine*>(c);
+ canvas_draw_line(line->from,line->to,line->color,line->width);
+ } break;
+ case CanvasItem::Command::TYPE_RECT: {
+
+ CanvasItem::CommandRect* rect = static_cast<CanvasItem::CommandRect*>(c);
+// canvas_draw_rect(rect->rect,rect->region,rect->source,rect->flags&CanvasItem::CommandRect::FLAG_TILE,rect->flags&CanvasItem::CommandRect::FLAG_FLIP_H,rect->flags&CanvasItem::CommandRect::FLAG_FLIP_V,rect->texture,rect->modulate);
+#if 0
+ int flags=0;
+
+ if (rect->flags&CanvasItem::CommandRect::FLAG_REGION) {
+ flags|=Rasterizer::CANVAS_RECT_REGION;
+ }
+ if (rect->flags&CanvasItem::CommandRect::FLAG_TILE) {
+ flags|=Rasterizer::CANVAS_RECT_TILE;
+ }
+ if (rect->flags&CanvasItem::CommandRect::FLAG_FLIP_H) {
+
+ flags|=Rasterizer::CANVAS_RECT_FLIP_H;
+ }
+ if (rect->flags&CanvasItem::CommandRect::FLAG_FLIP_V) {
+
+ flags|=Rasterizer::CANVAS_RECT_FLIP_V;
+ }
+#else
+
+ int flags=rect->flags;
+#endif
+ canvas_draw_rect(rect->rect,flags,rect->source,rect->texture,rect->modulate);
+
+ } break;
+ case CanvasItem::Command::TYPE_STYLE: {
+
+ CanvasItem::CommandStyle* style = static_cast<CanvasItem::CommandStyle*>(c);
+ canvas_draw_style_box(style->rect,style->texture,style->margin,style->draw_center,style->color);
+
+ } break;
+ case CanvasItem::Command::TYPE_PRIMITIVE: {
+
+ CanvasItem::CommandPrimitive* primitive = static_cast<CanvasItem::CommandPrimitive*>(c);
+ canvas_draw_primitive(primitive->points,primitive->colors,primitive->uvs,primitive->texture,primitive->width);
+ } break;
+ case CanvasItem::Command::TYPE_POLYGON: {
+
+ CanvasItem::CommandPolygon* polygon = static_cast<CanvasItem::CommandPolygon*>(c);
+ canvas_draw_polygon(polygon->count,polygon->indices.ptr(),polygon->points.ptr(),polygon->uvs.ptr(),polygon->colors.ptr(),polygon->texture,polygon->colors.size()==1);
+
+ } break;
+
+ case CanvasItem::Command::TYPE_POLYGON_PTR: {
+
+ CanvasItem::CommandPolygonPtr* polygon = static_cast<CanvasItem::CommandPolygonPtr*>(c);
+ canvas_draw_polygon(polygon->count,polygon->indices,polygon->points,polygon->uvs,polygon->colors,polygon->texture,false);
+ } break;
+ case CanvasItem::Command::TYPE_CIRCLE: {
+
+ CanvasItem::CommandCircle* circle = static_cast<CanvasItem::CommandCircle*>(c);
+ static const int numpoints=32;
+ Vector2 points[numpoints+1];
+ points[numpoints]=circle->pos;
+ int indices[numpoints*3];
+
+ for(int i=0;i<numpoints;i++) {
+
+ points[i]=circle->pos+Vector2( Math::sin(i*Math_PI*2.0/numpoints),Math::cos(i*Math_PI*2.0/numpoints) )*circle->radius;
+ indices[i*3+0]=i;
+ indices[i*3+1]=(i+1)%numpoints;
+ indices[i*3+2]=numpoints;
+ }
+ canvas_draw_polygon(numpoints*3,indices,points,NULL,&circle->color,RID(),true);
+ //canvas_draw_circle(circle->indices.size(),circle->indices.ptr(),circle->points.ptr(),circle->uvs.ptr(),circle->colors.ptr(),circle->texture,circle->colors.size()==1);
+ } break;
+ case CanvasItem::Command::TYPE_TRANSFORM: {
+
+ CanvasItem::CommandTransform* transform = static_cast<CanvasItem::CommandTransform*>(c);
+ canvas_set_transform(transform->xform);
+ } break;
+ case CanvasItem::Command::TYPE_BLEND_MODE: {
+
+ CanvasItem::CommandBlendMode* bm = static_cast<CanvasItem::CommandBlendMode*>(c);
+ canvas_set_blend_mode(bm->blend_mode);
+
+ } break;
+ case CanvasItem::Command::TYPE_CLIP_IGNORE: {
+
+ CanvasItem::CommandClipIgnore* ci = static_cast<CanvasItem::CommandClipIgnore*>(c);
+ if (current_clip) {
+
+ if (ci->ignore!=reclip) {
+ if (ci->ignore) {
+
+ glDisable(GL_SCISSOR_TEST);
+ reclip=true;
+ } else {
+
+ glEnable(GL_SCISSOR_TEST);
+ glScissor(viewport.x+current_clip->final_clip_rect.pos.x,viewport.y+ (viewport.height-(current_clip->final_clip_rect.pos.y+current_clip->final_clip_rect.size.height)),
+ current_clip->final_clip_rect.size.width,current_clip->final_clip_rect.size.height);
+ reclip=false;
+ }
+ }
+ }
+
+
+
+ } break;
+ }
+ }
+
+
+ if (reclip) {
+
+ glEnable(GL_SCISSOR_TEST);
+ glScissor(viewport.x+current_clip->final_clip_rect.pos.x,viewport.y+ (viewport.height-(current_clip->final_clip_rect.pos.y+current_clip->final_clip_rect.size.height)),
+ current_clip->final_clip_rect.size.width,current_clip->final_clip_rect.size.height);
+ }
+
+
+
+ p_item_list=p_item_list->next;
+ }
+
+ if (current_clip) {
+ glDisable(GL_SCISSOR_TEST);
+ }
+
+}
+
/* ENVIRONMENT */
RID RasterizerGLES2::environment_create() {
diff --git a/drivers/gles2/rasterizer_gles2.h b/drivers/gles2/rasterizer_gles2.h
index dc596f9f6c..0f77d18dee 100644
--- a/drivers/gles2/rasterizer_gles2.h
+++ b/drivers/gles2/rasterizer_gles2.h
@@ -191,6 +191,8 @@ class RasterizerGLES2 : public Rasterizer {
bool writes_vertex;
bool uses_discard;
bool uses_time;
+ bool uses_normal;
+ bool uses_texpixel_size;
Map<StringName,ShaderLanguage::Uniform> uniforms;
StringName first_texture;
@@ -214,6 +216,7 @@ class RasterizerGLES2 : public Rasterizer {
writes_vertex=false;
uses_discard=false;
uses_time=false;
+ uses_normal=false;
}
@@ -241,8 +244,9 @@ class RasterizerGLES2 : public Rasterizer {
struct UniformData {
+ bool inuse;
bool istexture;
- Variant value;
+ Variant value;
int index;
};
@@ -1168,6 +1172,13 @@ class RasterizerGLES2 : public Rasterizer {
GLuint white_tex;
RID canvas_tex;
float canvas_opacity;
+ bool uses_texpixel_size;
+ bool rebind_texpixel_size;
+ Transform canvas_transform;
+ RID canvas_last_shader;
+ bool canvas_texscreen_used;
+
+
_FORCE_INLINE_ Texture* _bind_canvas_texture(const RID& p_texture);
VS::MaterialBlendMode canvas_blend_mode;
@@ -1198,7 +1209,7 @@ class RasterizerGLES2 : public Rasterizer {
RID overdraw_material;
mutable MaterialShaderGLES2 material_shader;
- CanvasShaderGLES2 canvas_shader;
+ mutable CanvasShaderGLES2 canvas_shader;
BlurShaderGLES2 blur_shader;
CopyShaderGLES2 copy_shader;
@@ -1259,6 +1270,8 @@ public:
virtual void shader_set_default_texture_param(RID p_shader, const StringName& p_name, RID p_texture);
virtual RID shader_get_default_texture_param(RID p_shader, const StringName& p_name) const;
+ virtual Variant shader_get_default_param(RID p_shader, const StringName& p_name);
+
/* COMMON MATERIAL API */
virtual RID material_create();
@@ -1535,6 +1548,8 @@ public:
virtual void canvas_draw_polygon(int p_vertex_count, const int* p_indices, const Vector2* p_vertices, const Vector2* p_uvs, const Color* p_colors,const RID& p_texture,bool p_singlecolor);
virtual void canvas_set_transform(const Matrix32& p_transform);
+ virtual void canvas_render_items(CanvasItem *p_item_list);
+
/* ENVIRONMENT */
diff --git a/drivers/gles2/shader_compiler_gles2.cpp b/drivers/gles2/shader_compiler_gles2.cpp
index 50b63e1aa0..d8841d407e 100644
--- a/drivers/gles2/shader_compiler_gles2.cpp
+++ b/drivers/gles2/shader_compiler_gles2.cpp
@@ -131,6 +131,7 @@ String ShaderCompilerGLES2::dump_node_code(SL::Node *p_node,int p_level,bool p_a
SL::BlockNode *bnode=(SL::BlockNode*)p_node;
//variables
+ code+="{"ENDL;
for(Map<StringName,SL::DataType>::Element *E=bnode->variables.front();E;E=E->next()) {
code+=_mktab(p_level)+_typestr(E->value())+" "+replace_string(E->key())+";"ENDL;
@@ -141,10 +142,12 @@ String ShaderCompilerGLES2::dump_node_code(SL::Node *p_node,int p_level,bool p_a
code+=_mktab(p_level)+dump_node_code(bnode->statements[i],p_level)+";"ENDL;
}
+ code+="}"ENDL;
} break;
case SL::Node::TYPE_VARIABLE: {
SL::VariableNode *vnode=(SL::VariableNode*)p_node;
+
if (type==ShaderLanguage::SHADER_MATERIAL_VERTEX) {
if (vnode->name==vname_vertex && p_assign_left) {
@@ -171,6 +174,9 @@ String ShaderCompilerGLES2::dump_node_code(SL::Node *p_node,int p_level,bool p_a
}
+
+
+
if (type==ShaderLanguage::SHADER_MATERIAL_FRAGMENT) {
if (vnode->name==vname_discard) {
@@ -212,6 +218,50 @@ String ShaderCompilerGLES2::dump_node_code(SL::Node *p_node,int p_level,bool p_a
}
}
+ if (type==ShaderLanguage::SHADER_CANVAS_ITEM_VERTEX) {
+
+ if (vnode->name==vname_var1_interp) {
+ flags->use_var1_interp=true;
+ }
+ if (vnode->name==vname_var2_interp) {
+ flags->use_var2_interp=true;
+ }
+ if (vnode->name==vname_world_vec) {
+ uses_worldvec=true;
+ }
+
+ }
+
+
+ if (type==ShaderLanguage::SHADER_CANVAS_ITEM_FRAGMENT) {
+
+
+ if (vnode->name==vname_texpixel_size) {
+ uses_texpixel_size=true;
+ }
+ if (vnode->name==vname_normal) {
+ uses_normal=true;
+ }
+
+ if (vnode->name==vname_screen_uv) {
+ uses_screen_uv=true;
+ }
+
+ if (vnode->name==vname_var1_interp) {
+ flags->use_var1_interp=true;
+ }
+ if (vnode->name==vname_var2_interp) {
+ flags->use_var2_interp=true;
+ }
+ }
+
+ if (type==ShaderLanguage::SHADER_CANVAS_ITEM_LIGHT) {
+
+ if (vnode->name==vname_light) {
+ uses_light=true;
+ }
+
+ }
if (vnode->name==vname_time) {
uses_time=true;
@@ -260,13 +310,13 @@ String ShaderCompilerGLES2::dump_node_code(SL::Node *p_node,int p_level,bool p_a
String mul_l=dump_node_code(onode->arguments[0],p_level,true);
String mul_r=dump_node_code(onode->arguments[1],p_level);
- code=mul_l+"=(vec4("+mul_l+",1.0,1.0)*("+mul_r+")).xy";
+ code=mul_l+"=(vec4("+mul_l+",0.0,1.0)*("+mul_r+")).xy";
break;
} else if (onode->arguments[0]->get_datatype()==SL::TYPE_MAT4 && onode->arguments[1]->get_datatype()==SL::TYPE_VEC2) {
String mul_l=dump_node_code(onode->arguments[0],p_level,true);
String mul_r=dump_node_code(onode->arguments[1],p_level);
- code=mul_l+"=(("+mul_l+")*vec4("+mul_r+",1.0,1.0)).xy";
+ code=mul_l+"=(("+mul_l+")*vec4("+mul_r+",0.0,1.0)).xy";
break;
} else if (onode->arguments[0]->get_datatype()==SL::TYPE_VEC2 && onode->arguments[1]->get_datatype()==SL::TYPE_MAT3) {
String mul_l=dump_node_code(onode->arguments[0],p_level,true);
@@ -296,11 +346,11 @@ String ShaderCompilerGLES2::dump_node_code(SL::Node *p_node,int p_level,bool p_a
break;
} else if (onode->arguments[0]->get_datatype()==SL::TYPE_MAT4 && onode->arguments[1]->get_datatype()==SL::TYPE_VEC2) {
- code="("+dump_node_code(onode->arguments[0],p_level)+"*vec4("+dump_node_code(onode->arguments[1],p_level)+",1.0,1.0)).xyz";
+ code="("+dump_node_code(onode->arguments[0],p_level)+"*vec4("+dump_node_code(onode->arguments[1],p_level)+",0.0,1.0)).xy";
break;
} else if (onode->arguments[0]->get_datatype()==SL::TYPE_VEC2 && onode->arguments[1]->get_datatype()==SL::TYPE_MAT4) {
- code="(vec4("+dump_node_code(onode->arguments[0],p_level)+",1.0,1.0)*"+dump_node_code(onode->arguments[1],p_level)+").xyz";
+ code="(vec4("+dump_node_code(onode->arguments[0],p_level)+",0.0,1.0)*"+dump_node_code(onode->arguments[1],p_level)+").xy";
break;
} else if (onode->arguments[0]->get_datatype()==SL::TYPE_MAT3 && onode->arguments[1]->get_datatype()==SL::TYPE_VEC2) {
@@ -357,7 +407,7 @@ String ShaderCompilerGLES2::dump_node_code(SL::Node *p_node,int p_level,bool p_a
} else if (callfunc=="texscreen") {
//create the call to sample the screen, and clamp it
uses_texscreen=true;
- code="(texture2D( texscreen_tex, min(("+dump_node_code(onode->arguments[1],p_level)+").xy*texscreen_screen_mult,texscreen_screen_mult))).rgb";
+ code="(texture2D( texscreen_tex, clamp(("+dump_node_code(onode->arguments[1],p_level)+").xy*texscreen_screen_mult,texscreen_screen_clamp.xy,texscreen_screen_clamp.zw))).rgb";
//code="(texture2D( screen_texture, ("+dump_node_code(onode->arguments[1],p_level)+").xy).rgb";
break;
} else if (callfunc=="texpos") {
@@ -550,6 +600,9 @@ Error ShaderCompilerGLES2::compile(const String& p_code, ShaderLanguage::ShaderT
uses_light=false;
uses_time=false;
uses_normalmap=false;
+ uses_normal=false;
+ uses_texpixel_size=false;
+ uses_worldvec=false;
vertex_code_writes_vertex=false;
uniforms=r_uniforms;
flags=&r_flags;
@@ -560,6 +613,7 @@ Error ShaderCompilerGLES2::compile(const String& p_code, ShaderLanguage::ShaderT
r_flags.use_var1_interp=false;
r_flags.use_var2_interp=false;
r_flags.uses_normalmap=false;
+ r_flags.uses_normal=false;
String error;
int errline,errcol;
@@ -582,6 +636,9 @@ Error ShaderCompilerGLES2::compile(const String& p_code, ShaderLanguage::ShaderT
r_flags.uses_light=uses_light;
r_flags.uses_time=uses_time;
r_flags.uses_normalmap=uses_normalmap;
+ r_flags.uses_normal=uses_normalmap;
+ r_flags.uses_texpixel_size=uses_texpixel_size;
+ r_flags.uses_worldvec=uses_worldvec;
r_code_line=code;
r_globals_line=global_code;
@@ -638,6 +695,7 @@ ShaderCompilerGLES2::ShaderCompilerGLES2() {
replace_table["cross" ]="cross";
replace_table["normalize"]= "normalize";
replace_table["reflect"]= "reflect";
+ replace_table["refract"]= "refract";
replace_table["tex"]= "tex";
replace_table["texa"]= "texa";
replace_table["tex2"]= "tex2";
@@ -676,6 +734,7 @@ ShaderCompilerGLES2::ShaderCompilerGLES2() {
//mode_replace_table[1]["POSITION"]="IN_POSITION";
mode_replace_table[1]["NORMAL"]="normal";
mode_replace_table[1]["TANGENT"]="tangent";
+ mode_replace_table[1]["POSITION"]="gl_Position";
mode_replace_table[1]["BINORMAL"]="binormal";
mode_replace_table[1]["NORMALMAP"]="normalmap";
mode_replace_table[1]["NORMALMAP_DEPTH"]="normaldepth";
@@ -718,6 +777,43 @@ ShaderCompilerGLES2::ShaderCompilerGLES2() {
mode_replace_table[2]["POINT_COORD"]="gl_PointCoord";
mode_replace_table[2]["TIME"]="time";
+ mode_replace_table[3]["SRC_VERTEX"]="src_vtx";
+ mode_replace_table[3]["VERTEX"]="outvec.xy";
+ mode_replace_table[3]["WORLD_VERTEX"]="outvec.xy";
+ mode_replace_table[3]["UV"]="uv_interp";
+ mode_replace_table[3]["COLOR"]="color_interp";
+ mode_replace_table[3]["VAR1"]="var1_interp";
+ mode_replace_table[3]["VAR2"]="var2_interp";
+ mode_replace_table[3]["POINT_SIZE"]="gl_PointSize";
+ mode_replace_table[3]["WORLD_MATRIX"]="modelview_matrix";
+ mode_replace_table[3]["PROJECTION_MATRIX"]="projection_matrix";
+ mode_replace_table[3]["EXTRA_MATRIX"]="extra_matrix";
+ mode_replace_table[3]["TIME"]="time";
+
+ mode_replace_table[4]["POSITION"]="gl_Position";
+ mode_replace_table[4]["NORMAL"]="normal";
+ mode_replace_table[4]["UV"]="uv_interp";
+ mode_replace_table[4]["SRC_COLOR"]="color_interp";
+ mode_replace_table[4]["COLOR"]="color";
+ mode_replace_table[4]["TEXTURE"]="texture";
+ mode_replace_table[4]["TEXTURE_PIXEL_SIZE"]="texpixel_size";
+ mode_replace_table[4]["VAR1"]="var1_interp";
+ mode_replace_table[4]["VAR2"]="var2_interp";
+ mode_replace_table[4]["SCREEN_UV"]="screen_uv";
+ mode_replace_table[4]["POINT_COORD"]="gl_PointCoord";
+ mode_replace_table[4]["TIME"]="time";
+
+ mode_replace_table[5]["SRC_COLOR"]="color";
+ mode_replace_table[5]["COLOR"]="color";
+ mode_replace_table[5]["NORMAL"]="normal";
+ mode_replace_table[5]["LIGHT_DIR"]="light_dir";
+ mode_replace_table[5]["LIGHT_DISTANCE"]="light_distance";
+ mode_replace_table[5]["LIGHT"]="light";
+ mode_replace_table[5]["POINT_COORD"]="gl_PointCoord";
+ mode_replace_table[5]["TIME"]="time";
+
+
+
//mode_replace_table[2]["SCREEN_POS"]="SCREEN_POS";
//mode_replace_table[2]["SCREEN_TEXEL_SIZE"]="SCREEN_TEXEL_SIZE";
@@ -738,5 +834,8 @@ ShaderCompilerGLES2::ShaderCompilerGLES2() {
vname_light="LIGHT";
vname_time="TIME";
vname_normalmap="NORMALMAP";
+ vname_normal="NORMAL";
+ vname_texpixel_size="TEXTURE_PIXEL_SIZE";
+ vname_world_vec="WORLD_VERTEX";
}
diff --git a/drivers/gles2/shader_compiler_gles2.h b/drivers/gles2/shader_compiler_gles2.h
index 5012414c8b..87722602fd 100644
--- a/drivers/gles2/shader_compiler_gles2.h
+++ b/drivers/gles2/shader_compiler_gles2.h
@@ -51,6 +51,9 @@ private:
bool uses_time;
bool uses_screen_uv;
bool uses_normalmap;
+ bool uses_normal;
+ bool uses_texpixel_size;
+ bool uses_worldvec;
bool vertex_code_writes_vertex;
Flags *flags;
@@ -68,6 +71,9 @@ private:
StringName vname_light;
StringName vname_time;
StringName vname_normalmap;
+ StringName vname_normal;
+ StringName vname_texpixel_size;
+ StringName vname_world_vec;
Map<StringName,ShaderLanguage::Uniform> *uniforms;
@@ -79,7 +85,7 @@ private:
String replace_string(const StringName& p_string);
- Map<StringName,StringName> mode_replace_table[3];
+ Map<StringName,StringName> mode_replace_table[9];
Map<StringName,StringName> replace_table;
public:
@@ -101,6 +107,9 @@ public:
bool use_var2_interp;
bool uses_light;
bool uses_time;
+ bool uses_normal;
+ bool uses_texpixel_size;
+ bool uses_worldvec;
};
Error compile(const String& p_code, ShaderLanguage::ShaderType p_type, String& r_code_line, String& r_globals_line, Flags& r_flags, Map<StringName,ShaderLanguage::Uniform> *r_uniforms=NULL);
diff --git a/drivers/gles2/shaders/canvas.glsl b/drivers/gles2/shaders/canvas.glsl
index f36741d586..dc0af017d0 100644
--- a/drivers/gles2/shaders/canvas.glsl
+++ b/drivers/gles2/shaders/canvas.glsl
@@ -18,20 +18,60 @@ attribute highp vec2 uv_attrib; // attrib:4
varying vec2 uv_interp;
varying vec4 color_interp;
+#if defined(USE_TIME)
+uniform float time;
+#endif
+
+
+#ifdef USE_LIGHTING
+
+uniform highp mat4 light_matrix;
+varying vec4 light_tex_pos;
+
+#endif
+
+#if defined(ENABLE_VAR1_INTERP)
+varying vec4 var1_interp;
+#endif
+
+#if defined(ENABLE_VAR2_INTERP)
+varying vec4 var2_interp;
+#endif
+
//uniform bool snap_pixels;
+VERTEX_SHADER_GLOBALS
+
void main() {
color_interp = color_attrib;
uv_interp = uv_attrib;
- highp vec4 outvec = vec4(vertex, 1.0);
- outvec = extra_matrix * outvec;
- outvec = modelview_matrix * outvec;
+ highp vec4 outvec = vec4(vertex, 1.0);
+{
+ vec2 src_vtx=outvec.xy;
+VERTEX_SHADER_CODE
+
+}
+#if !defined(USE_WORLD_VEC)
+ outvec = extra_matrix * outvec;
+ outvec = modelview_matrix * outvec;
+#endif
+
#ifdef USE_PIXEL_SNAP
- outvec.xy=floor(outvec.xy+0.5);
+ outvec.xy=floor(outvec.xy+0.5);
#endif
+
+
gl_Position = projection_matrix * outvec;
+
+#ifdef USE_LIGHTING
+
+ light_tex_pos.xy = light_matrix * gl_Position;
+ light_tex_pos.zw=outvec.xy - light_matrix[4].xy; //likely wrong
+
+#endif
+
}
[fragment]
@@ -54,17 +94,112 @@ varying vec4 color_interp;
#endif
+#if defined(ENABLE_SCREEN_UV)
+
+uniform vec2 screen_uv_mult;
+
+#endif
+
+#if defined(ENABLE_TEXSCREEN)
+
+uniform vec2 texscreen_screen_mult;
+uniform vec4 texscreen_screen_clamp;
+uniform sampler2D texscreen_tex;
+
+#endif
+
+
+#if defined(ENABLE_VAR1_INTERP)
+varying vec4 var1_interp;
+#endif
+
+#if defined(ENABLE_VAR2_INTERP)
+varying vec4 var2_interp;
+#endif
+
+#if defined(USE_TIME)
+uniform float time;
+#endif
+
+
+#ifdef USE_LIGHTING
+
+uniform sampler2D light_texture;
+varying vec4 light_tex_pos;
+
+#ifdef USE_SHADOWS
+
+uniform sampler2D shadow_texture;
+uniform float shadow_attenuation;
+
+#endif
+
+#endif
+
+#if defined(USE_TEXPIXEL_SIZE)
+uniform vec2 texpixel_size;
+#endif
+
+
+FRAGMENT_SHADER_GLOBALS
+
+
void main() {
vec4 color = color_interp;
-
+#if defined(NORMAL_USED)
+ vec3 normal = vec3(0,0,1);
+#endif
+
color *= texture2D( texture, uv_interp );
+#if defined(ENABLE_SCREEN_UV)
+ vec2 screen_uv = gl_FragCoord.xy*screen_uv_mult;
+#endif
+{
+FRAGMENT_SHADER_CODE
+}
#ifdef DEBUG_ENCODED_32
highp float enc32 = dot( color,highp vec4(1.0 / (256.0 * 256.0 * 256.0),1.0 / (256.0 * 256.0),1.0 / 256.0,1) );
color = vec4(vec3(enc32),1.0);
#endif
+#ifdef USE_LIGHTING
+
+ float att=1.0;
+
+ vec3 light = texture2D(light_texture,light_tex_pos).rgb;
+#ifdef USE_SHADOWS
+ //this might not be that great on mobile?
+ float light_dist = length(light_texture.zw);
+ float light_angle = atan2(light_texture.x,light_texture.z) + 1.0 * 0.5;
+ float shadow_dist = texture2D(shadow_texture,vec2(light_angle,0));
+ if (light_dist>shadow_dist) {
+ light*=shadow_attenuation;
+ }
+//use shadows
+#endif
+
+#if defined(USE_LIGHT_SHADER_CODE)
+//light is written by the light shader
+{
+ vec2 light_dir = normalize(light_tex_pos.zw);
+ float light_distance = length(light_tex_pos.zw);
+LIGHT_SHADER_CODE
+}
+#else
+
+#if defined(NORMAL_USED)
+ vec2 light_normal = normalize(light_tex_pos.zw);
+ light = color.rgb * light * max(dot(light_normal,normal),0);
+#endif
+
+ color.rgb=light;
+//light shader code
+#endif
+
+//use lighting
+#endif
// color.rgb*=color.a;
gl_FragColor = color;
diff --git a/drivers/gles2/shaders/material.glsl b/drivers/gles2/shaders/material.glsl
index 718dd56249..38fb03ab5c 100644
--- a/drivers/gles2/shaders/material.glsl
+++ b/drivers/gles2/shaders/material.glsl
@@ -779,6 +779,7 @@ uniform highp mat4 camera_inverse_transform;
#if defined(ENABLE_TEXSCREEN)
uniform vec2 texscreen_screen_mult;
+uniform vec4 texscreen_screen_clamp;
uniform sampler2D texscreen_tex;
#endif
diff --git a/drivers/png/resource_saver_png.cpp b/drivers/png/resource_saver_png.cpp
index 1fee50c8b5..462051b21e 100644
--- a/drivers/png/resource_saver_png.cpp
+++ b/drivers/png/resource_saver_png.cpp
@@ -64,10 +64,10 @@ Error ResourceSaverPNG::save(const String &p_path,const RES& p_resource,uint32_t
text+=bool(texture->get_flags()&Texture::FLAG_FILTER)?"filter=true\n":"filter=false\n";
}
if (global_mipmaps!=bool(texture->get_flags()&Texture::FLAG_MIPMAPS)) {
- text+=bool(texture->get_flags()&Texture::FLAG_FILTER)?"gen_mipmaps=true\n":"gen_mipmaps=false\n";
+ text+=bool(texture->get_flags()&Texture::FLAG_MIPMAPS)?"gen_mipmaps=true\n":"gen_mipmaps=false\n";
}
if (global_repeat!=bool(texture->get_flags()&Texture::FLAG_REPEAT)) {
- text+=bool(texture->get_flags()&Texture::FLAG_FILTER)?"repeat=true\n":"repeat=false\n";
+ text+=bool(texture->get_flags()&Texture::FLAG_REPEAT)?"repeat=true\n":"repeat=false\n";
}
if (bool(texture->get_flags()&Texture::FLAG_ANISOTROPIC_FILTER)) {
text+="anisotropic=true\n";
diff --git a/drivers/theoraplayer/SCsub b/drivers/theoraplayer/SCsub
index 419f2b65ae..09fb13d8e9 100644
--- a/drivers/theoraplayer/SCsub
+++ b/drivers/theoraplayer/SCsub
@@ -70,7 +70,7 @@ if env["platform"] == "iphone":
env_theora.Append(CPPFLAGS=["-D_IOS", "-D__ARM_NEON__", "-fstrict-aliasing", "-fmessage-length=210", "-fdiagnostics-show-note-include-stack", "-fmacro-backtrace-limit=0", "-fcolor-diagnostics", "-Wno-trigraphs", "-fpascal-strings", "-fvisibility=hidden", "-fvisibility-inlines-hidden"])
env_theora.Append(CPPFLAGS=["-D_LIB", "-D__THEORA"]) # removed -D_YUV_C
-env_theora.Append(CPPFLAGS=["-D_YUV_LIBYUV", "-DLIBYUV_NEON"])
+env_theora.Append(CPPFLAGS=["-D_YUV_LIBYUV"])
#env_theora.Append(CPPFLAGS=["-D_YUV_C"])
if env["platform"] == "iphone":
diff --git a/methods.py b/methods.py
index 0c0c5a05e3..da1491e3f9 100755
--- a/methods.py
+++ b/methods.py
@@ -1316,3 +1316,39 @@ def save_active_platforms(apnames,ap):
logow = open(wf,"wb")
logow.write(str)
+
+def colored(sys,env):
+
+ #If the output is not a terminal, do nothing
+ if not sys.stdout.isatty():
+ return
+
+ colors = {}
+ colors['cyan'] = '\033[96m'
+ colors['purple'] = '\033[95m'
+ colors['blue'] = '\033[94m'
+ colors['green'] = '\033[92m'
+ colors['yellow'] = '\033[93m'
+ colors['red'] = '\033[91m'
+ colors['end'] = '\033[0m'
+
+ compile_source_message = '%sCompiling %s==> %s$SOURCE%s' % (colors['blue'], colors['purple'], colors['yellow'], colors['end'])
+ java_compile_source_message = '%sCompiling %s==> %s$SOURCE%s' % (colors['blue'], colors['purple'], colors['yellow'], colors['end'])
+ compile_shared_source_message = '%sCompiling shared %s==> %s$SOURCE%s' % (colors['blue'], colors['purple'], colors['yellow'], colors['end'])
+ link_program_message = '%sLinking Program %s==> %s$TARGET%s' % (colors['red'], colors['purple'], colors['yellow'], colors['end'])
+ link_library_message = '%sLinking Static Library %s==> %s$TARGET%s' % (colors['red'], colors['purple'], colors['yellow'], colors['end'])
+ ranlib_library_message = '%sRanlib Library %s==> %s$TARGET%s' % (colors['red'], colors['purple'], colors['yellow'], colors['end'])
+ link_shared_library_message = '%sLinking Shared Library %s==> %s$TARGET%s' % (colors['red'], colors['purple'], colors['yellow'], colors['end'])
+ java_library_message = '%sCreating Java Archive %s==> %s$TARGET%s' % (colors['red'], colors['purple'], colors['yellow'], colors['end'])
+
+ env.Append( CXXCOMSTR=[compile_source_message] )
+ env.Append( CCCOMSTR=[compile_source_message] )
+ env.Append( SHCCCOMSTR=[compile_shared_source_message] )
+ env.Append( SHCXXCOMSTR=[compile_shared_source_message] )
+ env.Append( ARCOMSTR=[link_library_message] )
+ env.Append( RANLIBCOMSTR=[ranlib_library_message] )
+ env.Append( SHLINKCOMSTR=[link_shared_library_message] )
+ env.Append( LINKCOMSTR=[link_program_message] )
+ env.Append( JARCOMSTR=[java_library_message] )
+ env.Append( JAVACCOMSTR=[java_compile_source_message] )
+
diff --git a/modules/gdscript/gd_compiler.h b/modules/gdscript/gd_compiler.h
index b83d0ded4b..0c34c23b25 100644
--- a/modules/gdscript/gd_compiler.h
+++ b/modules/gdscript/gd_compiler.h
@@ -37,77 +37,65 @@ class GDCompiler {
const GDParser *parser;
struct CodeGen {
-
-
GDScript *script;
const GDParser::ClassNode *class_node;
const GDParser::FunctionNode *function_node;
-
-
- bool debug_stack;
-
-
- List< Map<StringName,int> > stack_id_stack;
- Map<StringName,int> stack_identifiers;
-
- List<GDFunction::StackDebug> stack_debug;
- List< Map<StringName,int> > block_identifier_stack;
- Map<StringName,int> block_identifiers;
-
-
- void add_stack_identifier(const StringName& p_id,int p_stackpos) {
-
- stack_identifiers[p_id]=p_stackpos;
- if (debug_stack) {
-
- block_identifiers[p_id]=p_stackpos;
- GDFunction::StackDebug sd;
- sd.added=true;
- sd.line=current_line;
- sd.identifier=p_id;
- sd.pos=p_stackpos;
- stack_debug.push_back(sd);
- }
- }
-
- void push_stack_identifiers() {
-
- stack_id_stack.push_back( stack_identifiers );
- if (debug_stack) {
-
- block_identifier_stack.push_back(block_identifiers);
- block_identifiers.clear();
- }
- }
-
- void pop_stack_identifiers() {
-
- stack_identifiers = stack_id_stack.back()->get();
- stack_id_stack.pop_back();
-
- if (debug_stack) {
- for (Map<StringName,int>::Element *E=block_identifiers.front();E;E=E->next()) {
-
- GDFunction::StackDebug sd;
- sd.added=false;
- sd.identifier=E->key();
- sd.line=current_line;
- sd.pos=E->get();
- stack_debug.push_back(sd);
- }
- block_identifiers=block_identifier_stack.back()->get();
- block_identifier_stack.pop_back();
- }
-
- }
-
-
- // int get_identifier_pos(const StringName& p_dentifier) const;
+ bool debug_stack;
+
+ List< Map<StringName,int> > stack_id_stack;
+ Map<StringName,int> stack_identifiers;
+
+ List<GDFunction::StackDebug> stack_debug;
+ List< Map<StringName,int> > block_identifier_stack;
+ Map<StringName,int> block_identifiers;
+
+ void add_stack_identifier(const StringName& p_id,int p_stackpos) {
+ stack_identifiers[p_id]=p_stackpos;
+ if (debug_stack) {
+ block_identifiers[p_id]=p_stackpos;
+ GDFunction::StackDebug sd;
+ sd.added=true;
+ sd.line=current_line;
+ sd.identifier=p_id;
+ sd.pos=p_stackpos;
+ stack_debug.push_back(sd);
+ }
+ }
+
+ void push_stack_identifiers() {
+ stack_id_stack.push_back( stack_identifiers );
+ if (debug_stack) {
+
+ block_identifier_stack.push_back(block_identifiers);
+ block_identifiers.clear();
+ }
+ }
+
+ void pop_stack_identifiers() {
+ stack_identifiers = stack_id_stack.back()->get();
+ stack_id_stack.pop_back();
+
+ if (debug_stack) {
+ for (Map<StringName,int>::Element *E=block_identifiers.front();E;E=E->next()) {
+
+ GDFunction::StackDebug sd;
+ sd.added=false;
+ sd.identifier=E->key();
+ sd.line=current_line;
+ sd.pos=E->get();
+ stack_debug.push_back(sd);
+ }
+ block_identifiers=block_identifier_stack.back()->get();
+ block_identifier_stack.pop_back();
+ }
+ }
+
+
+ //int get_identifier_pos(const StringName& p_dentifier) const;
HashMap<Variant,int,VariantHasher> constant_map;
Map<StringName,int> name_map;
int get_name_map_pos(const StringName& p_identifier) {
-
int ret;
if (!name_map.has(p_identifier)) {
ret=name_map.size();
@@ -118,11 +106,7 @@ class GDCompiler {
return ret;
}
-
-
int get_constant_pos(const Variant& p_constant) {
-
-
if (constant_map.has(p_constant))
return constant_map[p_constant];
int pos = constant_map.size();
@@ -134,7 +118,7 @@ class GDCompiler {
void alloc_stack(int p_level) { if (p_level >= stack_max) stack_max=p_level+1; }
void alloc_call(int p_params) { if (p_params >= call_max) call_max=p_params; }
- int current_line;
+ int current_line;
int stack_max;
int call_max;
};
diff --git a/modules/gdscript/gd_editor.cpp b/modules/gdscript/gd_editor.cpp
index 12dc1bb139..20cd09efd0 100644
--- a/modules/gdscript/gd_editor.cpp
+++ b/modules/gdscript/gd_editor.cpp
@@ -1661,7 +1661,7 @@ Error GDScriptLanguage::complete_code(const String& p_code, const String& p_base
//print_line( p_code.replace(String::chr(0xFFFF),"<cursor>"));
GDParser p;
- Error err = p.parse(p_code,p_base_path);
+ Error err = p.parse(p_code,p_base_path,true);
bool isfunction=false;
Set<String> options;
diff --git a/platform/android/detect.py b/platform/android/detect.py
index 695caf1e5d..4cf12538db 100644
--- a/platform/android/detect.py
+++ b/platform/android/detect.py
@@ -124,11 +124,11 @@ def configure(env):
# env['CCFLAGS'] = string.split('-DNO_THREADS -MMD -MP -MF -fpic -ffunction-sections -funwind-tables -fstack-protector -D__ARM_ARCH_5__ -D__ARM_ARCH_5T__ -D__ARM_ARCH_5E__ -D__ARM_ARCH_5TE__ -Wno-psabi -march=armv5te -mtune=xscale -msoft-float -fno-exceptions -mthumb -fno-strict-aliasing -DANDROID -Wa,--noexecstack -DGLES2_ENABLED ')
if env['x86']=='yes':
- env['CCFLAGS'] = string.split('-DNO_STATVFS -MMD -MP -MF -fpic -ffunction-sections -funwind-tables -fstack-protector -fvisibility=hidden -D__GLIBC__ -Wno-psabi -ftree-vectorize -funsafe-math-optimizations -fno-strict-aliasing -DANDROID -Wa,--noexecstack -DGLES2_ENABLED -DGLES1_ENABLED')
+ env['CCFLAGS'] = string.split('-DNO_STATVFS -MMD -MP -MF -fpic -ffunction-sections -funwind-tables -fstack-protector -fvisibility=hidden -D__GLIBC__ -Wno-psabi -ftree-vectorize -funsafe-math-optimizations -fno-strict-aliasing -DANDROID -Wa,--noexecstack -DGLES2_ENABLED')
elif env["armv6"]!="no":
- env['CCFLAGS'] = string.split('-DNO_STATVFS -MMD -MP -MF -fpic -ffunction-sections -funwind-tables -fstack-protector -fvisibility=hidden -D__ARM_ARCH_6__ -D__GLIBC__ -Wno-psabi -march=armv6 -mfpu=vfp -mfloat-abi=softfp -funsafe-math-optimizations -fno-strict-aliasing -DANDROID -Wa,--noexecstack -DGLES2_ENABLED -DGLES1_ENABLED')
+ env['CCFLAGS'] = string.split('-DNO_STATVFS -MMD -MP -MF -fpic -ffunction-sections -funwind-tables -fstack-protector -fvisibility=hidden -D__ARM_ARCH_6__ -D__GLIBC__ -Wno-psabi -march=armv6 -mfpu=vfp -mfloat-abi=softfp -funsafe-math-optimizations -fno-strict-aliasing -DANDROID -Wa,--noexecstack -DGLES2_ENABLED')
else:
- env['CCFLAGS'] = string.split('-DNO_STATVFS -MMD -MP -MF -fpic -ffunction-sections -funwind-tables -fstack-protector -fvisibility=hidden -D__ARM_ARCH_7__ -D__GLIBC__ -Wno-psabi -march=armv6 -mfpu=neon -mfloat-abi=softfp -ftree-vectorize -funsafe-math-optimizations -fno-strict-aliasing -DANDROID -Wa,--noexecstack -DGLES2_ENABLED -DGLES1_ENABLED')
+ env['CCFLAGS'] = string.split('-DNO_STATVFS -MMD -MP -MF -fpic -ffunction-sections -funwind-tables -fstack-protector -fvisibility=hidden -D__ARM_ARCH_7__ -D__GLIBC__ -Wno-psabi -march=armv6 -mfpu=neon -mfloat-abi=softfp -ftree-vectorize -funsafe-math-optimizations -fno-strict-aliasing -DANDROID -Wa,--noexecstack -DGLES2_ENABLED')
env.Append(LDPATH=[ld_path])
env.Append(LIBS=['OpenSLES'])
diff --git a/platform/android/globals/global_defaults.cpp b/platform/android/globals/global_defaults.cpp
index 84a586d22d..824a4e3606 100644
--- a/platform/android/globals/global_defaults.cpp
+++ b/platform/android/globals/global_defaults.cpp
@@ -10,5 +10,5 @@ void register_android_global_defaults() {
GLOBAL_DEF("display.Android/driver","GLES2");
// GLOBAL_DEF("rasterizer.Android/trilinear_mipmap_filter",false);
- Globals::get_singleton()->set_custom_property_info("display.Android/driver",PropertyInfo(Variant::STRING,"display.Android/driver",PROPERTY_HINT_ENUM,"GLES1,GLES2"));
+ Globals::get_singleton()->set_custom_property_info("display.Android/driver",PropertyInfo(Variant::STRING,"display.Android/driver",PROPERTY_HINT_ENUM,"GLES2"));
}
diff --git a/platform/android/java_glue.cpp b/platform/android/java_glue.cpp
index 3d3ba5d276..0312d13644 100644
--- a/platform/android/java_glue.cpp
+++ b/platform/android/java_glue.cpp
@@ -205,6 +205,7 @@ Variant _jobject_to_variant(JNIEnv * env, jobject obj) {
String name = _get_class_name(env, c, &array);
//print_line("name is " + name + ", array "+Variant(array));
+ print_line("ARGNAME: "+name);
if (name == "java.lang.String") {
return String::utf8(env->GetStringUTFChars( (jstring)obj, NULL ));
@@ -821,10 +822,7 @@ JNIEXPORT void JNICALL Java_com_android_godot_GodotLib_initialize(JNIEnv * env,
String vd = Globals::get_singleton()->get("display/driver");
- if (vd.to_upper()=="GLES1")
- env->CallVoidMethod(_godot_instance, _on_video_init, (jboolean)false);
- else
- env->CallVoidMethod(_godot_instance, _on_video_init, (jboolean)true);
+ env->CallVoidMethod(_godot_instance, _on_video_init, (jboolean)true);
__android_log_print(ANDROID_LOG_INFO,"godot","**START");
diff --git a/platform/android/os_android.cpp b/platform/android/os_android.cpp
index 833de059f7..6f1c03b593 100644
--- a/platform/android/os_android.cpp
+++ b/platform/android/os_android.cpp
@@ -28,7 +28,7 @@
/*************************************************************************/
#include "os_android.h"
#include "drivers/gles2/rasterizer_gles2.h"
-#include "drivers/gles1/rasterizer_gles1.h"
+
#include "core/io/file_access_buffered_fa.h"
#include "drivers/unix/file_access_unix.h"
#include "drivers/unix/dir_access_unix.h"
@@ -49,11 +49,11 @@
int OS_Android::get_video_driver_count() const {
- return 2;
+ return 1;
}
const char * OS_Android::get_video_driver_name(int p_driver) const {
- return p_driver==0?"GLES2":"GLES1";
+ return "GLES2";
}
OS::VideoMode OS_Android::get_default_video_mode() const {
@@ -123,13 +123,13 @@ void OS_Android::initialize(const VideoMode& p_desired,int p_video_driver,int p_
AudioDriverManagerSW::add_driver(&audio_driver_android);
- if (use_gl2) {
+ if (true) {
RasterizerGLES2 *rasterizer_gles22=memnew( RasterizerGLES2(false,use_reload_hooks,false,use_reload_hooks ) );
if (gl_extensions)
rasterizer_gles22->set_extensions(gl_extensions);
rasterizer = rasterizer_gles22;
} else {
- rasterizer = memnew( RasterizerGLES1(use_reload_hooks, use_reload_hooks) );
+ //rasterizer = memnew( RasterizerGLES1(use_reload_hooks, use_reload_hooks) );
}
diff --git a/platform/iphone/SCsub b/platform/iphone/SCsub
index 9fc90bc84e..d495e3b5fc 100644
--- a/platform/iphone/SCsub
+++ b/platform/iphone/SCsub
@@ -25,8 +25,6 @@ env_ios = env.Clone();
if env['ios_gles22_override'] == "yes":
env_ios.Append(CPPFLAGS=['-DGLES2_OVERRIDE'])
-if env['ios_GLES1_override'] == "yes":
- env_ios.Append(CPPFLAGS=['-DGLES1_OVERRIDE'])
if env['ios_appirater'] == "yes":
env_ios.Append(CPPFLAGS=['-DAPPIRATER_ENABLED'])
diff --git a/platform/iphone/detect.py b/platform/iphone/detect.py
index f8d86a3c7a..fb57876a83 100644
--- a/platform/iphone/detect.py
+++ b/platform/iphone/detect.py
@@ -26,7 +26,6 @@ def get_opts():
('game_center', 'Support for game center', 'yes'),
('store_kit', 'Support for in-app store', 'yes'),
('ios_gles22_override', 'Force GLES2.0 on iOS', 'yes'),
- ('ios_GLES1_override', 'Force legacy GLES (1.1) on iOS', 'no'),
('ios_appirater', 'Enable Appirater', 'no'),
('ios_exceptions', 'Use exceptions when compiling on playbook', 'yes'),
]
@@ -130,7 +129,7 @@ def configure(env):
env['ENV']['CODESIGN_ALLOCATE'] = '/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate'
- env.Append(CPPFLAGS=['-DIPHONE_ENABLED', '-DUNIX_ENABLED', '-DGLES2_ENABLED', '-DGLES1_ENABLED', '-DMPC_FIXED_POINT'])
+ env.Append(CPPFLAGS=['-DIPHONE_ENABLED', '-DUNIX_ENABLED', '-DGLES2_ENABLED', '-DMPC_FIXED_POINT'])
if env['ios_exceptions'] == 'yes':
env.Append(CPPFLAGS=['-fexceptions'])
else:
diff --git a/platform/iphone/gl_view.mm b/platform/iphone/gl_view.mm
index 4dd2084c20..bee01d3c72 100755
--- a/platform/iphone/gl_view.mm
+++ b/platform/iphone/gl_view.mm
@@ -307,11 +307,7 @@ static void clear_touches() {
nil];
// Create our EAGLContext, and if successful make it current and create our framebuffer.
-#ifdef GLES1_OVERRIDE
- context = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES1];
-#else
context = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES2];
-#endif
if(!context || ![EAGLContext setCurrentContext:context] || ![self createFramebuffer])
{
diff --git a/platform/iphone/os_iphone.cpp b/platform/iphone/os_iphone.cpp
index 812879d427..aee5f76684 100644
--- a/platform/iphone/os_iphone.cpp
+++ b/platform/iphone/os_iphone.cpp
@@ -31,7 +31,7 @@
#include "os_iphone.h"
#include "drivers/gles2/rasterizer_gles2.h"
-#include "drivers/gles1/rasterizer_gles1.h"
+
#include "servers/visual/visual_server_raster.h"
#include "servers/visual/visual_server_wrap_mt.h"
@@ -52,7 +52,7 @@ int OSIPhone::get_video_driver_count() const {
const char * OSIPhone::get_video_driver_name(int p_driver) const {
- return "openglES";
+ return "GLES2";
};
OSIPhone* OSIPhone::get_singleton() {
@@ -106,13 +106,9 @@ void OSIPhone::initialize(const VideoMode& p_desired,int p_video_driver,int p_au
supported_orientations |= ((GLOBAL_DEF("video_mode/allow_vertical", false)?1:0) << PortraitDown);
supported_orientations |= ((GLOBAL_DEF("video_mode/allow_vertical_flipped", false)?1:0) << PortraitUp);
-#ifdef GLES1_OVERRIDE
- rasterizer = memnew( RasterizerGLES1 );
-#else
rasterizer_gles22 = memnew( RasterizerGLES2(false, false, false) );
rasterizer = rasterizer_gles22;
rasterizer_gles22->set_base_framebuffer(gl_view_base_fb);
-#endif
visual_server = memnew( VisualServerRaster(rasterizer) );
if (get_render_thread_mode() != RENDER_THREAD_UNSAFE) {
diff --git a/platform/iphone/platform_config.h b/platform/iphone/platform_config.h
index 7e961176d9..3d6300d8e0 100644
--- a/platform/iphone/platform_config.h
+++ b/platform/iphone/platform_config.h
@@ -28,6 +28,6 @@
/*************************************************************************/
#include <alloca.h>
#define GLES2_INCLUDE_H <ES2/gl.h>
-#define GLES1_INCLUDE_H <ES1/gl.h>
+
#define PLATFORM_REFCOUNT
diff --git a/platform/isim/SCsub b/platform/isim/SCsub
index 07761486a9..2bd65cb49b 100644
--- a/platform/isim/SCsub
+++ b/platform/isim/SCsub
@@ -25,8 +25,6 @@ env_ios = env.Clone();
if env['ios_gles22_override'] == "yes":
env_ios.Append(CPPFLAGS=['-DGLES2_OVERRIDE'])
-if env['ios_GLES1_override'] == "yes":
- env_ios.Append(CPPFLAGS=['-DGLES1_OVERRIDE'])
if env['ios_appirater'] == "yes":
env_ios.Append(CPPFLAGS=['-DAPPIRATER_ENABLED'])
diff --git a/platform/nacl/os_nacl.cpp b/platform/nacl/os_nacl.cpp
index d97195c50d..65f66b0354 100644
--- a/platform/nacl/os_nacl.cpp
+++ b/platform/nacl/os_nacl.cpp
@@ -64,7 +64,7 @@ int OSNacl::get_video_driver_count() const {
};
const char * OSNacl::get_video_driver_name(int p_driver) const {
- return "gles2";
+ return "GLES2";
};
OS::VideoMode OSNacl::get_default_video_mode() const {
diff --git a/platform/osx/detect.py b/platform/osx/detect.py
index 1b32838525..5703cbc546 100644
--- a/platform/osx/detect.py
+++ b/platform/osx/detect.py
@@ -78,12 +78,15 @@ def configure(env):
env.Append(LIBS=['pthread'])
#env.Append(CPPFLAGS=['-F/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks', '-isysroot', '/Developer/SDKs/MacOSX10.4u.sdk', '-mmacosx-version-min=10.4'])
#env.Append(LINKFLAGS=['-mmacosx-version-min=10.4', '-isysroot', '/Developer/SDKs/MacOSX10.4u.sdk', '-Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk'])
- env.Append(LINKFLAGS=['-framework', 'Cocoa', '-framework', 'OpenGL', '-framework', 'AGL', '-framework', 'AudioUnit','-lz'])
+ env.Append(LINKFLAGS=['-framework', 'Cocoa', '-framework', 'Carbon', '-framework', 'OpenGL', '-framework', 'AGL', '-framework', 'AudioUnit','-lz'])
if (env["CXX"]=="clang++"):
env.Append(CPPFLAGS=['-DTYPED_METHOD_BIND'])
env["CC"]="clang"
env["LD"]="clang++"
+ if (env["colored"]=="yes"):
+ if sys.stdout.isatty():
+ env.Append(CPPFLAGS=["-fcolor-diagnostics"])
import methods
diff --git a/platform/osx/os_osx.h b/platform/osx/os_osx.h
index 5df85bca2a..24f7115938 100644
--- a/platform/osx/os_osx.h
+++ b/platform/osx/os_osx.h
@@ -156,6 +156,8 @@ public:
virtual String get_executable_path() const;
+ virtual LatinKeyboardVariant get_latin_keyboard_variant() const;
+
virtual void move_window_to_foreground();
void run();
diff --git a/platform/osx/os_osx.mm b/platform/osx/os_osx.mm
index 1703ae4c49..5bc47a74c1 100644
--- a/platform/osx/os_osx.mm
+++ b/platform/osx/os_osx.mm
@@ -27,6 +27,8 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#import <Cocoa/Cocoa.h>
+
+#include <Carbon/Carbon.h>
#include <IOKit/IOKitLib.h>
#include <IOKit/IOCFPlugIn.h>
#include <IOKit/hid/IOHIDLib.h>
@@ -835,11 +837,24 @@ void OS_OSX::initialize_core() {
}
+static bool keyboard_layout_dirty = true;
+static void keyboardLayoutChanged(CFNotificationCenterRef center, void *observer, CFStringRef name, const void *object, CFDictionaryRef userInfo) {
+ keyboard_layout_dirty = true;
+}
+
void OS_OSX::initialize(const VideoMode& p_desired,int p_video_driver,int p_audio_driver) {
/*** OSX INITIALIZATION ***/
/*** OSX INITIALIZATION ***/
/*** OSX INITIALIZATION ***/
+
+ keyboard_layout_dirty = true;
+
+ // Register to be notified on keyboard layout changes
+ CFNotificationCenterAddObserver(CFNotificationCenterGetDistributedCenter(),
+ NULL, keyboardLayoutChanged,
+ kTISNotifySelectedKeyboardInputSourceChanged, NULL,
+ CFNotificationSuspensionBehaviorDeliverImmediately);
window_delegate = [[GodotWindowDelegate alloc] init];
@@ -1007,6 +1022,8 @@ void OS_OSX::initialize(const VideoMode& p_desired,int p_video_driver,int p_audi
}
void OS_OSX::finalize() {
+ CFNotificationCenterRemoveObserver(CFNotificationCenterGetDistributedCenter(), NULL, kTISNotifySelectedKeyboardInputSourceChanged, NULL);
+
}
void OS_OSX::set_main_loop( MainLoop * p_main_loop ) {
@@ -1241,6 +1258,83 @@ String OS_OSX::get_executable_path() const {
}
+// Returns string representation of keys, if they are printable.
+//
+static NSString *createStringForKeys(const CGKeyCode *keyCode, int length) {
+
+ TISInputSourceRef currentKeyboard = TISCopyCurrentKeyboardInputSource();
+ if (!currentKeyboard)
+ return nil;
+
+ CFDataRef layoutData = (CFDataRef)TISGetInputSourceProperty(currentKeyboard, kTISPropertyUnicodeKeyLayoutData);
+ if (!layoutData)
+ return nil;
+
+ const UCKeyboardLayout *keyboardLayout = (const UCKeyboardLayout *)CFDataGetBytePtr(layoutData);
+
+ OSStatus err;
+ CFMutableStringRef output = CFStringCreateMutable(NULL, 0);
+
+ for (int i=0; i<length; ++i) {
+
+ UInt32 keysDown = 0;
+ UniChar chars[4];
+ UniCharCount realLength;
+
+ err = UCKeyTranslate(keyboardLayout,
+ keyCode[i],
+ kUCKeyActionDisplay,
+ 0,
+ LMGetKbdType(),
+ kUCKeyTranslateNoDeadKeysBit,
+ &keysDown,
+ sizeof(chars) / sizeof(chars[0]),
+ &realLength,
+ chars);
+
+ if (err != noErr) {
+ CFRelease(output);
+ return nil;
+ }
+
+ CFStringAppendCharacters(output, chars, 1);
+ }
+
+ //CFStringUppercase(output, NULL);
+
+ return (NSString *)output;
+}
+OS::LatinKeyboardVariant OS_OSX::get_latin_keyboard_variant() const {
+
+ static LatinKeyboardVariant layout = LATIN_KEYBOARD_QWERTY;
+
+ if (keyboard_layout_dirty) {
+
+ layout = LATIN_KEYBOARD_QWERTY;
+
+ CGKeyCode keys[] = {kVK_ANSI_Q, kVK_ANSI_W, kVK_ANSI_E, kVK_ANSI_R, kVK_ANSI_T, kVK_ANSI_Y};
+ NSString *test = createStringForKeys(keys, 6);
+
+ if ([test isEqualToString:@"qwertz"]) {
+ layout = LATIN_KEYBOARD_QWERTZ;
+ } else if ([test isEqualToString:@"azerty"]) {
+ layout = LATIN_KEYBOARD_AZERTY;
+ } else if ([test isEqualToString:@"qzerty"]) {
+ layout = LATIN_KEYBOARD_QZERTY;
+ } else if ([test isEqualToString:@"',.pyf"]) {
+ layout = LATIN_KEYBOARD_DVORAK;
+ } else if ([test isEqualToString:@"xvlcwk"]) {
+ layout = LATIN_KEYBOARD_NEO;
+ }
+
+ [test release];
+
+ keyboard_layout_dirty = false;
+ return layout;
+ }
+
+ return layout;
+}
void OS_OSX::process_events() {
diff --git a/platform/server/detect.py b/platform/server/detect.py
index 24b36d3188..e2d64c6545 100644
--- a/platform/server/detect.py
+++ b/platform/server/detect.py
@@ -40,6 +40,9 @@ def configure(env):
env["CC"]="clang"
env["CXX"]="clang++"
env["LD"]="clang++"
+ if (env["colored"]=="yes"):
+ if sys.stdout.isatty():
+ env.Append(CXXFLAGS=["-fcolor-diagnostics"])
is64=sys.maxsize > 2**32
diff --git a/platform/windows/detect.py b/platform/windows/detect.py
index 245d6f1bd3..16dd695c59 100644
--- a/platform/windows/detect.py
+++ b/platform/windows/detect.py
@@ -113,7 +113,7 @@ def configure(env):
env.Append(CCFLAGS=['/DTYPED_METHOD_BIND'])
env.Append(CCFLAGS=['/DGLES2_ENABLED'])
- env.Append(CCFLAGS=['/DGLES1_ENABLED'])
+
env.Append(CCFLAGS=['/DGLEW_ENABLED'])
LIBS=['winmm','opengl32','dsound','kernel32','ole32','user32','gdi32', 'IPHLPAPI', 'wsock32', 'shell32','advapi32']
env.Append(LINKFLAGS=[p+env["LIBSUFFIX"] for p in LIBS])
@@ -228,7 +228,7 @@ def configure(env):
env.Append(CCFLAGS=['-DWINDOWS_ENABLED','-mwindows'])
env.Append(CPPFLAGS=['-DRTAUDIO_ENABLED'])
- env.Append(CCFLAGS=['-DGLES2_ENABLED','-DGLES1_ENABLED','-DGLEW_ENABLED'])
+ env.Append(CCFLAGS=['-DGLES2_ENABLED','-DGLEW_ENABLED'])
env.Append(LIBS=['mingw32','opengl32', 'dsound', 'ole32', 'd3d9','winmm','gdi32','iphlpapi','wsock32','kernel32'])
if (env["bits"]=="32" and env["mingw64_for_32"]!="yes"):
diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp
index a10152a025..4fa061886d 100644
--- a/platform/windows/os_windows.cpp
+++ b/platform/windows/os_windows.cpp
@@ -27,7 +27,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#include "drivers/gles2/rasterizer_gles2.h"
-#include "drivers/gles1/rasterizer_gles1.h"
+
#include "os_windows.h"
#include "drivers/nedmalloc/memory_pool_static_nedmalloc.h"
#include "drivers/unix/memory_pool_static_malloc.h"
@@ -56,6 +56,13 @@
#include "shlobj.h"
static const WORD MAX_CONSOLE_LINES = 1500;
+extern "C" {
+#ifdef _MSC_VER
+ _declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001;
+#else
+ __attribute__((visibility("default"))) DWORD NvOptimusEnablement = 0x00000001;
+#endif
+}
//#define STDOUT_FILE
@@ -130,11 +137,11 @@ void RedirectIOToConsole() {
int OS_Windows::get_video_driver_count() const {
- return 2;
+ return 1;
}
const char * OS_Windows::get_video_driver_name(int p_driver) const {
- return p_driver==0?"GLES2":"GLES1";
+ return "GLES2";
}
OS::VideoMode OS_Windows::get_default_video_mode() const {
diff --git a/platform/windows/platform_config.h b/platform/windows/platform_config.h
index 7bc3e42833..a7e7f9c370 100644
--- a/platform/windows/platform_config.h
+++ b/platform/windows/platform_config.h
@@ -31,5 +31,5 @@
//#include <alloca.h>
//#endif
#define GLES2_INCLUDE_H "gl_context/glew.h"
-#define GLES1_INCLUDE_H "gl_context/glew.h"
+
diff --git a/platform/x11/detect.py b/platform/x11/detect.py
index dd5fa827ff..5171bc972d 100644
--- a/platform/x11/detect.py
+++ b/platform/x11/detect.py
@@ -47,6 +47,7 @@ def get_opts():
return [
('use_llvm','Use llvm compiler','no'),
('use_sanitizer','Use llvm compiler sanitize address','no'),
+ ('pulseaudio','Detect & Use pulseaudio','yes'),
]
def get_flags():
@@ -81,6 +82,9 @@ def configure(env):
env.extra_suffix=".llvms"
else:
env.extra_suffix=".llvm"
+ if (env["colored"]=="yes"):
+ if sys.stdout.isatty():
+ env.Append(CXXFLAGS=["-fcolor-diagnostics"])
@@ -115,14 +119,15 @@ def configure(env):
env.Append(CPPFLAGS=['-DOPENGL_ENABLED','-DGLEW_ENABLED'])
env.Append(CPPFLAGS=["-DALSA_ENABLED"])
- if not os.system("pkg-config --exists libpulse-simple"):
- print("Enabling PulseAudio")
- env.Append(CPPFLAGS=["-DPULSEAUDIO_ENABLED"])
- env.ParseConfig('pkg-config --cflags --libs libpulse-simple')
- else:
- print("PulseAudio development libraries not found, disabling driver")
+ if (env["pulseaudio"]=="yes"):
+ if not os.system("pkg-config --exists libpulse-simple"):
+ print("Enabling PulseAudio")
+ env.Append(CPPFLAGS=["-DPULSEAUDIO_ENABLED"])
+ env.ParseConfig('pkg-config --cflags --libs libpulse-simple')
+ else:
+ print("PulseAudio development libraries not found, disabling driver")
- env.Append(CPPFLAGS=['-DX11_ENABLED','-DUNIX_ENABLED','-DGLES2_ENABLED','-DGLES1_ENABLED','-DGLES_OVER_GL'])
+ env.Append(CPPFLAGS=['-DX11_ENABLED','-DUNIX_ENABLED','-DGLES2_ENABLED','-DGLES_OVER_GL'])
env.Append(LIBS=['GL', 'GLU', 'pthread','asound','z']) #TODO detect linux/BSD!
#env.Append(CPPFLAGS=['-DMPC_FIXED_POINT'])
diff --git a/platform/x11/export/export.cpp b/platform/x11/export/export.cpp
index b17b92bccf..bed57fbe9f 100644
--- a/platform/x11/export/export.cpp
+++ b/platform/x11/export/export.cpp
@@ -11,7 +11,7 @@ void register_x11_exporter() {
{
Ref<EditorExportPlatformPC> exporter = Ref<EditorExportPlatformPC>( memnew(EditorExportPlatformPC) );
- exporter->set_binary_extension("bin");
+ exporter->set_binary_extension("");
exporter->set_release_binary32("linux_x11_32_release");
exporter->set_debug_binary32("linux_x11_32_debug");
exporter->set_release_binary64("linux_x11_64_release");
diff --git a/platform/x11/os_x11.cpp b/platform/x11/os_x11.cpp
index aa9e4c63c9..a40af8d2a9 100644
--- a/platform/x11/os_x11.cpp
+++ b/platform/x11/os_x11.cpp
@@ -28,7 +28,6 @@
/*************************************************************************/
#include "servers/visual/visual_server_raster.h"
#include "drivers/gles2/rasterizer_gles2.h"
-#include "drivers/gles1/rasterizer_gles1.h"
#include "os_x11.h"
#include "key_mapping_x11.h"
#include <stdio.h>
@@ -63,11 +62,11 @@
int OS_X11::get_video_driver_count() const {
- return 2;
+ return 1;
}
const char * OS_X11::get_video_driver_name(int p_driver) const {
- return p_driver==0?"GLES2":"GLES1";
+ return "GLES2";
}
OS::VideoMode OS_X11::get_default_video_mode() const {
@@ -166,10 +165,10 @@ void OS_X11::initialize(const VideoMode& p_desired,int p_video_driver,int p_audi
context_gl = memnew( ContextGL_X11( x11_display, x11_window,current_videomode, false ) );
context_gl->initialize();
- if (p_video_driver == 0) {
+ if (true) {
rasterizer = memnew( RasterizerGLES2 );
} else {
- rasterizer = memnew( RasterizerGLES1 );
+ //rasterizer = memnew( RasterizerGLES1 );
};
#endif
diff --git a/platform/x11/platform_config.h b/platform/x11/platform_config.h
index 21703969cc..f372f8c2cb 100644
--- a/platform/x11/platform_config.h
+++ b/platform/x11/platform_config.h
@@ -34,5 +34,5 @@
#endif
#define GLES2_INCLUDE_H "gl_context/glew.h"
-#define GLES1_INCLUDE_H "gl_context/glew.h"
+
diff --git a/scene/2d/canvas_item.cpp b/scene/2d/canvas_item.cpp
index f90da51eea..6b892839bb 100644
--- a/scene/2d/canvas_item.cpp
+++ b/scene/2d/canvas_item.cpp
@@ -720,6 +720,95 @@ bool CanvasItem::is_draw_behind_parent_enabled() const{
return behind;
}
+void CanvasItem::set_shader(const Ref<Shader>& p_shader) {
+
+ ERR_FAIL_COND(p_shader.is_valid() && p_shader->get_mode()!=Shader::MODE_CANVAS_ITEM);
+
+#ifdef TOOLS_ENABLED
+
+ if (shader.is_valid()) {
+ shader->disconnect("changed",this,"_shader_changed");
+ }
+#endif
+ shader=p_shader;
+
+#ifdef TOOLS_ENABLED
+
+ if (shader.is_valid()) {
+ shader->connect("changed",this,"_shader_changed");
+ }
+#endif
+
+ RID rid;
+ if (shader.is_valid())
+ rid=shader->get_rid();
+ VS::get_singleton()->canvas_item_set_shader(canvas_item,rid);
+ _change_notify(); //properties for shader exposed
+}
+
+void CanvasItem::set_use_parent_shader(bool p_use_parent_shader) {
+
+ use_parent_shader=p_use_parent_shader;
+ VS::get_singleton()->canvas_item_set_use_parent_shader(canvas_item,p_use_parent_shader);
+}
+
+bool CanvasItem::get_use_parent_shader() const{
+
+ return use_parent_shader;
+}
+
+Ref<Shader> CanvasItem::get_shader() const{
+
+ return shader;
+}
+
+void CanvasItem::set_shader_param(const StringName& p_param,const Variant& p_value) {
+
+ VS::get_singleton()->canvas_item_set_shader_param(canvas_item,p_param,p_value);
+}
+
+Variant CanvasItem::get_shader_param(const StringName& p_param) const {
+
+ return VS::get_singleton()->canvas_item_get_shader_param(canvas_item,p_param);
+}
+
+bool CanvasItem::_set(const StringName& p_name, const Variant& p_value) {
+
+ if (shader.is_valid()) {
+ StringName pr = shader->remap_param(p_name);
+ if (pr) {
+ set_shader_param(pr,p_value);
+ return true;
+ }
+ }
+ return false;
+}
+
+bool CanvasItem::_get(const StringName& p_name,Variant &r_ret) const{
+
+ if (shader.is_valid()) {
+ StringName pr = shader->remap_param(p_name);
+ if (pr) {
+ r_ret=get_shader_param(pr);
+ return true;
+ }
+ }
+ return false;
+
+}
+void CanvasItem::_get_property_list( List<PropertyInfo> *p_list) const{
+
+ if (shader.is_valid()) {
+ shader->get_param_list(p_list);
+ }
+}
+
+#ifdef TOOLS_ENABLED
+void CanvasItem::_shader_changed() {
+
+ _change_notify();
+}
+#endif
void CanvasItem::_bind_methods() {
@@ -761,7 +850,9 @@ void CanvasItem::_bind_methods() {
ObjectTypeDB::bind_method(_MD("_set_on_top","on_top"),&CanvasItem::_set_on_top);
ObjectTypeDB::bind_method(_MD("_is_on_top"),&CanvasItem::_is_on_top);
-
+#ifdef TOOLS_ENABLED
+ ObjectTypeDB::bind_method(_MD("_shader_changed"),&CanvasItem::_shader_changed);
+#endif
//ObjectTypeDB::bind_method(_MD("get_transform"),&CanvasItem::get_transform);
ObjectTypeDB::bind_method(_MD("draw_line","from","to","color","width"),&CanvasItem::draw_line,DEFVAL(1.0));
@@ -786,15 +877,22 @@ void CanvasItem::_bind_methods() {
ObjectTypeDB::bind_method(_MD("get_world_2d"),&CanvasItem::get_world_2d);
//ObjectTypeDB::bind_method(_MD("get_viewport"),&CanvasItem::get_viewport);
+ ObjectTypeDB::bind_method(_MD("set_shader","shader"),&CanvasItem::set_shader);
+ ObjectTypeDB::bind_method(_MD("get_shader"),&CanvasItem::get_shader);
+ ObjectTypeDB::bind_method(_MD("set_use_parent_shader","enable"),&CanvasItem::set_use_parent_shader);
+ ObjectTypeDB::bind_method(_MD("get_use_parent_shader"),&CanvasItem::get_use_parent_shader);
+
BIND_VMETHOD(MethodInfo("_draw"));
ADD_PROPERTY( PropertyInfo(Variant::BOOL,"visibility/visible"), _SCS("_set_visible_"),_SCS("_is_visible_") );
ADD_PROPERTY( PropertyInfo(Variant::REAL,"visibility/opacity",PROPERTY_HINT_RANGE, "0,1,0.01"), _SCS("set_opacity"),_SCS("get_opacity") );
ADD_PROPERTY( PropertyInfo(Variant::REAL,"visibility/self_opacity",PROPERTY_HINT_RANGE, "0,1,0.01"), _SCS("set_self_opacity"),_SCS("get_self_opacity") );
- ADD_PROPERTY( PropertyInfo(Variant::BOOL,"visibility/behind_parent"), _SCS("set_draw_behind_parent"),_SCS("is_draw_behind_parent_enabled") );
+ ADD_PROPERTYNZ( PropertyInfo(Variant::BOOL,"visibility/behind_parent"), _SCS("set_draw_behind_parent"),_SCS("is_draw_behind_parent_enabled") );
ADD_PROPERTY( PropertyInfo(Variant::BOOL,"visibility/on_top",PROPERTY_HINT_NONE,"",0), _SCS("_set_on_top"),_SCS("_is_on_top") ); //compatibility
ADD_PROPERTYNZ( PropertyInfo(Variant::INT,"visibility/blend_mode",PROPERTY_HINT_ENUM, "Mix,Add,Sub,Mul,PMAlpha"), _SCS("set_blend_mode"),_SCS("get_blend_mode") );
+ ADD_PROPERTYNZ( PropertyInfo(Variant::OBJECT,"shader/shader",PROPERTY_HINT_RESOURCE_TYPE, "CanvasItemShader,CanvasItemShaderGraph"), _SCS("set_shader"),_SCS("get_shader") );
+ ADD_PROPERTYNZ( PropertyInfo(Variant::BOOL,"shader/use_parent"), _SCS("set_use_parent_shader"),_SCS("get_use_parent_shader") );
//exporting these two things doesn't really make much sense i think
//ADD_PROPERTY( PropertyInfo(Variant::BOOL,"transform/toplevel"), _SCS("set_as_toplevel"),_SCS("is_set_as_toplevel") );
//ADD_PROPERTY(PropertyInfo(Variant::BOOL,"transform/notify"),_SCS("set_transform_notify"),_SCS("is_transform_notify_enabled"));
@@ -871,6 +969,7 @@ CanvasItem::CanvasItem() : xform_change(this) {
block_transform_notify=false;
// viewport=NULL;
canvas_layer=NULL;
+ use_parent_shader=false;
global_invalid=true;
C=NULL;
diff --git a/scene/2d/canvas_item.h b/scene/2d/canvas_item.h
index dbf8fd79e9..ed3ade9df2 100644
--- a/scene/2d/canvas_item.h
+++ b/scene/2d/canvas_item.h
@@ -32,6 +32,7 @@
#include "scene/main/node.h"
#include "scene/resources/texture.h"
#include "scene/main/scene_main_loop.h"
+#include "scene/resources/shader.h"
class CanvasLayer;
class Viewport;
@@ -80,6 +81,9 @@ private:
bool block_transform_notify;
bool behind;
+ bool use_parent_shader;
+ Ref<Shader> shader;
+
mutable Matrix32 global_transform;
mutable bool global_invalid;
@@ -99,8 +103,9 @@ private:
void _queue_sort_children();
void _sort_children();
-
-
+#ifdef TOOLS_ENABLED
+ void _shader_changed();
+#endif
void _notify_transform(CanvasItem *p_node);
void _set_on_top(bool p_on_top) { set_draw_behind_parent(!p_on_top); }
@@ -108,6 +113,9 @@ private:
protected:
+ bool _set(const StringName& p_name, const Variant& p_value);
+ bool _get(const StringName& p_name,Variant &r_ret) const;
+ void _get_property_list( List<PropertyInfo> *p_list) const;
_FORCE_INLINE_ void _notify_transform() { if (!is_inside_tree()) return; _notify_transform(this); if (!block_transform_notify) notification(NOTIFICATION_LOCAL_TRANSFORM_CHANGED); }
@@ -204,7 +212,14 @@ public:
RID get_canvas() const;
Ref<World2D> get_world_2d() const;
+ void set_shader(const Ref<Shader>& p_shader);
+ Ref<Shader> get_shader() const;
+
+ void set_use_parent_shader(bool p_use_parent_shader);
+ bool get_use_parent_shader() const;
+ void set_shader_param(const StringName& p_param,const Variant& p_value);
+ Variant get_shader_param(const StringName& p_param) const;
CanvasItem();
~CanvasItem();
diff --git a/scene/2d/node_2d.cpp b/scene/2d/node_2d.cpp
index 6dcee3458f..8b4196ee7f 100644
--- a/scene/2d/node_2d.cpp
+++ b/scene/2d/node_2d.cpp
@@ -289,6 +289,35 @@ void Node2D::set_global_transform(const Matrix32& p_transform) {
}
+void Node2D::set_z(int p_z) {
+
+ ERR_FAIL_COND(p_z<VS::CANVAS_ITEM_Z_MIN);
+ ERR_FAIL_COND(p_z>VS::CANVAS_ITEM_Z_MAX);
+ z=p_z;
+ VS::get_singleton()->canvas_item_set_z(get_canvas_item(),z);
+
+}
+
+void Node2D::set_z_as_relative(bool p_enabled) {
+
+ if (z_relative==p_enabled)
+ return;
+ z_relative=p_enabled;
+ VS::get_singleton()->canvas_item_set_z_as_relative_to_parent(get_canvas_item(),p_enabled);
+}
+
+bool Node2D::is_z_relative() const {
+
+ return z_relative;
+}
+
+
+int Node2D::get_z() const{
+
+ return z;
+}
+
+
void Node2D::_bind_methods() {
@@ -308,18 +337,25 @@ void Node2D::_bind_methods() {
ObjectTypeDB::bind_method(_MD("move_local_x","delta","scaled"),&Node2D::move_x,DEFVAL(false));
ObjectTypeDB::bind_method(_MD("move_local_y","delta","scaled"),&Node2D::move_y,DEFVAL(false));
+ ObjectTypeDB::bind_method(_MD("set_global_pos","pos"),&Node2D::set_global_pos);
ObjectTypeDB::bind_method(_MD("get_global_pos"),&Node2D::get_global_pos);
- ObjectTypeDB::bind_method(_MD("set_global_pos"),&Node2D::set_global_pos);
ObjectTypeDB::bind_method(_MD("set_transform","xform"),&Node2D::set_transform);
ObjectTypeDB::bind_method(_MD("set_global_transform","xform"),&Node2D::set_global_transform);
+ ObjectTypeDB::bind_method(_MD("set_z","z"),&Node2D::set_z);
+ ObjectTypeDB::bind_method(_MD("get_z"),&Node2D::get_z);
+
+ ObjectTypeDB::bind_method(_MD("set_z_as_relative","enable"),&Node2D::set_z_as_relative);
+ ObjectTypeDB::bind_method(_MD("is_z_relative"),&Node2D::is_z_relative);
+
ObjectTypeDB::bind_method(_MD("edit_set_pivot"),&Node2D::edit_set_pivot);
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2,"transform/pos"),_SCS("set_pos"),_SCS("get_pos"));
ADD_PROPERTY(PropertyInfo(Variant::REAL,"transform/rot",PROPERTY_HINT_RANGE,"-1440,1440,0.1"),_SCS("_set_rotd"),_SCS("_get_rotd"));
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2,"transform/scale"),_SCS("set_scale"),_SCS("get_scale"));
-
+ ADD_PROPERTY(PropertyInfo(Variant::INT,"z/z",PROPERTY_HINT_RANGE,itos(VS::CANVAS_ITEM_Z_MIN)+","+itos(VS::CANVAS_ITEM_Z_MAX)+",1"),_SCS("set_z"),_SCS("get_z"));
+ ADD_PROPERTY(PropertyInfo(Variant::BOOL,"z/relative"),_SCS("set_z_as_relative"),_SCS("is_z_relative"));
}
@@ -331,6 +367,8 @@ Node2D::Node2D() {
angle=0;
scale=Vector2(1,1);
_xform_dirty=false;
+ z=0;
+ z_relative=true;
}
diff --git a/scene/2d/node_2d.h b/scene/2d/node_2d.h
index 582c56fa9b..61b8c829d6 100644
--- a/scene/2d/node_2d.h
+++ b/scene/2d/node_2d.h
@@ -38,6 +38,8 @@ class Node2D : public CanvasItem {
Point2 pos;
float angle;
Size2 scale;
+ int z;
+ bool z_relative;
Matrix32 _mat;
@@ -85,6 +87,11 @@ public:
void set_global_transform(const Matrix32& p_transform);
void set_global_pos(const Point2& p_pos);
+ void set_z(int p_z);
+ int get_z() const;
+
+ void set_z_as_relative(bool p_enabled);
+ bool is_z_relative() const;
Matrix32 get_transform() const;
diff --git a/scene/2d/physics_body_2d.cpp b/scene/2d/physics_body_2d.cpp
index 2413fbded1..6f18325212 100644
--- a/scene/2d/physics_body_2d.cpp
+++ b/scene/2d/physics_body_2d.cpp
@@ -43,13 +43,44 @@ void PhysicsBody2D::_notification(int p_what) {
*/
}
+void PhysicsBody2D::set_one_way_collision_direction(const Vector2& p_dir) {
+
+ one_way_collision_direction=p_dir;
+ Physics2DServer::get_singleton()->body_set_one_way_collision_direction(get_rid(),p_dir);
+}
+
+Vector2 PhysicsBody2D::get_one_way_collision_direction() const{
+
+ return one_way_collision_direction;
+}
+
+
+void PhysicsBody2D::set_one_way_collision_max_depth(float p_depth) {
+
+ one_way_collision_max_depth=p_depth;
+ Physics2DServer::get_singleton()->body_set_one_way_collision_max_depth(get_rid(),p_depth);
+
+}
+
+float PhysicsBody2D::get_one_way_collision_max_depth() const{
+
+ return one_way_collision_max_depth;
+}
+
+
void PhysicsBody2D::_bind_methods() {
ObjectTypeDB::bind_method(_MD("set_layer_mask","mask"),&PhysicsBody2D::set_layer_mask);
ObjectTypeDB::bind_method(_MD("get_layer_mask"),&PhysicsBody2D::get_layer_mask);
+ ObjectTypeDB::bind_method(_MD("set_one_way_collision_direction","dir"),&PhysicsBody2D::set_one_way_collision_direction);
+ ObjectTypeDB::bind_method(_MD("get_one_way_collision_direction"),&PhysicsBody2D::get_one_way_collision_direction);
+ ObjectTypeDB::bind_method(_MD("set_one_way_collision_max_depth","depth"),&PhysicsBody2D::set_one_way_collision_max_depth);
+ ObjectTypeDB::bind_method(_MD("get_one_way_collision_max_depth"),&PhysicsBody2D::get_one_way_collision_max_depth);
ObjectTypeDB::bind_method(_MD("add_collision_exception_with","body:PhysicsBody2D"),&PhysicsBody2D::add_collision_exception_with);
ObjectTypeDB::bind_method(_MD("remove_collision_exception_with","body:PhysicsBody2D"),&PhysicsBody2D::remove_collision_exception_with);
ADD_PROPERTY(PropertyInfo(Variant::INT,"layers",PROPERTY_HINT_ALL_FLAGS),_SCS("set_layer_mask"),_SCS("get_layer_mask"));
+ ADD_PROPERTYNZ(PropertyInfo(Variant::VECTOR2,"one_way_collision/direction"),_SCS("set_one_way_collision_direction"),_SCS("get_one_way_collision_direction"));
+ ADD_PROPERTYNZ(PropertyInfo(Variant::REAL,"one_way_collision/max_depth"),_SCS("set_one_way_collision_max_depth"),_SCS("get_one_way_collision_max_depth"));
}
void PhysicsBody2D::set_layer_mask(uint32_t p_mask) {
@@ -66,6 +97,7 @@ uint32_t PhysicsBody2D::get_layer_mask() const {
PhysicsBody2D::PhysicsBody2D(Physics2DServer::BodyMode p_mode) : CollisionObject2D( Physics2DServer::get_singleton()->body_create(p_mode), false) {
mask=1;
+ set_one_way_collision_max_depth(0);
}
@@ -932,7 +964,7 @@ Vector2 KinematicBody2D::move(const Vector2& p_motion) {
//if (d<margin)
/// continue;
- recover_motion+=(b-a)*0.2;
+ recover_motion+=(b-a)*0.4;
}
if (recover_motion==Vector2()) {
@@ -963,6 +995,7 @@ Vector2 KinematicBody2D::move(const Vector2& p_motion) {
bool valid = dss->cast_motion(get_shape(i)->get_rid(), get_global_transform() * get_shape_transform(i), p_motion, 0,lsafe,lunsafe,exclude,get_layer_mask(),mask);
//print_line("shape: "+itos(i)+" travel:"+rtos(ltravel));
if (!valid) {
+
safe=0;
unsafe=0;
best_shape=i; //sadly it's the best
@@ -994,9 +1027,11 @@ Vector2 KinematicBody2D::move(const Vector2& p_motion) {
bool c2 = dss->rest_info(get_shape(best_shape)->get_rid(), ugt*get_shape_transform(best_shape), Vector2(), margin,&rest_info,exclude,get_layer_mask(),mask);
if (!c2) {
//should not happen, but floating point precision is so weird..
+
colliding=false;
} else {
+
//print_line("Travel: "+rtos(travel));
colliding=true;
collision=rest_info.point;
diff --git a/scene/2d/physics_body_2d.h b/scene/2d/physics_body_2d.h
index 956999ce31..eed43c95be 100644
--- a/scene/2d/physics_body_2d.h
+++ b/scene/2d/physics_body_2d.h
@@ -39,6 +39,8 @@ class PhysicsBody2D : public CollisionObject2D {
OBJ_TYPE(PhysicsBody2D,CollisionObject2D);
uint32_t mask;
+ Vector2 one_way_collision_direction;
+ float one_way_collision_max_depth;
protected:
void _notification(int p_what);
@@ -53,6 +55,12 @@ public:
void add_collision_exception_with(Node* p_node); //must be physicsbody
void remove_collision_exception_with(Node* p_node);
+ void set_one_way_collision_direction(const Vector2& p_dir);
+ Vector2 get_one_way_collision_direction() const;
+
+ void set_one_way_collision_max_depth(float p_dir);
+ float get_one_way_collision_max_depth() const;
+
PhysicsBody2D();
};
diff --git a/scene/3d/physics_body.cpp b/scene/3d/physics_body.cpp
index f2806f2af2..940a29b5d8 100644
--- a/scene/3d/physics_body.cpp
+++ b/scene/3d/physics_body.cpp
@@ -92,6 +92,7 @@ void PhysicsBody::remove_collision_exception_with(Node* p_node) {
PhysicsServer::get_singleton()->body_remove_collision_exception(get_rid(),physics_body->get_rid());
}
+
void PhysicsBody::_bind_methods() {
ObjectTypeDB::bind_method(_MD("set_layer_mask","mask"),&PhysicsBody::set_layer_mask);
ObjectTypeDB::bind_method(_MD("get_layer_mask"),&PhysicsBody::get_layer_mask);
diff --git a/scene/3d/physics_body.h b/scene/3d/physics_body.h
index 0d1de7f236..beec01ff3a 100644
--- a/scene/3d/physics_body.h
+++ b/scene/3d/physics_body.h
@@ -56,6 +56,8 @@ public:
void add_collision_exception_with(Node* p_node); //must be physicsbody
void remove_collision_exception_with(Node* p_node);
+
+
PhysicsBody();
};
diff --git a/scene/animation/tween.cpp b/scene/animation/tween.cpp
index f668e52590..8b87ecf711 100644
--- a/scene/animation/tween.cpp
+++ b/scene/animation/tween.cpp
@@ -138,7 +138,8 @@ void Tween::_bind_methods() {
ObjectTypeDB::bind_method(_MD("interpolate_property","object","property","initial_val","final_val","times_in_sec","trans_type","ease_type","delay"),&Tween::interpolate_property, DEFVAL(0) );
ObjectTypeDB::bind_method(_MD("interpolate_method","object","method","initial_val","final_val","times_in_sec","trans_type","ease_type","delay"),&Tween::interpolate_method, DEFVAL(0) );
- ObjectTypeDB::bind_method(_MD("interpolate_callback","object","times_in_sec","callback","args"),&Tween::interpolate_callback, DEFVAL(Variant()) );
+ ObjectTypeDB::bind_method(_MD("interpolate_callback","object","times_in_sec","callback","arg1", "arg2","arg3","arg4","arg5"),&Tween::interpolate_callback, DEFVAL(Variant()), DEFVAL(Variant()), DEFVAL(Variant()), DEFVAL(Variant()), DEFVAL(Variant()) );
+ ObjectTypeDB::bind_method(_MD("interpolate_deferred_callback","object","times_in_sec","callback","arg1","arg2","arg3","arg4","arg5"),&Tween::interpolate_deferred_callback, DEFVAL(Variant()), DEFVAL(Variant()), DEFVAL(Variant()), DEFVAL(Variant()), DEFVAL(Variant()) );
ObjectTypeDB::bind_method(_MD("follow_property","object","property","initial_val","target","target_property","times_in_sec","trans_type","ease_type","delay"),&Tween::follow_property, DEFVAL(0) );
ObjectTypeDB::bind_method(_MD("follow_method","object","method","initial_val","target","target_method","times_in_sec","trans_type","ease_type","delay"),&Tween::follow_method, DEFVAL(0) );
ObjectTypeDB::bind_method(_MD("targeting_property","object","property","initial","initial_val","final_val","times_in_sec","trans_type","ease_type","delay"),&Tween::targeting_property, DEFVAL(0) );
@@ -513,11 +514,33 @@ void Tween::_tween_process(float p_delta) {
if(data.finish) {
Variant::CallError error;
- if (data.arg.get_type() != Variant::NIL) {
- Variant *arg[1] = { &data.arg };
- object->call(data.key, (const Variant **) arg, 1, error);
- } else {
- object->call(data.key, NULL, 0, error);
+ if (data.call_deferred) {
+
+ switch (data.args) {
+ case 0:
+ object->call_deferred(data.key); break;
+ case 1:
+ object->call_deferred(data.key, data.arg[0]); break;
+ case 2:
+ object->call_deferred(data.key, data.arg[0], data.arg[1]); break;
+ case 3:
+ object->call_deferred(data.key, data.arg[0], data.arg[1], data.arg[2]); break;
+ case 4:
+ object->call_deferred(data.key, data.arg[0], data.arg[1], data.arg[2], data.arg[3]); break;
+ case 5:
+ object->call_deferred(data.key, data.arg[0], data.arg[1], data.arg[2], data.arg[3], data.arg[4]); break;
+ }
+
+ }
+ else {
+ Variant *arg[5] = {
+ &data.arg[0],
+ &data.arg[1],
+ &data.arg[2],
+ &data.arg[3],
+ &data.arg[4],
+ };
+ object->call(data.key, (const Variant **) arg, data.args, error);
}
}
continue;
@@ -1003,7 +1026,58 @@ bool Tween::interpolate_method(Object *p_object
bool Tween::interpolate_callback(Object *p_object
, real_t p_times_in_sec
, String p_callback
- , Variant p_arg
+ , VARIANT_ARG_DECLARE
+) {
+
+ ERR_FAIL_COND_V(pending_update != 0, false);
+ ERR_FAIL_COND_V(p_object == NULL, false);
+ ERR_FAIL_COND_V(p_times_in_sec < 0, false);
+
+ ERR_FAIL_COND_V(!p_object->has_method(p_callback), false);
+
+ InterpolateData data;
+ data.active = true;
+ data.type = INTER_CALLBACK;
+ data.finish = false;
+ data.call_deferred = false;
+ data.elapsed = 0;
+
+ data.id = p_object->get_instance_ID();
+ data.key = p_callback;
+ data.times_in_sec = p_times_in_sec;
+ data.delay = 0;
+
+ int args=0;
+ if (p_arg5.get_type()!=Variant::NIL)
+ args=5;
+ else if (p_arg4.get_type()!=Variant::NIL)
+ args=4;
+ else if (p_arg3.get_type()!=Variant::NIL)
+ args=3;
+ else if (p_arg2.get_type()!=Variant::NIL)
+ args=2;
+ else if (p_arg1.get_type()!=Variant::NIL)
+ args=1;
+ else
+ args=0;
+
+ data.args = args;
+ data.arg[0] = p_arg1;
+ data.arg[1] = p_arg2;
+ data.arg[2] = p_arg3;
+ data.arg[3] = p_arg4;
+ data.arg[4] = p_arg5;
+
+ pending_update ++;
+ interpolates.push_back(data);
+ pending_update --;
+ return true;
+}
+
+bool Tween::interpolate_deferred_callback(Object *p_object
+ , real_t p_times_in_sec
+ , String p_callback
+ , VARIANT_ARG_DECLARE
) {
ERR_FAIL_COND_V(pending_update != 0, false);
@@ -1016,13 +1090,34 @@ bool Tween::interpolate_callback(Object *p_object
data.active = true;
data.type = INTER_CALLBACK;
data.finish = false;
+ data.call_deferred = true;
data.elapsed = 0;
data.id = p_object->get_instance_ID();
data.key = p_callback;
data.times_in_sec = p_times_in_sec;
data.delay = 0;
- data.arg = p_arg;
+
+ int args=0;
+ if (p_arg5.get_type()!=Variant::NIL)
+ args=5;
+ else if (p_arg4.get_type()!=Variant::NIL)
+ args=4;
+ else if (p_arg3.get_type()!=Variant::NIL)
+ args=3;
+ else if (p_arg2.get_type()!=Variant::NIL)
+ args=2;
+ else if (p_arg1.get_type()!=Variant::NIL)
+ args=1;
+ else
+ args=0;
+
+ data.args = args;
+ data.arg[0] = p_arg1;
+ data.arg[1] = p_arg2;
+ data.arg[2] = p_arg3;
+ data.arg[3] = p_arg4;
+ data.arg[4] = p_arg5;
pending_update ++;
interpolates.push_back(data);
diff --git a/scene/animation/tween.h b/scene/animation/tween.h
index 3e23cc362a..d34c9e6ba2 100644
--- a/scene/animation/tween.h
+++ b/scene/animation/tween.h
@@ -83,6 +83,7 @@ private:
bool active;
InterpolateType type;
bool finish;
+ bool call_deferred;
real_t elapsed;
ObjectID id;
StringName key;
@@ -95,7 +96,8 @@ private:
TransitionType trans_type;
EaseType ease_type;
real_t delay;
- Variant arg;
+ int args;
+ Variant arg[5];
};
String autoplay;
@@ -178,10 +180,16 @@ public:
, real_t p_delay = 0
);
- bool interpolate_callback(Object *p_node
+ bool interpolate_callback(Object *p_object
, real_t p_times_in_sec
, String p_callback
- , Variant p_arg = Variant()
+ , VARIANT_ARG_DECLARE
+ );
+
+ bool interpolate_deferred_callback(Object *p_object
+ , real_t p_times_in_sec
+ , String p_callback
+ , VARIANT_ARG_DECLARE
);
bool follow_property(Object *p_node
diff --git a/scene/gui/file_dialog.cpp b/scene/gui/file_dialog.cpp
index a7ff1431bd..fbcfdb69bb 100644
--- a/scene/gui/file_dialog.cpp
+++ b/scene/gui/file_dialog.cpp
@@ -156,7 +156,6 @@ void FileDialog::_action_pressed() {
if (mode==MODE_SAVE_FILE) {
- String ext = f.extension();
bool valid=false;
if (filter->get_selected()==filter->get_item_count()-1) {
@@ -184,7 +183,8 @@ void FileDialog::_action_pressed() {
if (idx>=0 && idx<filters.size()) {
String flt=filters[idx].get_slice(";",0);
- for (int j=0;j<flt.get_slice_count(",");j++) {
+ int filterSliceCount=flt.get_slice_count(",");
+ for (int j=0;j<filterSliceCount;j++) {
String str = (flt.get_slice(",",j).strip_edges());
if (f.match(str)) {
@@ -192,6 +192,13 @@ void FileDialog::_action_pressed() {
break;
}
}
+
+ if (!valid && filterSliceCount>0) {
+ String str = (flt.get_slice(",",0).strip_edges());
+ f+=str.substr(1, str.length()-1);
+ file->set_text(f.get_file());
+ valid=true;
+ }
} else {
valid=true;
}
diff --git a/scene/gui/graph_edit.cpp b/scene/gui/graph_edit.cpp
index 957e63e3ce..3cd0dd3d16 100644
--- a/scene/gui/graph_edit.cpp
+++ b/scene/gui/graph_edit.cpp
@@ -1,5 +1,6 @@
#include "graph_edit.h"
-
+#include "os/input.h"
+#include "os/keyboard.h"
bool GraphEditFilter::has_point(const Point2& p_point) const {
return ge->_filter_input(p_point);
@@ -53,7 +54,7 @@ void GraphEdit::disconnect_node(const StringName& p_from, int p_from_port,const
}
}
-void GraphEdit::get_connection_list(List<Connection> *r_connections) {
+void GraphEdit::get_connection_list(List<Connection> *r_connections) const {
*r_connections=connections;
}
@@ -88,7 +89,6 @@ void GraphEdit::_update_scroll() {
updating=true;
Rect2 screen;
- screen.size=get_size();
for(int i=0;i<get_child_count();i++) {
GraphNode *gn=get_child(i)->cast_to<GraphNode>();
@@ -101,6 +101,10 @@ void GraphEdit::_update_scroll() {
screen = screen.merge(r);
}
+ screen.pos-=get_size();
+ screen.size+=get_size()*2.0;
+
+
h_scroll->set_min(screen.pos.x);
h_scroll->set_max(screen.pos.x+screen.size.x);
h_scroll->set_page(get_size().x);
@@ -265,6 +269,37 @@ void GraphEdit::_top_layer_input(const InputEvent& p_ev) {
Vector2 pos = gn->get_connection_input_pos(j)+gn->get_pos();
if (pos.distance_to(mpos)<grab_r) {
+
+ if (right_disconnects) {
+ //check disconnect
+ for (List<Connection>::Element*E=connections.front();E;E=E->next()) {
+
+ if (E->get().to==gn->get_name() && E->get().to_port==j) {
+
+ Node*fr = get_node(String(E->get().from));
+ if (fr && fr->cast_to<GraphNode>()) {
+
+ connecting_from=E->get().from;
+ connecting_index=E->get().from_port;
+ connecting_out=true;
+ connecting_type=fr->cast_to<GraphNode>()->get_connection_output_type(E->get().from_port);
+ connecting_color=fr->cast_to<GraphNode>()->get_connection_output_color(E->get().from_port);
+ connecting_target=false;
+ connecting_to=pos;
+
+ emit_signal("disconnection_request",E->get().from,E->get().from_port,E->get().to,E->get().to_port);
+ fr = get_node(String(connecting_from)); //maybe it was erased
+ if (fr && fr->cast_to<GraphNode>()) {
+ connecting=true;
+ }
+ return;
+ }
+
+ }
+ }
+ }
+
+
connecting=true;
connecting_from=gn->get_name();
connecting_index=j;
@@ -461,7 +496,7 @@ void GraphEdit::_top_layer_draw() {
void GraphEdit::_input_event(const InputEvent& p_ev) {
- if (p_ev.type==InputEvent::MOUSE_MOTION && p_ev.mouse_motion.button_mask&BUTTON_MASK_MIDDLE) {
+ if (p_ev.type==InputEvent::MOUSE_MOTION && (p_ev.mouse_motion.button_mask&BUTTON_MASK_MIDDLE || (p_ev.mouse_motion.button_mask&BUTTON_MASK_LEFT && Input::get_singleton()->is_key_pressed(KEY_SPACE)))) {
h_scroll->set_val( h_scroll->get_val() - p_ev.mouse_motion.relative_x );
v_scroll->set_val( v_scroll->get_val() - p_ev.mouse_motion.relative_y );
}
@@ -474,11 +509,41 @@ void GraphEdit::clear_connections() {
}
+void GraphEdit::set_right_disconnects(bool p_enable) {
+
+ right_disconnects=p_enable;
+}
+
+bool GraphEdit::is_right_disconnects_enabled() const{
+
+ return right_disconnects;
+}
+
+Array GraphEdit::_get_connection_list() const {
+
+ List<Connection> conns;
+ get_connection_list(&conns);
+ Array arr;
+ for(List<Connection>::Element *E=conns.front();E;E=E->next()) {
+ Dictionary d;
+ d["from"]=E->get().from;
+ d["from_port"]=E->get().from_port;
+ d["to"]=E->get().to;
+ d["to_port"]=E->get().to_port;
+ arr.push_back(d);
+ }
+ return arr;
+}
void GraphEdit::_bind_methods() {
ObjectTypeDB::bind_method(_MD("connect_node:Error","from","from_port","to","to_port"),&GraphEdit::connect_node);
ObjectTypeDB::bind_method(_MD("is_node_connected","from","from_port","to","to_port"),&GraphEdit::is_node_connected);
ObjectTypeDB::bind_method(_MD("disconnect_node","from","from_port","to","to_port"),&GraphEdit::disconnect_node);
+ ObjectTypeDB::bind_method(_MD("get_connection_list"),&GraphEdit::_get_connection_list);
+
+ ObjectTypeDB::bind_method(_MD("set_right_disconnects","enable"),&GraphEdit::set_right_disconnects);
+ ObjectTypeDB::bind_method(_MD("is_right_disconnects_enabled"),&GraphEdit::is_right_disconnects_enabled);
+
ObjectTypeDB::bind_method(_MD("_graph_node_moved"),&GraphEdit::_graph_node_moved);
ObjectTypeDB::bind_method(_MD("_graph_node_raised"),&GraphEdit::_graph_node_raised);
@@ -489,9 +554,12 @@ void GraphEdit::_bind_methods() {
ObjectTypeDB::bind_method(_MD("_input_event"),&GraphEdit::_input_event);
ADD_SIGNAL(MethodInfo("connection_request",PropertyInfo(Variant::STRING,"from"),PropertyInfo(Variant::INT,"from_slot"),PropertyInfo(Variant::STRING,"to"),PropertyInfo(Variant::INT,"to_slot")));
+ ADD_SIGNAL(MethodInfo("disconnection_request",PropertyInfo(Variant::STRING,"from"),PropertyInfo(Variant::INT,"from_slot"),PropertyInfo(Variant::STRING,"to"),PropertyInfo(Variant::INT,"to_slot")));
}
+
+
GraphEdit::GraphEdit() {
top_layer=NULL;
top_layer=memnew(GraphEditFilter(this));
@@ -511,6 +579,7 @@ GraphEdit::GraphEdit() {
top_layer->add_child(v_scroll);
updating=false;
connecting=false;
+ right_disconnects=false;
h_scroll->connect("value_changed", this,"_scroll_moved");
v_scroll->connect("value_changed", this,"_scroll_moved");
diff --git a/scene/gui/graph_edit.h b/scene/gui/graph_edit.h
index f8a2f3fee7..0a9da73ab6 100644
--- a/scene/gui/graph_edit.h
+++ b/scene/gui/graph_edit.h
@@ -51,6 +51,7 @@ private:
+ bool right_disconnects;
bool updating;
List<Connection> connections;
@@ -68,6 +69,8 @@ private:
void _top_layer_draw();
void _update_scroll_offset();
+ Array _get_connection_list() const;
+
friend class GraphEditFilter;
bool _filter_input(const Point2& p_point);
protected:
@@ -84,7 +87,11 @@ public:
void disconnect_node(const StringName& p_from, int p_from_port,const StringName& p_to,int p_to_port);
void clear_connections();
- void get_connection_list(List<Connection> *r_connections);
+ GraphEditFilter *get_top_layer() const { return top_layer; }
+ void get_connection_list(List<Connection> *r_connections) const;
+
+ void set_right_disconnects(bool p_enable);
+ bool is_right_disconnects_enabled() const;
GraphEdit();
diff --git a/scene/gui/graph_node.cpp b/scene/gui/graph_node.cpp
index 50ee9abcf8..444b37855f 100644
--- a/scene/gui/graph_node.cpp
+++ b/scene/gui/graph_node.cpp
@@ -1,4 +1,5 @@
#include "graph_node.h"
+#include "method_bind_ext.inc"
bool GraphNode::_set(const StringName& p_name, const Variant& p_value) {
@@ -38,9 +39,8 @@ bool GraphNode::_set(const StringName& p_name, const Variant& p_value) {
bool GraphNode::_get(const StringName& p_name,Variant &r_ret) const{
- print_line("get "+p_name.operator String());
- if (!p_name.operator String().begins_with("slot/")) {
- print_line("no begins");
+
+ if (!p_name.operator String().begins_with("slot/")) {
return false;
}
@@ -68,7 +68,6 @@ bool GraphNode::_get(const StringName& p_name,Variant &r_ret) const{
else
return false;
- print_line("ask for: "+p_name.operator String()+" get: "+String(r_ret));
return true;
}
void GraphNode::_get_property_list( List<PropertyInfo> *p_list) const{
@@ -540,6 +539,30 @@ void GraphNode::_bind_methods() {
ObjectTypeDB::bind_method(_MD("get_title"),&GraphNode::get_title);
ObjectTypeDB::bind_method(_MD("_input_event"),&GraphNode::_input_event);
+ ObjectTypeDB::bind_method(_MD("set_slot","idx","enable_left","type_left","color_left","enable_right","type_right","color_right"),&GraphNode::set_slot);
+ ObjectTypeDB::bind_method(_MD("clear_slot","idx"),&GraphNode::clear_slot);
+ ObjectTypeDB::bind_method(_MD("clear_all_slots","idx"),&GraphNode::clear_all_slots);
+ ObjectTypeDB::bind_method(_MD("is_slot_enabled_left","idx"),&GraphNode::is_slot_enabled_left);
+ ObjectTypeDB::bind_method(_MD("get_slot_type_left","idx"),&GraphNode::get_slot_type_left);
+ ObjectTypeDB::bind_method(_MD("get_slot_color_left","idx"),&GraphNode::get_slot_color_left);
+ ObjectTypeDB::bind_method(_MD("is_slot_enabled_right","idx"),&GraphNode::is_slot_enabled_right);
+ ObjectTypeDB::bind_method(_MD("get_slot_type_right","idx"),&GraphNode::get_slot_type_right);
+ ObjectTypeDB::bind_method(_MD("get_slot_color_right","idx"),&GraphNode::get_slot_color_right);
+
+ ObjectTypeDB::bind_method(_MD("set_offset","offset"),&GraphNode::set_offset);
+ ObjectTypeDB::bind_method(_MD("get_offset"),&GraphNode::get_offset);
+
+ ObjectTypeDB::bind_method(_MD("get_connection_output_count"),&GraphNode::get_connection_output_count);
+ ObjectTypeDB::bind_method(_MD("get_connection_input_count"),&GraphNode::get_connection_input_count);
+
+ ObjectTypeDB::bind_method(_MD("get_connection_output_pos","idx"),&GraphNode::get_connection_output_pos);
+ ObjectTypeDB::bind_method(_MD("get_connection_output_type","idx"),&GraphNode::get_connection_output_type);
+ ObjectTypeDB::bind_method(_MD("get_connection_output_color","idx"),&GraphNode::get_connection_output_color);
+ ObjectTypeDB::bind_method(_MD("get_connection_input_pos","idx"),&GraphNode::get_connection_input_pos);
+ ObjectTypeDB::bind_method(_MD("get_connection_input_type","idx"),&GraphNode::get_connection_input_type);
+ ObjectTypeDB::bind_method(_MD("get_connection_input_color","idx"),&GraphNode::get_connection_input_color);
+
+
ObjectTypeDB::bind_method(_MD("set_show_close_button","show"),&GraphNode::set_show_close_button);
ObjectTypeDB::bind_method(_MD("is_close_button_visible"),&GraphNode::is_close_button_visible);
diff --git a/scene/gui/grid_container.cpp b/scene/gui/grid_container.cpp
index f54345cdb8..582693eb3a 100644
--- a/scene/gui/grid_container.cpp
+++ b/scene/gui/grid_container.cpp
@@ -226,5 +226,6 @@ Size2 GridContainer::get_minimum_size() const {
GridContainer::GridContainer() {
+ set_stop_mouse(false);
columns=1;
}
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp
index d589b93049..8855627bb4 100644
--- a/scene/gui/text_edit.cpp
+++ b/scene/gui/text_edit.cpp
@@ -298,7 +298,7 @@ void TextEdit::_update_scrollbars() {
int hscroll_rows = ((hmin.height-1)/get_row_height())+1;
int visible_rows = get_visible_rows();
- int total_rows = text.size() * cache.line_spacing;
+ int total_rows = text.size();
int vscroll_pixels = v_scroll->get_combined_minimum_size().width;
int visible_width = size.width - cache.style_normal->get_minimum_size().width;
diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp
index b7b52a39dc..035dbb8cc4 100644
--- a/scene/gui/tree.cpp
+++ b/scene/gui/tree.cpp
@@ -2472,6 +2472,10 @@ void Tree::_notification(int p_what) {
}
}
+ if (p_what==NOTIFICATION_THEME_CHANGED) {
+ update_cache();
+ }
+
}
diff --git a/scene/register_scene_types.cpp b/scene/register_scene_types.cpp
index cf49979118..9d907391ec 100644
--- a/scene/register_scene_types.cpp
+++ b/scene/register_scene_types.cpp
@@ -272,7 +272,7 @@ void register_scene_types() {
ObjectTypeDB::register_type<Control>();
// ObjectTypeDB::register_type<EmptyControl>();
- ObjectTypeDB::add_compatibility_type("EmptyControl","control");
+ ObjectTypeDB::add_compatibility_type("EmptyControl","Control");
ObjectTypeDB::register_type<Button>();
ObjectTypeDB::register_type<Label>();
ObjectTypeDB::register_type<HScrollBar>();
@@ -496,16 +496,17 @@ void register_scene_types() {
/* REGISTER RESOURCES */
+ ObjectTypeDB::register_virtual_type<Shader>();
+ ObjectTypeDB::register_virtual_type<ShaderGraph>();
+ ObjectTypeDB::register_type<CanvasItemShader>();
+ ObjectTypeDB::register_type<CanvasItemShaderGraph>();
+
#ifndef _3D_DISABLED
ObjectTypeDB::register_type<Mesh>();
ObjectTypeDB::register_virtual_type<Material>();
ObjectTypeDB::register_type<FixedMaterial>();
- //ObjectTypeDB::register_type<ParticleSystemMaterial>();
- //ObjectTypeDB::register_type<UnshadedMaterial>();
ObjectTypeDB::register_type<ShaderMaterial>();
ObjectTypeDB::register_type<RoomBounds>();
- ObjectTypeDB::register_virtual_type<Shader>();
- ObjectTypeDB::register_virtual_type<ShaderGraph>();
ObjectTypeDB::register_type<MaterialShaderGraph>();
ObjectTypeDB::register_type<MaterialShader>();
ObjectTypeDB::add_compatibility_type("Shader","MaterialShader");
diff --git a/scene/resources/curve.cpp b/scene/resources/curve.cpp
index 6c27ffc6d9..7c2fa4d6f4 100644
--- a/scene/resources/curve.cpp
+++ b/scene/resources/curve.cpp
@@ -541,19 +541,12 @@ void Curve2D::_bake() const {
Vector2 pos=points[0].pos;
- int point=0;
- float ofs=0;
List<Vector2> pointlist;
for(int i=0;i<points.size()-1;i++) {
- float slen=points[i].pos.distance_to(points[i+1].pos);
- float divs = slen / bake_interval;
- if (divs>1)
- divs=1;
-
- float step = divs*0.1; // 10 substeps ought to be enough?
+ float step = 0.1; // at least 10 substeps ought to be enough?
float p = 0;
while(p<1.0) {
@@ -1014,19 +1007,12 @@ void Curve3D::_bake() const {
Vector3 pos=points[0].pos;
- int point=0;
- float ofs=0;
List<Plane> pointlist;
pointlist.push_back(Plane(pos,points[0].tilt));
for(int i=0;i<points.size()-1;i++) {
- float slen=points[i].pos.distance_to(points[i+1].pos);
- float divs = slen / bake_interval;
- if (divs>1)
- divs=1;
-
- float step = divs*0.1; // 10 substeps ought to be enough?
+ float step = 0.1; // at least 10 substeps ought to be enough?
float p = 0;
while(p<1.0) {
diff --git a/scene/resources/default_theme/arrow_down.png b/scene/resources/default_theme/arrow_down.png
index 1e5c04cb0e..bb4c9d6831 100644
--- a/scene/resources/default_theme/arrow_down.png
+++ b/scene/resources/default_theme/arrow_down.png
Binary files differ
diff --git a/scene/resources/default_theme/arrow_right.png b/scene/resources/default_theme/arrow_right.png
index 33e0c1965b..e39356dea8 100644
--- a/scene/resources/default_theme/arrow_right.png
+++ b/scene/resources/default_theme/arrow_right.png
Binary files differ
diff --git a/scene/resources/default_theme/button_disabled.png b/scene/resources/default_theme/button_disabled.png
index 8bcfa54cc6..e1d25c08fb 100644
--- a/scene/resources/default_theme/button_disabled.png
+++ b/scene/resources/default_theme/button_disabled.png
Binary files differ
diff --git a/scene/resources/default_theme/button_hover.png b/scene/resources/default_theme/button_hover.png
index aa3035fe4f..b01af258f0 100644
--- a/scene/resources/default_theme/button_hover.png
+++ b/scene/resources/default_theme/button_hover.png
Binary files differ
diff --git a/scene/resources/default_theme/button_normal.png b/scene/resources/default_theme/button_normal.png
index fbccf22636..d10df91b1d 100644
--- a/scene/resources/default_theme/button_normal.png
+++ b/scene/resources/default_theme/button_normal.png
Binary files differ
diff --git a/scene/resources/default_theme/button_pressed.png b/scene/resources/default_theme/button_pressed.png
index 882b583081..9d627936e6 100644
--- a/scene/resources/default_theme/button_pressed.png
+++ b/scene/resources/default_theme/button_pressed.png
Binary files differ
diff --git a/scene/resources/default_theme/checked.png b/scene/resources/default_theme/checked.png
index 171c61b6e5..a41b33cccf 100644
--- a/scene/resources/default_theme/checked.png
+++ b/scene/resources/default_theme/checked.png
Binary files differ
diff --git a/scene/resources/default_theme/close_hl.png b/scene/resources/default_theme/close_hl.png
index 835790e9e9..0f3be4a320 100644
--- a/scene/resources/default_theme/close_hl.png
+++ b/scene/resources/default_theme/close_hl.png
Binary files differ
diff --git a/scene/resources/default_theme/default_theme.cpp b/scene/resources/default_theme/default_theme.cpp
index e7f0d9b1f5..4d1e9896db 100644
--- a/scene/resources/default_theme/default_theme.cpp
+++ b/scene/resources/default_theme/default_theme.cpp
@@ -168,8 +168,6 @@ void make_default_theme() {
tex_cache = memnew( TexCacheMap );
- uint32_t last=OS::get_singleton()->get_ticks_msec();
-
Ref<Theme> t( memnew( Theme ) );
//Ref<Font> default_font = make_font(_bi_font_normal_height,_bi_font_normal_ascent,_bi_font_normal_valign,_bi_font_normal_charcount,_bi_font_normal_characters,make_icon(font_normal_png));
@@ -177,167 +175,240 @@ void make_default_theme() {
Ref<Font> source_font=make_font2(_builtin_source_font_height,_builtin_source_font_ascent,_builtin_source_font_charcount,&_builtin_source_font_charrects[0][0],_builtin_source_font_kerning_pair_count,&_builtin_source_font_kerning_pairs[0][0],_builtin_source_font_img_width,_builtin_source_font_img_height,_builtin_source_font_img_data);
Ref<Font> large_font=make_font2(_builtin_large_font_height,_builtin_large_font_ascent,_builtin_large_font_charcount,&_builtin_large_font_charrects[0][0],_builtin_large_font_kerning_pair_count,&_builtin_large_font_kerning_pairs[0][0],_builtin_large_font_img_width,_builtin_large_font_img_height,_builtin_large_font_img_data);
+ // Font Colors
+
+ Color control_font_color = Color::html("e0e0e0");
+ Color control_font_color_low = Color::html("b0b0b0");
+ Color control_font_color_hover = Color::html("f0f0f0");
+ Color control_font_color_disabled = Color(0.9,0.9,0.9,0.2);
+ Color control_font_color_pressed = Color::html("ffffff");
+ Color font_color_selection = Color::html("7d7d7d");
+
+
+ // Panel
+
t->set_stylebox("panel","Panel", make_stylebox( panel_bg_png,0,0,0,0) );
- Color control_font_color = Color::html("cfc9d5");
- Color control_font_color_low = Color::html("bab4c1");
- Color control_font_color_hover = Color::html("ffffff");
- Color control_font_color_disabled = Color(0.9,0.9,0.9,0.6);
- Color control_font_color_pressed = Color::html("bfb9c5");
- Color font_color_selection = Color::html("715e7d");
- Ref<Texture> empty_icon = memnew( ImageTexture );
- t->set_stylebox("normal","Button", make_stylebox( button_normal_png,5,5,5,5,8,3,8,4) );
- t->set_stylebox("pressed","Button", make_stylebox( button_pressed_png,5,5,5,5,3,3,3,3) );
- t->set_stylebox("hover","Button", make_stylebox( button_hover_png,5,5,5,5,3,0,3,0) );
- t->set_stylebox("disabled","Button", make_stylebox( button_disabled_png,5,5,5,5,3,3,3,3) );
- Ref<StyleBoxTexture> focus = make_stylebox( focus_png,6,6,6,6,3,3,3,3);
+
+ // Focus
+
+ Ref<StyleBoxTexture> focus = make_stylebox( focus_png,5,5,5,5);
for(int i=0;i<4;i++) {
focus->set_expand_margin_size(Margin(i),2);
}
+
+
+
+ // Button
+
+ t->set_stylebox("normal","Button", make_stylebox( button_normal_png,4,4,4,4,8,4,8,4) );
+ t->set_stylebox("pressed","Button", make_stylebox( button_pressed_png,4,4,4,4) );
+ t->set_stylebox("hover","Button", make_stylebox( button_hover_png,4,4,4,4) );
+ t->set_stylebox("disabled","Button", make_stylebox( button_disabled_png,4,4,4,4) );
t->set_stylebox("focus","Button", focus );
+
t->set_font("font","Button", default_font );
+
t->set_color("font_color","Button", control_font_color );
t->set_color("font_color_pressed","Button", control_font_color_pressed );
t->set_color("font_color_hover","Button", control_font_color_hover );
t->set_color("font_color_disabled","Button", control_font_color_disabled );
- t->set_constant("hseparation","Button", 2 );
+ t->set_constant("hseparation","Button", 2);
+
+
+
+ // ColorPickerButton
+
+ t->set_stylebox("normal","ColorPickerButton", make_stylebox( button_normal_png,4,4,4,4) );
+ t->set_stylebox("pressed","ColorPickerButton", make_stylebox( button_pressed_png,4,4,4,4) );
+ t->set_stylebox("hover","ColorPickerButton", make_stylebox( button_hover_png,4,4,4,4) );
+ t->set_stylebox("disabled","ColorPickerButton", make_stylebox( button_disabled_png,4,4,4,4) );
+ t->set_stylebox("focus","ColorPickerButton", focus );
- t->set_stylebox("normal","ColorPickerButton", make_stylebox( button_normal_png,7,7,7,7,8,3,8,3) );
- t->set_stylebox("pressed","ColorPickerButton", make_stylebox( button_pressed_png,5,5,5,5,3,3,3,3) );
- t->set_stylebox("hover","ColorPickerButton", make_stylebox( button_hover_png,4,4,4,4,3,3,3,3) );
- t->set_stylebox("disabled","ColorPickerButton", make_stylebox( button_disabled_png,4,4,4,4,3,3,3,3) );
- t->set_stylebox("focus","ColorPickerButton", make_stylebox( focus_png,5,5,5,5,3,3,3,3) );
t->set_font("font","ColorPickerButton", default_font );
+
t->set_color("font_color","ColorPickerButton", Color(1,1,1,1) );
t->set_color("font_color_pressed","ColorPickerButton", Color(0.8,0.8,0.8,1) );
t->set_color("font_color_hover","ColorPickerButton", Color(1,1,1,1) );
- t->set_color("font_color_disabled","ColorPickerButton", Color(0.9,0.9,0.9,0.6) );
+ t->set_color("font_color_disabled","ColorPickerButton", Color(0.9,0.9,0.9,0.3) );
+
t->set_constant("hseparation","ColorPickerButton", 2 );
- t->set_stylebox("normal","ToolButton", make_empty_stylebox(5,3,5,3) );
- t->set_stylebox("pressed","ToolButton", make_stylebox( button_pressed_png,5,5,5,5,3,3,3,3) );
- t->set_stylebox("hover","ToolButton", make_stylebox( button_normal_png,5,5,5,5,3,3,3,3) );
- //t->set_stylebox("disabled","ToolButton", make_stylebox( button_disabled_png,5,5,5,5,3,3,3,3) );
- t->set_stylebox("disabled","ToolButton", make_empty_stylebox(3,3,3,3) );
- t->set_stylebox("focus","ToolButton", make_stylebox( focus_png,5,5,5,5,3,3,3,3) );
+ // ToolButton
+
+ Ref<StyleBox> tb_empty = memnew( StyleBoxEmpty );
+ tb_empty->set_default_margin(MARGIN_LEFT,8);
+ tb_empty->set_default_margin(MARGIN_RIGHT,8);
+ tb_empty->set_default_margin(MARGIN_TOP,4);
+ tb_empty->set_default_margin(MARGIN_BOTTOM,4);
+
+ t->set_stylebox("normal","ToolButton", tb_empty);
+ t->set_stylebox("pressed","ToolButton", make_stylebox( button_pressed_png,4,4,4,4) );
+ t->set_stylebox("hover","ToolButton", make_stylebox( button_normal_png,4,4,4,4) );
+ t->set_stylebox("disabled","ToolButton", make_empty_stylebox(4,4,4,4) );
+ t->set_stylebox("focus","ToolButton", focus );
+
t->set_font("font","ToolButton", default_font );
+
t->set_color("font_color","ToolButton", control_font_color );
t->set_color("font_color_pressed","ToolButton", control_font_color_pressed );
t->set_color("font_color_hover","ToolButton", control_font_color_hover );
- t->set_color("font_color_disabled","ToolButton", Color(0.9,0.95,1,0.6) );
- t->set_constant("hseparation","ToolButton", 2 );
+ t->set_color("font_color_disabled","ToolButton", Color(0.9,0.95,1,0.3) );
+
+ t->set_constant("hseparation","ToolButton", 0 );
+
+
+
+ // OptionButton
- t->set_stylebox("normal","OptionButton", make_stylebox( option_button_normal_png,4,4,20,5,8,3,20,4) );
- t->set_stylebox("pressed","OptionButton", make_stylebox( option_button_pressed_png,4,4,20,5,3,3,3,3) );
- t->set_stylebox("hover","OptionButton", make_stylebox( option_button_hover_png,4,4,20,5,3,3,3,3) );
- t->set_stylebox("disabled","OptionButton", make_stylebox( option_button_disabled_png,4,4,20,5,3,3,3,3) );
+ t->set_stylebox("normal","OptionButton", make_stylebox( option_button_normal_png,5,5,21,5,8,4,8,4) );
+ t->set_stylebox("pressed","OptionButton", make_stylebox( option_button_pressed_png,5,5,21,5) );
+ t->set_stylebox("hover","OptionButton", make_stylebox( option_button_hover_png,5,5,21,5) );
+ t->set_stylebox("disabled","OptionButton", make_stylebox( option_button_disabled_png,5,5,21,5) );
t->set_stylebox("focus","OptionButton", focus );
- t->set_constant("arrow_margin","OptionButton", 1 );
+
t->set_icon("arrow","OptionButton", make_icon( option_arrow_png ) );
t->set_font("font","OptionButton", default_font );
+
t->set_color("font_color","OptionButton", control_font_color );
t->set_color("font_color_pressed","OptionButton", control_font_color_pressed );
t->set_color("font_color_hover","OptionButton", control_font_color_hover );
t->set_color("font_color_disabled","OptionButton", control_font_color_disabled );
t->set_constant("hseparation","OptionButton", 2 );
+ t->set_constant("arrow_margin","OptionButton", 2 );
+
+
- t->set_stylebox("normal","MenuButton", make_stylebox( button_normal_png,6,6,6,6,3,3,3,3) );
- t->set_stylebox("pressed","MenuButton", make_stylebox( tool_button_pressed_png ,6,6,6,6,3,3,3,3) );
- t->set_stylebox("hover","MenuButton", make_stylebox( button_normal_png,6,6,6,6,3,3,3,3) );
+ // MenuButton
+
+ t->set_stylebox("normal","MenuButton", make_stylebox( button_normal_png,4,4,4,4,8,4,8,4) );
+ t->set_stylebox("pressed","MenuButton", make_stylebox( tool_button_pressed_png ,4,4,4,4) );
+ t->set_stylebox("hover","MenuButton", make_stylebox( button_normal_png,4,4,4,4) );
t->set_stylebox("disabled","MenuButton", make_empty_stylebox(0,0,0,0) );
+
t->set_font("font","MenuButton", default_font );
+
t->set_color("font_color","MenuButton", control_font_color );
t->set_color("font_color_pressed","MenuButton", control_font_color_pressed );
t->set_color("font_color_hover","MenuButton", control_font_color_hover );
t->set_color("font_color_disabled","MenuButton", Color(1,1,1,0.3) );
- t->set_stylebox("focus","OptionButton", Ref<StyleBox>( memnew( StyleBoxEmpty )) );
- t->set_constant("hseparation","MenuButton", 2 );
+ t->set_constant("hseparation","MenuButton", 0 );
+
+
+
+ // CheckButton
Ref<StyleBox> cb_empty = memnew( StyleBoxEmpty );
+ cb_empty->set_default_margin(MARGIN_LEFT,6);
cb_empty->set_default_margin(MARGIN_RIGHT,70);
cb_empty->set_default_margin(MARGIN_TOP,4);
cb_empty->set_default_margin(MARGIN_BOTTOM,4);
+
t->set_stylebox("normal","CheckButton", cb_empty );
t->set_stylebox("pressed","CheckButton", cb_empty );
t->set_stylebox("disabled","CheckButton", cb_empty );
t->set_stylebox("hover","CheckButton", cb_empty );
- //t->set_stylebox("hover","CheckButton", make_stylebox( button_hover_png,5,5,5,5,3,3,3,3) );
+ t->set_stylebox("focus","CheckButton", focus );
+
+ t->set_icon("on","CheckButton", make_icon(toggle_on_png) );
+ t->set_icon("off","CheckButton", make_icon(toggle_off_png));
+
t->set_font("font","CheckButton", default_font );
+
t->set_color("font_color","CheckButton", control_font_color );
t->set_color("font_color_pressed","CheckButton", control_font_color_pressed );
t->set_color("font_color_hover","CheckButton", control_font_color_hover );
t->set_color("font_color_disabled","CheckButton", control_font_color_disabled );
- t->set_icon("on","CheckButton", make_icon(toggle_on_png) );
- t->set_icon("off","CheckButton", make_icon(toggle_off_png));
- t->set_stylebox("focus","CheckButton", focus );
+
t->set_constant("hseparation","CheckButton",4);
t->set_constant("check_vadjust","CheckButton",0);
+
+
+ // Label
t->set_font("font","Label", default_font );
+
t->set_color("font_color","Label", Color(1,1,1) );
t->set_color("font_color_shadow","Label", Color(0,0,0,0) );
+
t->set_constant("shadow_offset_x","Label", 1 );
t->set_constant("shadow_offset_y","Label", 1 );
t->set_constant("shadow_as_outline","Label", 0 );
- t->set_stylebox("normal","LineEdit", make_stylebox( line_edit_png,4,4,4,4,3,4,3,4) );
- t->set_stylebox("focus","LineEdit", focus );
- t->set_stylebox("read_only","LineEdit", make_stylebox( line_edit_disabled_png,6,6,6,6,4,4,4,4) );
- Image n(line_edit_png);
- Image nf(line_edit_focus_png);
+ // LineEdit
+
+ t->set_stylebox("normal","LineEdit", make_stylebox( line_edit_png,5,5,5,5) );
+ t->set_stylebox("focus","LineEdit", focus );
+ t->set_stylebox("read_only","LineEdit", make_stylebox( line_edit_disabled_png,6,6,6,6) );
t->set_font("font","LineEdit", default_font );
+
t->set_color("font_color","LineEdit", control_font_color );
t->set_color("font_color_selected","LineEdit", Color(0,0,0) );
t->set_color("cursor_color","LineEdit", control_font_color_hover );
t->set_color("selection_color","LineEdit", font_color_selection );
- t->set_constant("minimum_spaces","LineEdit", 8 );
- t->set_stylebox("bg","ProgressBar", make_stylebox( progress_bar_png,5,5,5,5,0,0,0,0) );
- t->set_stylebox("fg","ProgressBar", make_stylebox( progress_fill_png,5,5,5,5,2,2,2,2) );
+ t->set_constant("minimum_spaces","LineEdit", 12 );
+
+
+
+ // ProgressBar
+
+ t->set_stylebox("bg","ProgressBar", make_stylebox( progress_bar_png,4,4,4,4,0,0,0,0) );
+ t->set_stylebox("fg","ProgressBar", make_stylebox( progress_fill_png,6,6,6,6,2,1,2,1) );
+
t->set_font("font","ProgressBar", default_font );
- t->set_color("font_color","ProgressBar", control_font_color );
+
+ t->set_color("font_color","ProgressBar", control_font_color_hover );
t->set_color("font_color_shadow","ProgressBar", Color(0,0,0) );
- t->set_icon("tab","TextEdit", make_icon( tab_png) );
- t->set_stylebox("normal","TextEdit", make_stylebox( tree_bg_png,12,12,12,12,3,3,3,3) );
- t->set_stylebox("focus","TextEdit", focus );
- t->set_stylebox("completion","TextEdit", make_stylebox( tree_bg_png,4,4,4,5,3,3,3,3) );
- t->set_constant("completion_lines","TextEdit", 7 );
- t->set_constant("completion_max_width","TextEdit", 50 );
- t->set_constant("completion_scroll_width","TextEdit", 3 );
- t->set_color("completion_scroll_color","TextEdit", control_font_color_pressed );
- t->set_color("completion_existing","TextEdit", control_font_color );
+ // TextEdit
- //t->set_font("font","TextEdit", mono_font );
+ t->set_stylebox("normal","TextEdit", make_stylebox( tree_bg_png,3,3,3,3) );
+ t->set_stylebox("focus","TextEdit", focus );
+ t->set_stylebox("completion","TextEdit", make_stylebox( tree_bg_png,3,3,3,3) );
+
+ t->set_icon("tab","TextEdit", make_icon( tab_png) );
t->set_font("font","TextEdit", default_font );
+
+ t->set_color("completion_scroll_color","TextEdit", control_font_color_pressed );
+ t->set_color("completion_existing","TextEdit", control_font_color );
t->set_color("font_color","TextEdit", control_font_color );
t->set_color("font_color_selected","TextEdit", Color(0,0,0) );
t->set_color("selection_color","TextEdit", font_color_selection );
t->set_color("mark_color","TextEdit", Color(1.0,0.4,0.4,0.4) );
- t->set_color("breakpoint_color","TextEdit", Color(0.8,0.8,0.4,0.4) );
- t->set_color("current_line_color","TextEdit", Color(0.3,0.5,0.8,0.15) );
+ t->set_color("breakpoint_color","TextEdit", Color(0.8,0.8,0.4,0.2) );
+ t->set_color("current_line_color","TextEdit", Color(0.25,0.25,0.26,0.8) );
t->set_color("cursor_color","TextEdit", control_font_color );
t->set_color("symbol_color","TextEdit", control_font_color_hover );
t->set_color("brace_mismatch_color","TextEdit", Color(1,0.2,0.2) );
- t->set_constant("line_spacing","TextEdit",1 );
- t->set_stylebox("scroll","HScrollBar", make_stylebox( hscroll_bg_png,3,3,3,3,0,0,0,0) );
- t->set_stylebox("scroll_focus","HScrollBar", make_stylebox( hscroll_bg_png,3,3,3,3,0,0,0,0) );
- t->set_stylebox("grabber","HScrollBar", make_stylebox( hscroll_grabber_png,3,3,3,3,2,2,2,2) );
- t->set_stylebox("grabber_hilite","HScrollBar", make_stylebox( hscroll_grabber_hl_png,3,3,3,3,2,2,2,2) );
+ t->set_constant("completion_lines","TextEdit", 7 );
+ t->set_constant("completion_max_width","TextEdit", 50 );
+ t->set_constant("completion_scroll_width","TextEdit", 3 );
+ t->set_constant("line_spacing","TextEdit",4 );
+
+
+ Ref<Texture> empty_icon = memnew( ImageTexture );
+
+ // HScrollBar
+
+ t->set_stylebox("scroll","HScrollBar", make_stylebox( scroll_bg_png,3,3,3,3,0,0,0,0) );
+ t->set_stylebox("scroll_focus","HScrollBar", make_stylebox( scroll_bg_png,3,3,3,3,0,0,0,0) );
+ t->set_stylebox("grabber","HScrollBar", make_stylebox( scroll_grabber_png,3,3,3,3,2,2,2,2) );
+ t->set_stylebox("grabber_hilite","HScrollBar", make_stylebox( scroll_grabber_hl_png,3,3,3,3,2,2,2,2) );
t->set_icon("increment","HScrollBar",empty_icon);
t->set_icon("increment_hilite","HScrollBar",empty_icon);
@@ -345,77 +416,112 @@ void make_default_theme() {
t->set_icon("decrement_hilite","HScrollBar",empty_icon);
- t->set_stylebox("scroll","VScrollBar", make_stylebox( vscroll_bg_png,3,3,3,3,0,0,0,0) );
- t->set_stylebox("scroll_focus","VScrollBar", make_stylebox( vscroll_bg_png,3,3,3,3,0,0,0,0) );
- t->set_stylebox("grabber","VScrollBar", make_stylebox( vscroll_grabber_png,3,3,3,3,2,2,2,2) );
- t->set_stylebox("grabber_hilite","VScrollBar", make_stylebox( vscroll_grabber_hl_png,3,3,3,3,2,2,2,2) );
+
+ // VScrollBar
+
+ t->set_stylebox("scroll","VScrollBar", make_stylebox( scroll_bg_png,3,3,3,3,0,0,0,0) );
+ t->set_stylebox("scroll_focus","VScrollBar", make_stylebox( scroll_bg_png,3,3,3,3,0,0,0,0) );
+ t->set_stylebox("grabber","VScrollBar", make_stylebox( scroll_grabber_png,3,3,3,3,2,2,2,2) );
+ t->set_stylebox("grabber_hilite","VScrollBar", make_stylebox( scroll_grabber_hl_png,3,3,3,3,2,2,2,2) );
+
t->set_icon("increment","VScrollBar",empty_icon);
t->set_icon("increment_hilite","VScrollBar",empty_icon);
t->set_icon("decrement","VScrollBar",empty_icon);
t->set_icon("decrement_hilite","VScrollBar",empty_icon);
- t->set_stylebox("slider","HSlider", make_stylebox( hslider_bg_png,5,5,5,5,1,1,1,1) );
- t->set_stylebox("focus","HSlider", make_stylebox( focus_png,3,3,3,3,1,1,1,1) );
- //t->set_stylebox("slider_focus","HSlider", make_stylebox( hslider_bg_focus_png,6,6,6,6,2,2,2,2) );
+
+
+ // HSlider
+
+ t->set_stylebox("slider","HSlider", make_stylebox( hslider_bg_png,4,4,4,4) );
+ t->set_stylebox("grabber_hilite","HSlider", make_stylebox( hslider_grabber_hl_png,6,6,6,6) );
+ t->set_stylebox("focus","HSlider", focus );
+
t->set_icon("grabber","HSlider", make_icon( hslider_grabber_png ) );
t->set_icon("grabber_hilite","HSlider", make_icon( hslider_grabber_hl_png ) );
t->set_icon("tick","HSlider", make_icon( hslider_tick_png ) );
- t->set_stylebox("grabber_hilite","HSlider", make_stylebox( hslider_grabber_hl_png,6,6,6,6,2,2,2,2) );
- t->set_stylebox("slider","VSlider", make_stylebox( vslider_bg_png,5,5,5,5,1,1,1,1) );
- t->set_stylebox("focus","HSlider", make_stylebox( focus_png,3,3,3,3,1,1,1,1) );
- //t->set_stylebox("slider_focus","VSlider", make_stylebox( vslider_bg_focus_png,6,6,6,6,2,2,2,2) );
+
+
+
+ // VSlider
+
+ t->set_stylebox("slider","VSlider", make_stylebox( vslider_bg_png,4,4,4,4) );
+ t->set_stylebox("grabber_hilite","VSlider", make_stylebox( vslider_grabber_hl_png,6,6,6,6) );
+ t->set_stylebox("focus","HSlider", focus );
+
t->set_icon("grabber","VSlider", make_icon( vslider_grabber_png) );
t->set_icon("grabber_hilite","VSlider", make_icon( vslider_grabber_hl_png ) );
t->set_icon("tick","VSlider", make_icon( vslider_tick_png ) );
- t->set_stylebox("grabber_hilite","VSlider", make_stylebox( vslider_grabber_hl_png,6,6,6,6,2,2,2,2) );
+
+
+
+ // SpinBox
t->set_icon("updown","SpinBox",make_icon(spinbox_updown_png));
- Ref<StyleBoxTexture> style_pp_win = make_stylebox( popup_window_png,6,28,6,7,8,8,8,8);
+
+ // WindowDialog
+
+ Ref<StyleBoxTexture> style_pp_win = make_stylebox( popup_window_png,6,28,6,7);
for(int i=0;i<4;i++)
style_pp_win->set_expand_margin_size((Margin)i,3);
style_pp_win->set_expand_margin_size(MARGIN_TOP,26);
+
t->set_stylebox("panel","WindowDialog", style_pp_win );
- t->set_constant("titlebar_height","WindowDialog", 18 );
- t->set_constant("title_height","WindowDialog", 20 );
- t->set_font("title_font","WindowDialog", large_font );
- t->set_color("title_color","WindowDialog", Color(0,0,0) );
+
t->set_icon("close","WindowDialog", make_icon( close_png ) );
t->set_icon("close_hilite","WindowDialog", make_icon( close_hl_png ) );
+
+ t->set_font("title_font","WindowDialog", large_font );
+
+ t->set_color("title_color","WindowDialog", Color(0,0,0) );
+
t->set_constant("close_h_ofs","WindowDialog", 22 );
t->set_constant("close_v_ofs","WindowDialog", 20 );
+ t->set_constant("titlebar_height","WindowDialog", 18 );
+ t->set_constant("title_height","WindowDialog", 20 );
- Ref<StyleBoxTexture> style_pp = make_stylebox( popup_bg_png,6,19,6,7,8,8,8,8);
- style_pp->set_expand_margin_size(MARGIN_LEFT,2);
- style_pp->set_expand_margin_size(MARGIN_TOP,3);
- style_pp->set_expand_margin_size(MARGIN_RIGHT,2);
- style_pp->set_expand_margin_size(MARGIN_BOTTOM,3);
+ // Popup
- t->set_stylebox("panel","PopupMenu", style_pp );
- t->set_stylebox("panel","PopupPanel", style_pp );
+ Ref<StyleBoxTexture> style_pp = make_stylebox( popup_bg_png,4,4,4,4,8,8,8,8);
Ref<StyleBoxTexture> selected = make_stylebox( selection_png,6,6,6,6);
for(int i=0;i<4;i++) {
selected->set_expand_margin_size(Margin(i),2);
}
- t->set_stylebox("panel_disabled","PopupMenu", make_stylebox( popup_bg_disabled_png,5,5,5,5) );
+ t->set_stylebox("panel","PopupPanel", style_pp );
+
+
+
+
+ // PopupMenu
+
+ t->set_stylebox("panel","PopupMenu", make_stylebox( popup_bg_png,4,4,4,4,10,10,10,10) );
+ t->set_stylebox("panel_disabled","PopupMenu", make_stylebox( popup_bg_disabled_png,4,4,4,4) );
t->set_stylebox("hover","PopupMenu", selected );
t->set_stylebox("separator","PopupMenu", make_stylebox( vseparator_png,3,3,3,3) );
- t->set_icon("checked","PopupMenu", make_icon(popup_checked_png) );
- t->set_icon("unchecked","PopupMenu", make_icon(popup_unchecked_png) );
+
+ t->set_icon("checked","PopupMenu", make_icon(checked_png) );
+ t->set_icon("unchecked","PopupMenu", make_icon(unchecked_png) );
t->set_icon("submenu","PopupMenu", make_icon(submenu_png) );
+
t->set_font("font","PopupMenu", default_font );
+
t->set_color("font_color","PopupMenu", control_font_color );
t->set_color("font_color_accel","PopupMenu", Color(0.7,0.7,0.7,0.8) );
t->set_color("font_color_disabled","PopupMenu", Color(0.4,0.4,0.4,0.8) );
t->set_color("font_color_hover","PopupMenu", control_font_color );
- t->set_constant("hseparation","PopupMenu",2);
- t->set_constant("vseparation","PopupMenu",1);
+
+ t->set_constant("hseparation","PopupMenu",4);
+ t->set_constant("vseparation","PopupMenu",4);
+
+
+ // GraphNode
Ref<StyleBoxTexture> graphsb = make_stylebox(graph_node_png,6,24,6,5,16,24,16,5);
//graphsb->set_expand_margin_size(MARGIN_LEFT,10);
@@ -431,57 +537,65 @@ void make_default_theme() {
t->set_constant("port_offset","GraphNode", 3);
- t->set_stylebox("bg","Tree", make_stylebox( tree_bg_png,4,4,4,5,3,3,3,3) );
+ // Tree
+
+ Ref<StyleBoxTexture> tree_selected = make_stylebox( selection_png,4,4,4,4,8,0,8,0);
+ Ref<StyleBoxTexture> tree_selected_oof = make_stylebox( selection_oof_png,4,4,4,4,8,0,8,0);
+
+ t->set_stylebox("bg","Tree", make_stylebox( tree_bg_png,4,4,4,5) );
t->set_stylebox("bg_focus","Tree", focus );
- Ref<StyleBoxTexture> tree_selected = make_stylebox( selection_png,4,4,4,4);
- Ref<StyleBoxTexture> tree_selected_oof = make_stylebox( selection_oof_png,4,4,4,4);
- for(int i=0;i<4;i++) {
- tree_selected->set_expand_margin_size(Margin(i),2);
- tree_selected_oof->set_expand_margin_size(Margin(i),2);
- }
t->set_stylebox("selected","Tree", tree_selected_oof );
t->set_stylebox("selected_focus","Tree", tree_selected );
- t->set_stylebox("completion_selected","TextEdit", tree_selected );
-
-
t->set_stylebox("cursor","Tree", focus );
t->set_stylebox("cursor_unfocused","Tree", focus );
- t->set_stylebox("button_pressed","Tree",make_stylebox( button_pressed_png,5,5,5,5,3,3,3,3));
+ t->set_stylebox("button_pressed","Tree",make_stylebox( button_pressed_png,4,4,4,4));
+ t->set_stylebox("title_button_normal","Tree", make_stylebox( tree_title_png,4,4,4,4) );
+ t->set_stylebox("title_button_pressed","Tree", make_stylebox( tree_title_pressed_png,4,4,4,4) );
+ t->set_stylebox("title_button_hover","Tree", make_stylebox( tree_title_png,4,4,4,4) );
+
+ t->set_icon("checked","Tree",make_icon(checked_png));
+ t->set_icon("unchecked","Tree",make_icon(unchecked_png));
+ t->set_icon("updown","Tree",make_icon(updown_png));
+ t->set_icon("select_arrow","Tree",make_icon(dropdown_png));
+ t->set_icon("arrow","Tree",make_icon(arrow_down_png));
+ t->set_icon("arrow_collapsed","Tree",make_icon(arrow_right_png));
+
+ t->set_font("title_button_font","Tree", default_font );
t->set_font("font","Tree", default_font );
+
+ t->set_color("title_button_color","Tree", control_font_color );
t->set_color("font_color","Tree", control_font_color_low );
- t->set_color("font_color_selected","Tree", control_font_color );
+ t->set_color("font_color_selected","Tree", control_font_color_pressed );
t->set_color("selection_color","Tree", Color(0.1,0.1,1,0.8) );
t->set_color("cursor_color","Tree", Color(0,0,0) );
t->set_color("guide_color","Tree", Color(0,0,0,0.1) );
- t->set_constant("hseparation","Tree",2);
- t->set_constant("vseparation","Tree",1);
- t->set_constant("guide_width","Tree",1);
+
+ t->set_constant("hseparation","Tree",4);
+ t->set_constant("vseparation","Tree",2);
+ t->set_constant("guide_width","Tree",2);
t->set_constant("item_margin","Tree",12);
- t->set_constant("button_margin","Tree",2);
+ t->set_constant("button_margin","Tree",4);
- t->set_stylebox("title_button_normal","Tree", make_stylebox( tree_title_png,4,4,4,4,3,3,3,3) );
- t->set_stylebox("title_button_pressed","Tree", make_stylebox( tree_title_pressed_png,4,4,4,4,3,3,3,3) );
- t->set_stylebox("title_button_hover","Tree", make_stylebox( tree_title_png,4,4,4,4,3,3,3,3) );
- t->set_color("title_button_color","Tree", control_font_color );
- t->set_font("title_button_font","Tree", default_font );
- t->set_icon("checked","Tree",make_icon(checked_png));
- t->set_icon("unchecked","Tree",make_icon(unchecked_png));
- t->set_icon("updown","Tree",make_icon(updown_png));
- t->set_icon("select_arrow","Tree",make_icon(dropdown_png));
- t->set_icon("arrow","Tree",make_icon(arrow_down_png));
- t->set_icon("arrow_collapsed","Tree",make_icon(arrow_right_png));
+ // TextEdit
- t->set_stylebox("tab_fg","TabContainer", make_stylebox( tab_current_png,5,5,5,5,8,3,8,3) );
- t->set_stylebox("tab_bg","TabContainer", make_stylebox( tab_behind_png,5,5,5,5,8,4,8,3) );
- Ref<StyleBoxTexture> tc_sb = make_stylebox( tab_container_bg_png,6,19,6,7);
+ t->set_stylebox("completion_selected","TextEdit", tree_selected );
+
+
+
+ // TabContainer
+
+ Ref<StyleBoxTexture> tc_sb = make_stylebox( tab_container_bg_png,4,4,4,4);
for(int i=0;i<4;i++) {
- tc_sb->set_default_margin(Margin(i),7);
+ tc_sb->set_default_margin(Margin(i),4);
tc_sb->set_expand_margin_size(Margin(i),2);
}
- //tc_sb->set_expand_margin_size(MARGIN_TOP,2);
- //tc_sb->set_default_margin(MARGIN_TOP,6);
+ tc_sb->set_expand_margin_size(MARGIN_TOP,2);
+ tc_sb->set_default_margin(MARGIN_TOP,8);
+
+ t->set_stylebox("tab_fg","TabContainer", make_stylebox( tab_current_png,4,4,4,4,16,4,16,4) );
+ t->set_stylebox("tab_bg","TabContainer", make_stylebox( tab_behind_png,4,4,4,4,16,6,16,4) );
t->set_stylebox("panel","TabContainer", tc_sb );
t->set_icon("increment","TabContainer",make_icon( scroll_button_right_png));
@@ -490,116 +604,178 @@ void make_default_theme() {
t->set_icon("decrement_hilite","TabContainer",make_icon( scroll_button_left_hl_png));
t->set_font("font","TabContainer", default_font );
+
t->set_color("font_color_fg","TabContainer", control_font_color_hover );
- t->set_color("font_color_bg","TabContainer", control_font_color );
- t->set_constant("side_margin","TabContainer", 5 );
+ t->set_color("font_color_bg","TabContainer", control_font_color_low );
+
+ t->set_constant("side_margin","TabContainer", 8 );
t->set_constant("top_margin","TabContainer", 24);
- t->set_constant("label_valign_fg","TabContainer", 4);
- t->set_constant("label_valign_bg","TabContainer", 5);
- t->set_constant("hseparation","TabContainer", 2);
+ t->set_constant("label_valign_fg","TabContainer", 0);
+ t->set_constant("label_valign_bg","TabContainer", 2);
+ t->set_constant("hseparation","TabContainer", 4);
+
+
+
+ // Tabs
+
+ t->set_stylebox("tab_fg","Tabs", make_stylebox( tab_current_png,4,4,4,4,16,4,16,4) );
+ t->set_stylebox("tab_bg","Tabs", make_stylebox( tab_behind_png,4,4,4,4,16,6,16,4) );
+ t->set_stylebox("panel","Tabs", make_stylebox( tab_container_bg_png,4,4,4,4) );
- t->set_stylebox("tab_fg","Tabs", make_stylebox( tab_current_png,5,5,5,5,8,3,8,3) );
- t->set_stylebox("tab_bg","Tabs", make_stylebox( tab_behind_png,5,5,5,5,8,4,8,3) );
- t->set_stylebox("panel","Tabs", make_stylebox( tab_container_bg_png,3,3,3,3) );
t->set_font("font","Tabs", default_font );
+
t->set_color("font_color_fg","Tabs", control_font_color_hover );
- t->set_color("font_color_bg","Tabs", control_font_color );
+ t->set_color("font_color_bg","Tabs", control_font_color_low );
+
t->set_constant("top_margin","Tabs", 24);
- t->set_constant("label_valign_fg","Tabs", 4);
- t->set_constant("label_valign_bg","Tabs", 5);
- t->set_constant("hseparation","Tabs", 2);
+ t->set_constant("label_valign_fg","Tabs", 0);
+ t->set_constant("label_valign_bg","Tabs", 2);
+ t->set_constant("hseparation","Tabs", 4);
+
+
+
+ // Separators
t->set_stylebox("separator","HSeparator", make_stylebox( vseparator_png,3,3,3,3) );
- t->set_constant("separation","HSeparator", 7);
t->set_stylebox("separator","VSeparator", make_stylebox( hseparator_png,3,3,3,3) );
- t->set_constant("separation","VSeparator", 7);
t->set_icon("close","Icons", make_icon(icon_close_png));
t->set_font("source","Fonts", source_font);
t->set_font("normal","Fonts", default_font );
t->set_font("large","Fonts", large_font );
+ t->set_constant("separation","HSeparator", 4);
+ t->set_constant("separation","VSeparator", 4);
+
+ // Dialogs
- t->set_constant("margin","Dialogs",10);
+ t->set_constant("margin","Dialogs",8);
t->set_constant("button_margin","Dialogs",32);
+
+
+
+ // FileDialog
t->set_icon("folder","FileDialog",make_icon(icon_folder_png));
+
t->set_color("files_disabled","FileDialog",Color(0,0,0,0.7));
+
+
+ // colorPicker
+
t->set_constant("value_height","ColorPicker", 23 );
t->set_constant("value_width","ColorPicker", 50);
t->set_constant("color_width","ColorPicker", 100);
- t->set_constant("label_width","ColorPicker", 15);
+ t->set_constant("label_width","ColorPicker", 20);
t->set_constant("hseparator","ColorPicker", 4);
- Ref<StyleBoxTexture> style_tt = make_stylebox( tooltip_bg_png,9,9,9,9,8,8,8,8);
+
+
+ // TooltipPanel
+
+ Ref<StyleBoxTexture> style_tt = make_stylebox( tooltip_bg_png,4,4,4,4);
for(int i=0;i<4;i++)
style_tt->set_expand_margin_size((Margin)i,4);
+
t->set_stylebox("panel","TooltipPanel", style_tt );
+
t->set_font("font","TooltipLabel", default_font );
+
t->set_color("font_color","TooltipLabel", Color(0,0,0) );
t->set_color("font_color_shadow","TooltipLabel", Color(0,0,0,0.1) );
+
t->set_constant("shadow_offset_x","TooltipLabel", 1 );
t->set_constant("shadow_offset_y","TooltipLabel", 1 );
+
+
+ // RichTextLabel
+
+ t->set_stylebox("focus","RichTextLabel", focus );
+
t->set_font("default_font","RichTextLabel", default_font );
+
t->set_color("default_color","RichTextLabel", control_font_color );
t->set_color("font_color_selected","RichTextLabel", font_color_selection );
t->set_color("selection_color","RichTextLabel", Color(0.1,0.1,1,0.8) );
+
t->set_constant("line_separation","RichTextLabel", 1 );
- t->set_stylebox("focus","RichTextLabel", focus );
+
+ // Containers
+
+ t->set_stylebox("bg","VSplitContainer", make_stylebox( vsplit_bg_png,1,1,1,1) );
+ t->set_stylebox("bg","HSplitContainer", make_stylebox( hsplit_bg_png,1,1,1,1) );
+
+ t->set_icon("grabber","VSplitContainer",make_icon(vsplitter_png));
+ t->set_icon("grabber","HSplitContainer",make_icon(hsplitter_png));
+
t->set_constant("separation","HBoxContainer",4);
t->set_constant("separation","VBoxContainer",4);
- t->set_constant("margin","MarginContainer",15);
-
+ t->set_constant("margin","MarginContainer",8);
t->set_constant("separation","GridContainer",4);
-
- t->set_constant("separation","HSplitContainer",8);
- t->set_constant("separation","VSplitContainer",8);
+ t->set_constant("separation","HSplitContainer",12);
+ t->set_constant("separation","VSplitContainer",12);
t->set_constant("autohide","HSplitContainer",1);
t->set_constant("autohide","VSplitContainer",1);
- t->set_icon("grabber","VSplitContainer",make_icon(vsplitter_png));
- t->set_icon("grabber","HSplitContainer",make_icon(hsplitter_png));
- t->set_stylebox("bg","VSplitContainer", make_stylebox( vsplit_bg_png,1,1,1,1,1,1,1,1) );
- t->set_stylebox("bg","HSplitContainer", make_stylebox( hsplit_bg_png,1,1,1,1,1,1,1,1) );
- t->set_stylebox("normal","HButtonArray", make_stylebox( button_normal_png,2,2,2,2,3,3,3,3) );
- t->set_stylebox("selected","HButtonArray", make_stylebox( button_pressed_png,5,5,5,5,3,3,3,3) );
- t->set_stylebox("hover","HButtonArray", make_stylebox( button_hover_png,5,5,5,5,3,3,3,3) );
- t->set_stylebox("focus","HButtonArray", make_stylebox( focus_png,5,5,5,5,3,3,3,3) );
+
+ // HButtonArray
+
+ t->set_stylebox("normal","HButtonArray", make_stylebox( button_normal_png,4,4,4,4,0,4,22,4) );
+ t->set_stylebox("selected","HButtonArray", make_stylebox( button_pressed_png,4,4,4,4,0,4,22,4) );
+ t->set_stylebox("hover","HButtonArray", make_stylebox( button_hover_png,4,4,4,4) );
+
t->set_font("font","HButtonArray", default_font);
t->set_font("font_selected","HButtonArray", default_font);
- t->set_color("font_color","HButtonArray", Color(1,1,1,1) );
- t->set_color("font_color_selected","HButtonArray", Color(0.7,0.7,0.7,1) );
- t->set_constant("icon_separator","HButtonArray", 2 );
- t->set_constant("button_separator","HButtonArray", 3 );
-
- t->set_stylebox("normal","VButtonArray", make_stylebox( button_normal_png,2,2,2,2,3,3,3,3) );
- t->set_stylebox("selected","VButtonArray", make_stylebox( button_pressed_png,5,5,5,5,3,3,3,3) );
- t->set_stylebox("hover","VButtonArray", make_stylebox( button_hover_png,5,5,5,5,3,3,3,3) );
- t->set_stylebox("focus","VButtonArray", make_stylebox( focus_png,5,5,5,5,3,3,3,3) );
+
+ t->set_color("font_color","HButtonArray", control_font_color_low );
+ t->set_color("font_color_selected","HButtonArray", control_font_color_hover );
+
+ t->set_constant("icon_separator","HButtonArray", 4 );
+ t->set_constant("button_separator","HButtonArray", 8 );
+
+ t->set_stylebox("focus","HButtonArray", focus );
+
+
+ // VButtonArray
+
+ t->set_stylebox("normal","VButtonArray", make_stylebox( button_normal_png,4,4,4,4,0,4,22,4) );
+ t->set_stylebox("selected","VButtonArray", make_stylebox( button_pressed_png,4,4,4,4,0,4,22,4) );
+ t->set_stylebox("hover","VButtonArray", make_stylebox( button_hover_png,4,4,4,4) );
+
t->set_font("font","VButtonArray", default_font);
t->set_font("font_selected","VButtonArray", default_font);
- t->set_color("font_color","VButtonArray", Color(1,1,1,1) );
- t->set_color("font_color_selected","VButtonArray", Color(0.7,0.7,0.7,1) );
- t->set_constant("icon_separator","VButtonArray", 2 );
- t->set_constant("button_separator","VButtonArray", 3 );
- t->set_stylebox("border","ReferenceFrame", make_stylebox( reference_border_png,5,5,5,5,3,3,3,3) );
+ t->set_color("font_color","VButtonArray", control_font_color_low );
+ t->set_color("font_color_selected","VButtonArray", control_font_color_hover );
+
+ t->set_constant("icon_separator","VButtonArray", 4);
+ t->set_constant("button_separator","VButtonArray", 8);
+
+ t->set_stylebox("focus","VButtonArray", focus );
+
+
+ // ReferenceFrame
Ref<StyleBoxTexture> ttnc = make_stylebox( full_panel_bg_png,8,8,8,8);
ttnc->set_draw_center(false);
+
+ t->set_stylebox("border","ReferenceFrame", make_stylebox( reference_border_png,4,4,4,4) );
t->set_stylebox("panelnc","Panel", ttnc );
t->set_stylebox("panelf","Panel", tc_sb );
-
t->set_stylebox("panel","PanelContainer", tc_sb );
t->set_icon( "logo","Icons", make_icon(logo_png) );
+
+
+ // Theme
+
Theme::set_default( t );
Theme::set_default_icon( make_icon(error_icon_png) );
Theme::set_default_style( make_stylebox( error_icon_png,2,2,2,2) );
@@ -626,8 +802,8 @@ void make_default_theme() {
style->set_texture(texture);
for(int i=0;i<4;i++) {
- style->set_margin_size( Margin(),2);
- style->set_default_margin( Margin(),2);
+ style->set_margin_size( Margin(),8);
+ style->set_default_margin( Margin(),8);
}
Ref<Font> f = make_default_font();
diff --git a/scene/resources/default_theme/dropdown.png b/scene/resources/default_theme/dropdown.png
index 5279e72d24..72fc5d73a3 100644
--- a/scene/resources/default_theme/dropdown.png
+++ b/scene/resources/default_theme/dropdown.png
Binary files differ
diff --git a/scene/resources/default_theme/focus.png b/scene/resources/default_theme/focus.png
index 0daf85718f..1656fea188 100644
--- a/scene/resources/default_theme/focus.png
+++ b/scene/resources/default_theme/focus.png
Binary files differ
diff --git a/scene/resources/default_theme/full_panel_bg.png b/scene/resources/default_theme/full_panel_bg.png
index b43469a8aa..771e50e2af 100644
--- a/scene/resources/default_theme/full_panel_bg.png
+++ b/scene/resources/default_theme/full_panel_bg.png
Binary files differ
diff --git a/scene/resources/default_theme/hscroll_bg.png b/scene/resources/default_theme/hscroll_bg.png
deleted file mode 100644
index 9d6381f0c9..0000000000
--- a/scene/resources/default_theme/hscroll_bg.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/hscroll_bg_focus.png b/scene/resources/default_theme/hscroll_bg_focus.png
deleted file mode 100644
index e81a867b87..0000000000
--- a/scene/resources/default_theme/hscroll_bg_focus.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/hscroll_grabber.png b/scene/resources/default_theme/hscroll_grabber.png
deleted file mode 100644
index 9015038911..0000000000
--- a/scene/resources/default_theme/hscroll_grabber.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/hscroll_grabber_hl.png b/scene/resources/default_theme/hscroll_grabber_hl.png
deleted file mode 100644
index 11c895e9e3..0000000000
--- a/scene/resources/default_theme/hscroll_grabber_hl.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/hslider_bg.png b/scene/resources/default_theme/hslider_bg.png
index 2d6c336e18..963e4c8456 100644
--- a/scene/resources/default_theme/hslider_bg.png
+++ b/scene/resources/default_theme/hslider_bg.png
Binary files differ
diff --git a/scene/resources/default_theme/hslider_grabber.png b/scene/resources/default_theme/hslider_grabber.png
index 626709dd32..b72ec4d8f4 100644
--- a/scene/resources/default_theme/hslider_grabber.png
+++ b/scene/resources/default_theme/hslider_grabber.png
Binary files differ
diff --git a/scene/resources/default_theme/hslider_grabber_hl.png b/scene/resources/default_theme/hslider_grabber_hl.png
index 30b06089c5..0dc5f2b615 100644
--- a/scene/resources/default_theme/hslider_grabber_hl.png
+++ b/scene/resources/default_theme/hslider_grabber_hl.png
Binary files differ
diff --git a/scene/resources/default_theme/hslider_tick.png b/scene/resources/default_theme/hslider_tick.png
index 3ba740355e..e8e18b5402 100644
--- a/scene/resources/default_theme/hslider_tick.png
+++ b/scene/resources/default_theme/hslider_tick.png
Binary files differ
diff --git a/scene/resources/default_theme/hsplit_bg.png b/scene/resources/default_theme/hsplit_bg.png
index 6147aac10d..34033289d0 100644
--- a/scene/resources/default_theme/hsplit_bg.png
+++ b/scene/resources/default_theme/hsplit_bg.png
Binary files differ
diff --git a/scene/resources/default_theme/hsplitter.png b/scene/resources/default_theme/hsplitter.png
index cfd9ab7d93..4173dc02e7 100644
--- a/scene/resources/default_theme/hsplitter.png
+++ b/scene/resources/default_theme/hsplitter.png
Binary files differ
diff --git a/scene/resources/default_theme/icon_folder.png b/scene/resources/default_theme/icon_folder.png
index 9ec797a8a5..0abf60253a 100644
--- a/scene/resources/default_theme/icon_folder.png
+++ b/scene/resources/default_theme/icon_folder.png
Binary files differ
diff --git a/scene/resources/default_theme/icon_play.png b/scene/resources/default_theme/icon_play.png
index f04a5cd789..40bbce5f0d 100644
--- a/scene/resources/default_theme/icon_play.png
+++ b/scene/resources/default_theme/icon_play.png
Binary files differ
diff --git a/scene/resources/default_theme/icon_stop.png b/scene/resources/default_theme/icon_stop.png
index 5ae2851d57..b0fd5caa83 100644
--- a/scene/resources/default_theme/icon_stop.png
+++ b/scene/resources/default_theme/icon_stop.png
Binary files differ
diff --git a/scene/resources/default_theme/line_edit.png b/scene/resources/default_theme/line_edit.png
index 3d8b748dff..d0ce0b9d70 100644
--- a/scene/resources/default_theme/line_edit.png
+++ b/scene/resources/default_theme/line_edit.png
Binary files differ
diff --git a/scene/resources/default_theme/line_edit_disabled.png b/scene/resources/default_theme/line_edit_disabled.png
index 4507c36857..edb6a7d5fc 100644
--- a/scene/resources/default_theme/line_edit_disabled.png
+++ b/scene/resources/default_theme/line_edit_disabled.png
Binary files differ
diff --git a/scene/resources/default_theme/option_arrow.png b/scene/resources/default_theme/option_arrow.png
index 4c04cbc6ad..b0ab74421a 100644
--- a/scene/resources/default_theme/option_arrow.png
+++ b/scene/resources/default_theme/option_arrow.png
Binary files differ
diff --git a/scene/resources/default_theme/option_button_disabled.png b/scene/resources/default_theme/option_button_disabled.png
index 6cb7c6f858..6250e34ff8 100644
--- a/scene/resources/default_theme/option_button_disabled.png
+++ b/scene/resources/default_theme/option_button_disabled.png
Binary files differ
diff --git a/scene/resources/default_theme/option_button_hover.png b/scene/resources/default_theme/option_button_hover.png
index da0216e813..8962e8aef9 100644
--- a/scene/resources/default_theme/option_button_hover.png
+++ b/scene/resources/default_theme/option_button_hover.png
Binary files differ
diff --git a/scene/resources/default_theme/option_button_normal.png b/scene/resources/default_theme/option_button_normal.png
index fb61d0b50f..dd47afcd41 100644
--- a/scene/resources/default_theme/option_button_normal.png
+++ b/scene/resources/default_theme/option_button_normal.png
Binary files differ
diff --git a/scene/resources/default_theme/option_button_pressed.png b/scene/resources/default_theme/option_button_pressed.png
index 116e6e2a3e..916da52f07 100644
--- a/scene/resources/default_theme/option_button_pressed.png
+++ b/scene/resources/default_theme/option_button_pressed.png
Binary files differ
diff --git a/scene/resources/default_theme/panel_bg.png b/scene/resources/default_theme/panel_bg.png
index 255269ee68..df08179aac 100644
--- a/scene/resources/default_theme/panel_bg.png
+++ b/scene/resources/default_theme/panel_bg.png
Binary files differ
diff --git a/scene/resources/default_theme/popup_bg.png b/scene/resources/default_theme/popup_bg.png
index 655b3eadf4..3afd0b13dd 100644
--- a/scene/resources/default_theme/popup_bg.png
+++ b/scene/resources/default_theme/popup_bg.png
Binary files differ
diff --git a/scene/resources/default_theme/popup_checked.png b/scene/resources/default_theme/popup_checked.png
index 7cd2cd45b0..d313db6820 100644
--- a/scene/resources/default_theme/popup_checked.png
+++ b/scene/resources/default_theme/popup_checked.png
Binary files differ
diff --git a/scene/resources/default_theme/popup_window.png b/scene/resources/default_theme/popup_window.png
index de903216d1..88fbb3bc83 100644
--- a/scene/resources/default_theme/popup_window.png
+++ b/scene/resources/default_theme/popup_window.png
Binary files differ
diff --git a/scene/resources/default_theme/progress_bar.png b/scene/resources/default_theme/progress_bar.png
index 5d290ce0fb..3016c52216 100644
--- a/scene/resources/default_theme/progress_bar.png
+++ b/scene/resources/default_theme/progress_bar.png
Binary files differ
diff --git a/scene/resources/default_theme/progress_fill.png b/scene/resources/default_theme/progress_fill.png
index d446407f08..ee7c3315e4 100644
--- a/scene/resources/default_theme/progress_fill.png
+++ b/scene/resources/default_theme/progress_fill.png
Binary files differ
diff --git a/scene/resources/default_theme/scroll_bg.png b/scene/resources/default_theme/scroll_bg.png
new file mode 100644
index 0000000000..53797886cd
--- /dev/null
+++ b/scene/resources/default_theme/scroll_bg.png
Binary files differ
diff --git a/scene/resources/default_theme/scroll_button_down.png b/scene/resources/default_theme/scroll_button_down.png
index 87de51d5ef..88b218f581 100644
--- a/scene/resources/default_theme/scroll_button_down.png
+++ b/scene/resources/default_theme/scroll_button_down.png
Binary files differ
diff --git a/scene/resources/default_theme/scroll_button_down_hl.png b/scene/resources/default_theme/scroll_button_down_hl.png
index cfece0d5d0..90b1a48ac8 100644
--- a/scene/resources/default_theme/scroll_button_down_hl.png
+++ b/scene/resources/default_theme/scroll_button_down_hl.png
Binary files differ
diff --git a/scene/resources/default_theme/scroll_button_left.png b/scene/resources/default_theme/scroll_button_left.png
index 57bdb29ea1..8e60a96476 100644
--- a/scene/resources/default_theme/scroll_button_left.png
+++ b/scene/resources/default_theme/scroll_button_left.png
Binary files differ
diff --git a/scene/resources/default_theme/scroll_button_left_hl.png b/scene/resources/default_theme/scroll_button_left_hl.png
index a5f497178a..1114a92381 100644
--- a/scene/resources/default_theme/scroll_button_left_hl.png
+++ b/scene/resources/default_theme/scroll_button_left_hl.png
Binary files differ
diff --git a/scene/resources/default_theme/scroll_button_right.png b/scene/resources/default_theme/scroll_button_right.png
index 7fc0748305..ee79c0aa56 100644
--- a/scene/resources/default_theme/scroll_button_right.png
+++ b/scene/resources/default_theme/scroll_button_right.png
Binary files differ
diff --git a/scene/resources/default_theme/scroll_button_right_hl.png b/scene/resources/default_theme/scroll_button_right_hl.png
index 9e643262b3..b83e24a954 100644
--- a/scene/resources/default_theme/scroll_button_right_hl.png
+++ b/scene/resources/default_theme/scroll_button_right_hl.png
Binary files differ
diff --git a/scene/resources/default_theme/scroll_button_up.png b/scene/resources/default_theme/scroll_button_up.png
index 3487213eba..251106b487 100644
--- a/scene/resources/default_theme/scroll_button_up.png
+++ b/scene/resources/default_theme/scroll_button_up.png
Binary files differ
diff --git a/scene/resources/default_theme/scroll_button_up_hl.png b/scene/resources/default_theme/scroll_button_up_hl.png
index e263754f50..059b4b0f2b 100644
--- a/scene/resources/default_theme/scroll_button_up_hl.png
+++ b/scene/resources/default_theme/scroll_button_up_hl.png
Binary files differ
diff --git a/scene/resources/default_theme/scroll_grabber.png b/scene/resources/default_theme/scroll_grabber.png
new file mode 100644
index 0000000000..16beda1514
--- /dev/null
+++ b/scene/resources/default_theme/scroll_grabber.png
Binary files differ
diff --git a/scene/resources/default_theme/scroll_grabber_hl.png b/scene/resources/default_theme/scroll_grabber_hl.png
new file mode 100644
index 0000000000..acfb7c835b
--- /dev/null
+++ b/scene/resources/default_theme/scroll_grabber_hl.png
Binary files differ
diff --git a/scene/resources/default_theme/selection.png b/scene/resources/default_theme/selection.png
index 08e242c28c..074c7a4d80 100644
--- a/scene/resources/default_theme/selection.png
+++ b/scene/resources/default_theme/selection.png
Binary files differ
diff --git a/scene/resources/default_theme/selection_oof.png b/scene/resources/default_theme/selection_oof.png
index c6e5ee285b..17ec977bd6 100644
--- a/scene/resources/default_theme/selection_oof.png
+++ b/scene/resources/default_theme/selection_oof.png
Binary files differ
diff --git a/scene/resources/default_theme/submenu.png b/scene/resources/default_theme/submenu.png
index 286300e25b..034912eb7a 100644
--- a/scene/resources/default_theme/submenu.png
+++ b/scene/resources/default_theme/submenu.png
Binary files differ
diff --git a/scene/resources/default_theme/tab_behind.png b/scene/resources/default_theme/tab_behind.png
index 953c76eabb..4997d9e441 100644
--- a/scene/resources/default_theme/tab_behind.png
+++ b/scene/resources/default_theme/tab_behind.png
Binary files differ
diff --git a/scene/resources/default_theme/tab_container_bg.png b/scene/resources/default_theme/tab_container_bg.png
index bfe117af39..5cfe85cfef 100644
--- a/scene/resources/default_theme/tab_container_bg.png
+++ b/scene/resources/default_theme/tab_container_bg.png
Binary files differ
diff --git a/scene/resources/default_theme/tab_current.png b/scene/resources/default_theme/tab_current.png
index 08f4faf829..f3cdd96fbf 100644
--- a/scene/resources/default_theme/tab_current.png
+++ b/scene/resources/default_theme/tab_current.png
Binary files differ
diff --git a/scene/resources/default_theme/theme_data.h b/scene/resources/default_theme/theme_data.h
index a0f3dcd988..e9a6d3dad6 100644
--- a/scene/resources/default_theme/theme_data.h
+++ b/scene/resources/default_theme/theme_data.h
@@ -5,12 +5,12 @@
static const unsigned char arrow_down_png[]={
-0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0xc,0x0,0x0,0x0,0xc,0x8,0x6,0x0,0x0,0x0,0x56,0x75,0x5c,0xe7,0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0x98,0x0,0x74,0x0,0xf2,0x18,0x7e,0x84,0x12,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xdd,0x9,0x16,0x10,0x34,0x34,0x9c,0xae,0x6b,0x51,0x0,0x0,0x0,0x91,0x49,0x44,0x41,0x54,0x28,0xcf,0xb5,0x91,0xbd,0x9,0xc3,0x40,0xc,0x85,0xbf,0x5c,0x76,0xf1,0x95,0x1e,0x20,0x99,0xe7,0x46,0x50,0x77,0x95,0xba,0x1b,0x41,0xf3,0x24,0x7b,0x18,0x63,0xbc,0x80,0x21,0xe0,0xca,0x69,0x64,0x38,0x12,0xc7,0x89,0x8b,0x3c,0x10,0xe8,0xe7,0x7b,0xcd,0x13,0xfc,0x5d,0x2a,0x76,0x88,0x3d,0x79,0x73,0x1,0x6e,0x5f,0xf8,0x6b,0x2e,0xe9,0x1e,0x7c,0x58,0x80,0x69,0x7,0x9e,0x9c,0x61,0x35,0x74,0xc0,0x79,0x5d,0xbe,0x68,0xf1,0x5b,0x7,0x10,0x54,0x8c,0x5c,0xd2,0x8,0x44,0x60,0xde,0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0x89,0xa9,0xd7,0xe7,0xc2,0x84,0x1b,0x96,0x82,0xb0,0xa4,0xde,0x94,0xb,0x30,0xe2,0x8e,0x21,0x63,0x43,0x62,0xe3,0xa,0xf6,0xaf,0xd4,0xa1,0xc5,0x2b,0x55,0x9b,0xd8,0x96,0x6b,0xe1,0xa,0x1d,0x1e,0xd9,0xf9,0x23,0x25,0x1,0x9e,0x5f,0x78,0xfd,0xc7,0xbd,0x1,0x73,0x20,0x21,0xa9,0x4,0x80,0xe0,0x11,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
};
static const unsigned char arrow_right_png[]={
-0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0xc,0x0,0x0,0x0,0xc,0x8,0x6,0x0,0x0,0x0,0x56,0x75,0x5c,0xe7,0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0x98,0x0,0x74,0x0,0xf2,0x18,0x7e,0x84,0x12,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xdd,0x9,0x16,0x10,0x35,0x5,0xd4,0x6b,0x5a,0x2a,0x0,0x0,0x0,0xa0,0x49,0x44,0x41,0x54,0x28,0xcf,0x95,0x92,0xbd,0xd,0xc2,0x40,0xc,0x46,0x1f,0x81,0x2,0xa,0x36,0xa0,0x86,0x16,0x6a,0x68,0x59,0xc5,0x23,0xa4,0x73,0x75,0x9d,0x47,0xc8,0x24,0x48,0xb4,0x2c,0x11,0x68,0x10,0x42,0x59,0x80,0x2,0x51,0x1d,0x4d,0x22,0x5,0x73,0x47,0xc4,0xd7,0x59,0xf2,0xf3,0xe7,0x3f,0x68,0x15,0xca,0x8a,0xbe,0x7c,0xdc,0x69,0xe4,0x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,0x6e,0x22,0x22,0x5e,0x40,0xa5,0x5a,0x8d,0x2b,0x32,0x76,0xb9,0x7b,0xba,0x99,0xc9,0x99,0x4c,0xfe,0xa9,0x52,0x4a,0xfa,0x30,0xa,0xf5,0xa,0xd,0xce,0xb8,0x95,0x8,0x5b,0xdc,0x31,0xc4,0x2,0xd7,0x28,0xc,0x5a,0x96,0x4c,0x31,0xc1,0x9,0xf3,0x12,0x1,0x2a,0x8c,0x51,0x47,0xa9,0x4b,0xc8,0xcc,0xb0,0x7f,0x9d,0x57,0x24,0x7c,0xf1,0x4f,0xb8,0x60,0x89,0x43,0x6e,0xc4,0x94,0x32,0xd,0x1e,0xd8,0xe0,0xf8,0x39,0x68,0x13,0x7e,0xc6,0x1a,0x85,0xb5,0x9e,0x8f,0xdb,0x75,0x9c,0xf8,0xe6,0x9,0x8,0x62,0x16,0x5f,0x9a,0xba,0xfd,0xff,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
};
@@ -25,27 +25,27 @@ static const unsigned char base_green_png[]={
static const unsigned char button_disabled_png[]={
-0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0x10,0x0,0x0,0x0,0x10,0x8,0x6,0x0,0x0,0x0,0x1f,0xf3,0xff,0x61,0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0x3e,0x0,0x34,0x0,0x44,0xb5,0x81,0x75,0x5d,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xdd,0x9,0x1b,0x15,0xd,0x2e,0x9b,0xe9,0x5,0xa7,0x0,0x0,0x0,0x19,0x74,0x45,0x58,0x74,0x43,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x0,0x43,0x72,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0xd3,0xf8,0x42,0x66,0x40,0xcf,0xe9,0xbe,0x59,0xae,0xe,0x47,0x93,0xe1,0xb3,0x0,0xd8,0x6d,0x77,0x2a,0x90,0xcf,0xf0,0xc9,0x16,0xd8,0x8,0x45,0xfc,0xee,0x1,0x19,0x87,0x50,0x44,0x2,0xd,0x4,0xc3,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
+0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0x10,0x0,0x0,0x0,0x10,0x8,0x6,0x0,0x0,0x0,0x1f,0xf3,0xff,0x61,0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0x4c,0x0,0x4a,0x0,0x4e,0x88,0x29,0x6a,0xb6,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xde,0x9,0x10,0x13,0x3b,0x32,0x53,0xec,0x41,0x80,0x0,0x0,0x0,0x19,0x74,0x45,0x58,0x74,0x43,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x0,0x43,0x72,0x65,0x61,0x74,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x47,0x49,0x4d,0x50,0x57,0x81,0xe,0x17,0x0,0x0,0x0,0xb5,0x49,0x44,0x41,0x54,0x38,0x8d,0xed,0x93,0x3d,0xe,0x82,0x40,0x10,0x85,0xbf,0x95,0x1d,0x8b,0x85,0x84,0xe8,0x11,0xd8,0x4e,0x8f,0x60,0x8c,0x67,0x37,0x84,0x78,0x2,0xed,0xd6,0x23,0xd8,0x28,0x5b,0x38,0x31,0x58,0x8,0x96,0xb0,0x9,0x8d,0x85,0xd3,0xbd,0xcc,0xbc,0x9f,0x62,0x9e,0x1,0x2c,0xb0,0x4,0x4,0x30,0xa4,0x4d,0x7,0x28,0xf0,0x1c,0xc8,0x6b,0xa0,0x0,0xb2,0x44,0x81,0x17,0xf0,0x0,0x6e,0xb6,0x77,0x2e,0xf6,0xbb,0xc3,0xca,0x57,0x7e,0x23,0x22,0xa3,0x29,0x54,0xb5,0xb,0xd7,0x70,0xa9,0x9b,0x23,0xc0,0xdd,0xf6,0xb1,0x33,0x5f,0xf9,0x6d,0x8c,0x91,0x36,0xc6,0x51,0xeb,0xdc,0x39,0xe3,0x2b,0xbf,0xad,0x9b,0xe3,0x9,0x30,0x8b,0x61,0x21,0x22,0x93,0x64,0x80,0x36,0x46,0x44,0xe4,0x8b,0x17,0x23,0xb7,0x49,0xf3,0x17,0xf8,0x29,0x1,0x55,0x25,0x77,0x6e,0x92,0x90,0x3b,0x87,0xaa,0x7e,0xb1,0xe5,0x53,0x8c,0x57,0xb8,0x86,0xb3,0xaf,0xfc,0xa6,0x2c,0xcb,0xa4,0x57,0xe6,0xd3,0x87,0xce,0x0,0x8e,0x19,0x65,0x32,0xcc,0xac,0xf3,0x1b,0xb6,0xa2,0x3d,0xf4,0x28,0x24,0x4e,0x1c,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
};
static const unsigned char button_hover_png[]={
-0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0x10,0x0,0x0,0x0,0x10,0x8,0x6,0x0,0x0,0x0,0x1f,0xf3,0xff,0x61,0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0x4e,0x0,0x41,0x0,0x56,0xed,0xd0,0x4e,0x61,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xdd,0x9,0x1b,0x15,0xb,0x2f,0xba,0xb4,0x92,0xb7,0x0,0x0,0x0,0x19,0x74,0x45,0x58,0x74,0x43,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x0,0x43,0x72,0x65,0x61,0x74,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x47,0x49,0x4d,0x50,0x57,0x81,0xe,0x17,0x0,0x0,0x1,0x7b,0x49,0x44,0x41,0x54,0x38,0xcb,0x95,0x92,0xbd,0x2f,0x44,0x41,0x14,0xc5,0x7f,0x77,0xbc,0xcd,0x5a,0x1f,0x11,0x11,0x62,0x49,0x56,0x96,0x52,0x45,0xa2,0x53,0x9,0x7a,0x1a,0xbd,0xce,0x1f,0x40,0x2b,0x3a,0xf1,0xf,0xe8,0xf4,0x1a,0x7a,0x12,0x95,0x4e,0x42,0xa5,0x44,0x6c,0xb2,0x88,0x8d,0x42,0x7c,0xbe,0x8f,0x99,0xab,0xd8,0xd9,0xf7,0x56,0x88,0x3c,0x37,0x99,0xc9,0xe4,0xdc,0x73,0xcf,0x9c,0x7b,0x67,0x44,0x55,0x19,0x1b,0x99,0x58,0x2,0xd6,0x80,0x5,0xf2,0xc5,0x31,0xb0,0x7b,0x7b,0x77,0x75,0x28,0x95,0xf2,0xf8,0x7a,0x79,0x70,0x74,0x67,0x6a,0x72,0x86,0x91,0xc1,0xd1,0x5c,0xd5,0x77,0x8d,0x3a,0x17,0x97,0x67,0xdc,0x37,0xea,0x1b,0x52,0x29,0x8f,0x5f,0x2f,0x2f,0xae,0x54,0x3f,0xc2,0x4f,0xde,0x3f,0xde,0x72,0x9,0x74,0x95,0xba,0x29,0x15,0x3b,0x39,0x38,0xda,0xbf,0x9,0x80,0xea,0xf3,0xcb,0x33,0x71,0x12,0x93,0x37,0xde,0xde,0x5f,0x89,0xa2,0x10,0xa0,0x6a,0x80,0x7f,0x15,0xb7,0xa2,0x55,0x13,0x0,0xa8,0x75,0x20,0x3e,0xa3,0xa0,0xfe,0x28,0x1e,0x53,0xf,0x48,0xba,0x91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0x52,0x0,0x0,0x0,0x10,0x0,0x0,0x0,0x10,0x8,0x6,0x0,0x0,0x0,0x1f,0xf3,0xff,0x61,0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0x4c,0x0,0x4a,0x0,0x4e,0x88,0x29,0x6a,0xb6,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xde,0x9,0x10,0x13,0x3b,0xf,0xb,0x84,0xd,0x91,0x0,0x0,0x0,0x19,0x74,0x45,0x58,0x74,0x43,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x0,0x43,0x72,0x65,0x61,0x74,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x47,0x49,0x4d,0x50,0x57,0x81,0xe,0x17,0x0,0x0,0x0,0xba,0x49,0x44,0x41,0x54,0x38,0x8d,0xed,0xd3,0xb1,0x4e,0xc3,0x40,0x10,0x84,0xe1,0xef,0xc2,0x4a,0x9c,0x90,0xb,0x6a,0x9f,0xe0,0x9,0x2,0xbc,0x58,0xc2,0xcb,0xc0,0x8b,0x85,0xa4,0xa6,0x41,0x4e,0x4d,0x41,0x71,0x91,0xe,0x99,0x2,0xd7,0x76,0xa4,0x34,0x14,0x6c,0xb9,0xda,0xf9,0x47,0x2b,0xcd,0x24,0xdc,0xe0,0x16,0x1d,0xae,0x90,0xcc,0xcf,0x88,0x6f,0x7c,0xe1,0x33,0x26,0xf1,0x23,0xee,0x90,0xcf,0x4,0x54,0x7c,0xe0,0x2d,0x26,0xe7,0xfb,0x87,0xf5,0xd3,0xba,0xf4,0x65,0x13,0x11,0xb3,0x80,0xd6,0xda,0x38,0x1c,0x87,0xd7,0xfd,0x61,0x97,0xf0,0x1e,0x8,0x5c,0x97,0xbe,0x6c,0x6b,0xad,0x6a,0xad,0xb3,0xf6,0x39,0xe7,0x54,0xfa,0xb2,0xdd,0x1f,0x76,0xcf,0x88,0xd5,0xb4,0x4f,0x11,0xb1,0x28,0x86,0x5a,0xab,0x88,0x60,0x7a,0x75,0x35,0x7f,0xbe,0x3c,0xff,0x80,0xbf,0x4,0x18,0x5b,0x6b,0x72,0xce,0x8b,0x82,0x9c,0xb3,0xd6,0x1a,0xbf,0x91,0x16,0x68,0x38,0xd,0xc7,0xe1,0xa5,0xf4,0x65,0xd3,0x75,0xdd,0x59,0x51,0xc6,0x9,0x2d,0xa1,0x77,0x41,0x99,0x92,0xb,0xeb,0xfc,0x3,0xd0,0xc5,0x44,0x36,0x1d,0x79,0x84,0xde,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
};
static const unsigned char button_normal_png[]={
-0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0x10,0x0,0x0,0x0,0x10,0x8,0x6,0x0,0x0,0x0,0x1f,0xf3,0xff,0x61,0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0x4e,0x0,0x41,0x0,0x56,0xed,0xd0,0x4e,0x61,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xdd,0x9,0x1b,0x15,0xb,0x19,0x75,0xe,0x7,0x2e,0x0,0x0,0x0,0x19,0x74,0x45,0x58,0x74,0x43,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x0,0x43,0x72,0x65,0x61,0x74,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x47,0x49,0x4d,0x50,0x57,0x81,0xe,0x17,0x0,0x0,0x1,0x77,0x49,0x44,0x41,0x54,0x38,0xcb,0x95,0x92,0x3d,0x4f,0x54,0x41,0x14,0x86,0x9f,0xb3,0x7b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x27,0x37,0x5e,0x6d,0x4f,0x26,0x0,0x0,0x0,0x19,0x74,0x45,0x58,0x74,0x43,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x0,0x43,0x72,0x65,0x61,0x74,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x47,0x49,0x4d,0x50,0x57,0x81,0xe,0x17,0x0,0x0,0x0,0xb5,0x49,0x44,0x41,0x54,0x38,0x8d,0xed,0xd3,0x31,0x4e,0xc3,0x40,0x14,0x45,0xd1,0x33,0x61,0x24,0x10,0xa2,0x60,0x3a,0x32,0x23,0x58,0x41,0x80,0x8d,0x25,0x6c,0x6,0x36,0x16,0x92,0x9a,0x26,0x72,0x5a,0x53,0x50,0x38,0x52,0xd0,0x50,0x60,0x44,0x67,0x5b,0x4a,0x43,0xc1,0xab,0xdf,0xbd,0xbf,0x79,0x3f,0xe0,0x12,0xd7,0xb8,0xc2,0x19,0x82,0xe1,0x54,0x7c,0xe2,0x3,0xef,0xb1,0x87,0x1f,0x70,0x8b,0x8b,0x89,0x82,0xe,0x3b,0xbc,0xc6,0xfe,0xf2,0xdd,0xfd,0xe2,0x71,0x51,0x72,0x59,0xaa,0x23,0x82,0xa0,0x36,0xfb,0xe6,0x65,0xb3,0x5d,0x7,0xbc,0x45,0x44,0x9c,0x97,0x5c,0x56,0x5d,0xd7,0x69,0xdb,0x76,0x90,0x4f,0x29,0x85,0x92,0xcb,0x6a,0xb3,0x5d,0x3f,0x21,0xce,0x7e,0xbd,0x46,0x61,0xfa,0x4e,0xed,0x19,0xcc,0x6,0xdb,0x13,0xf2,0x2f,0xf8,0x4b,0x82,0x2a,0x90,0x52,0x1a,0x5,0x52,0x4a,0x3f,0x63,0xaf,0x7c,0xaf,0xf0,0x88,0x43,0xb3,0x6f,0x9e,0x4b,0x2e,0xcb,0xf9,0xcd,0x7c,0xd2,0x94,0x71,0xc0,0x31,0x20,0x3b,0xe1,0x99,0x82,0x13,0xdf,0xf9,0xb,0x7f,0x70,0x3b,0x69,0x4a,0x9d,0x12,0xc4,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
};
static const unsigned char button_pressed_png[]={
-0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0x10,0x0,0x0,0x0,0x10,0x8,0x6,0x0,0x0,0x0,0x1f,0xf3,0xff,0x61,0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0x3e,0x0,0x34,0x0,0x44,0xb5,0x81,0x75,0x5d,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xdd,0x9,0x1b,0x15,0xd,0xa,0xa7,0xea,0xe1,0x76,0x0,0x0,0x0,0x19,0x74,0x45,0x58,0x74,0x43,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x0,0x43,0x72,0x65,0x61,0x74,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x47,0x49,0x4d,0x50,0x57,0x81,0xe,0x17,0x0,0x0,0x1,0x53,0x49,0x44,0x41,0x54,0x38,0xcb,0x95,0x93,0x4d,0x4a,0xc4,0x40,0x10,0x85,0xbf,0x72,0x12,0x93,0x19,0xfc,0x43,0x4,0x51,0x41,0x1c,0xf4,0xa,0xae,0xdd,0xe8,0x1,0xbc,0x82,0xbb,0x39,0x80,0x6e,0xc5,0x9d,0x78,0x1,0x77,0x5e,0xc1,0x3,0xcc,0xca,0xb5,0x57,0x10,0x84,0x1,0x11,0x51,0x5c,0x89,0x26,0x23,0xa9,0xe7,0xa2,0x3b,0x71,0x46,0x66,0x11,0x6b,0xd1,0x5d,0xa4,0xaa,0x5e,0xbf,0xf7,0xba,0x63,0x92,0xe8,0x6f,0xed,0x1d,0x3,0x3,0xe0,0x88,0x76,0x31,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x70,0x8d,0xb,0x4,0xe3,0xe8,0xf1,0x8d,0x2f,0x7c,0x16,0x3,0xf9,0x1e,0xd,0xca,0x13,0x5,0x76,0xd8,0xe0,0xad,0x18,0x9c,0xdb,0xc7,0x87,0xa7,0xbb,0xb6,0xe9,0xa6,0x31,0xc6,0x51,0x81,0x9c,0x73,0xbf,0xde,0xac,0x5e,0x17,0xcb,0x79,0xc0,0x7b,0x81,0x2,0x97,0x6d,0xd3,0xcd,0x52,0x4a,0xb6,0x1f,0xdb,0x51,0xfb,0xaa,0xac,0x42,0xdb,0x74,0xb3,0xc5,0x72,0xfe,0x8c,0x62,0x32,0xcc,0x43,0x8c,0x51,0xda,0xa5,0x23,0xd7,0x93,0x76,0x49,0x8c,0x91,0xe1,0xd5,0xc9,0xf8,0xfa,0x71,0xfc,0xb,0xfc,0x25,0x81,0x3e,0xe7,0xac,0x2a,0xab,0xa3,0x84,0xaa,0xac,0xe4,0x9c,0xf9,0x8d,0xb4,0x2,0x7,0xec,0xd7,0x9b,0xd5,0x4b,0xdb,0x74,0xd3,0xba,0xae,0x4f,0x8a,0x32,0xf6,0x38,0x4,0xdc,0x3a,0xa3,0x4c,0xc1,0x99,0x75,0xfe,0x1,0x94,0xfc,0x44,0x1b,0xd0,0x15,0xb1,0x70,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
};
static const unsigned char checked_png[]={
-0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0x10,0x0,0x0,0x0,0x10,0x8,0x6,0x0,0x0,0x0,0x1f,0xf3,0xff,0x61,0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0x34,0x0,0x2e,0x0,0x39,0xc0,0x34,0x46,0xdb,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xdd,0x9,0x1b,0x12,0x7,0x16,0x4c,0x4b,0x43,0x36,0x0,0x0,0x0,0x19,0x74,0x45,0x58,0x74,0x43,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x0,0x43,0x72,0x65,0x61,0x74,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x47,0x49,0x4d,0x50,0x57,0x81,0xe,0x17,0x0,0x0,0x1,0xd0,0x49,0x44,0x41,0x54,0x38,0xcb,0xa5,0x93,0xbf,0x6b,0x53,0x51,0x14,0xc7,0x3f,0xaf,0x7d,0xa4,0x31,0x49,0x93,0x26,0x69,0x5e,0x5e,0x4c,0x8a,0x15,0x41,0x84,0x80,0xb5,0xb5,0x2a,0x82,0xa2,0xa8,0x4b,0xc1,0x45,0xc1,0x5d,0xba,0x94,0xe,0x5,0x11,0x4,0x45,0x94,0x3a,0x29,0xe,0xae,0x1d,0x4,0xd1,0xc1,0x3f,0x40,0x7,0xd1,0x49,0x8c,0x14,0x5c,0x8a,0x38,0x38,0x44,0xc8,0x62,0x69,0x4d,0x43,0xa5,0xc5,0xa,0x49,0xee,0xbb,0x3f,0x1c,0x34,0x8f,0xbc,0xf4,0x5,0x44,0xf,0x1c,0xb8,0xf7,0x7e,0xcf,0xf9,0x9c,0xc3,0xe1,0x1e,0xcb,0x71,0x1c,0xfe,0xc7,0xec,0xde,0x87,0x46,0xa3,0xf1,0xd7,0xc9,0x8e,0xe3,0x4,0x1,0x83,0x26,0x72,0xb5,0x90,0x2b,0xcd,0x3,0xc7,0x7b,0x83,0xc7,0x8b,0x7,0xb8,0xbe,0x70,0xe3,0x47,0x3c,0x11,0xab,0x65,0xf3,0xe9,0x63,0x27,0xce,0x4e,0xaa,0x40,0x7,0x83,0x26,0x72,0xd7,0x1d,0xdd,0x7b,0xef,0xf0,0xc1,0x29,0x32,0xa9,0xdc,0xae,0x6a,0xe7,0x67,0xce,0xa0,0x94,0x4a,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52,0xa0,0xb4,0x46,0xfd,0xa9,0x58,0xc8,0x8d,0xf9,0x77,0x21,0x5,0x1b,0x9b,0xeb,0x0,0x4b,0x9d,0x24,0xab,0x7b,0x99,0xdc,0x91,0xb1,0xfb,0x5b,0x3b,0xdf,0x67,0xa5,0x94,0xa1,0x1b,0x66,0xdb,0x76,0x23,0x3d,0x9c,0x7d,0x52,0xdf,0x5e,0xbd,0x15,0xa,0xa8,0x7f,0xab,0x47,0x80,0x44,0xef,0x70,0xbb,0xc7,0x4,0xfc,0x74,0xb,0xae,0x8,0x5,0xfc,0x8b,0xfd,0x2,0xb8,0xb3,0xcd,0xf1,0xa1,0x77,0xab,0xc4,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
+0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0x10,0x0,0x0,0x0,0x10,0x8,0x6,0x0,0x0,0x0,0x1f,0xf3,0xff,0x61,0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0x0,0x0,0x0,0x0,0x0,0xf9,0x43,0xbb,0x7f,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xde,0x9,0x12,0x0,0x36,0x36,0x55,0x46,0x2e,0x76,0x0,0x0,0x0,0x19,0x74,0x45,0x58,0x74,0x43,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x0,0x43,0x72,0x65,0x61,0x74,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x47,0x49,0x4d,0x50,0x57,0x81,0xe,0x17,0x0,0x0,0x1,0xbd,0x49,0x44,0x41,0x54,0x38,0x8d,0x8d,0x93,0x4f,0x6b,0x13,0x51,0x14,0xc5,0x7f,0x93,0x99,0x84,0xa1,0xd2,0x8c,0x90,0x49,0xba,0xea,0xb6,0x1f,0xa0,0x8,0x76,0xa3,0xad,0x6d,0x53,0x4a,0x96,0x22,0x4a,0xb,0x2e,0x55,0xfc,0x6,0x36,0x74,0x2b,0x45,0xba,0xaf,0x71,0x61,0x71,0x95,0x42,0x37,0x52,0xdc,0x34,0x85,0x92,0xa2,0xb8,0xb7,0x4,0x4d,0xd5,0xb8,0xd2,0x85,0x98,0xcc,0x22,0x23,0x99,0xc9,0xcc,0xa4,0x6f,0xba,0xc8,0x4c,0x9b,0x92,0x97,0xd2,0xb,0x8f,0xb,0xef,0xbd,0x73,0xce,0xfd,0xab,0xd0,0x37,0x5,0x48,0x0,0x5a,0xe4,0xaf,0x32,0x1,0xf4,0x22,0x1f,0x2a,0x11,0x38,0x9,0x64,0x80,0x49,0x20,0x7d,0x5,0x89,0x0,0x6c,0xe0,0x37,0x60,0x1,0x41,0xac,0x98,0xd1,0x54,0x6d,0x6e,0x61,0x3e,0x5f,0x4e,0x26,0x93,0x52,0x64,0x36,0x97,0x65,0xad,0xf8,0x2,0xd7,0x75,0x99,0x99,0xb9,0xfd,0xd8,0x75,0xdd,0x43,0xe0,0x9f,0xa,0xa4,0x80,0xa9,0xa5,0xfc,0xf2,0xbe,0xe7,0x79,0xd8,0xb6,0x8d,0xe3,0x38,0x43,0xe7,0xd9,0xd3,0x27,0x8c,0xa7,0xc7,0x29,0x6d,0xbd,0x21,0x97,0x9d,0xb8,0xff,0xfd,0xc7,0xc9,0x2e,0xd0,0x4c,0x44,0x11,0x18,0x9a,0xa6,0xd1,0xed,0x76,0xa5,0xea,0x85,0x42,0x81,0xe9,0x5b,0xd3,0xec,0xbd,0xdf,0xa3,0x56,0xab,0x11,0x86,0x21,0x80,0x1,0x24,0xe2,0x5c,0x95,0x41,0x80,0xaa,0xaa,0x97,0x8,0x1e,0x3e,0x7a,0x40,0xe3,0xe7,0x2f,0xaa,0xd5,0x23,0x82,0x20,0x40,0x8,0x41,0x24,0x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png[]={
static const unsigned char close_hl_png[]={
-0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0x10,0x0,0x0,0x0,0x10,0x8,0x6,0x0,0x0,0x0,0x1f,0xf3,0xff,0x61,0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0x73,0x0,0x29,0x0,0x7c,0x29,0x1e,0x61,0x18,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xdd,0x9,0x19,0x1,0x14,0x12,0x9e,0xa0,0x13,0x1f,0x0,0x0,0x1,0xbf,0x49,0x44,0x41,0x54,0x38,0xcb,0xcd,0x52,0x4d,0x8f,0xd2,0x50,0x14,0x3d,0x7d,0xaf,0xad,0xbc,0x9a,0xf6,0xd5,0x21,0x8,0x63,0x13,0x61,0xe1,0x8a,0xb5,0x23,0x6,0x8b,0x2b,0xd8,0xba,0x98,0x59,0xcd,0x2f,0x30,0xf3,0x3,0xf4,0x87,0x68,0x4c,0xf4,0x1f,0xe8,0x4f,0x30,0xb3,0xd3,0x8d,0xbb,0x59,0x98,0x8,0x21,0x10,0x9d,0x90,0x20,0x8f,0x41,0xd3,0x7,0x25,0xd8,0xf,0x5a,0x37,0x25,0x61,0x9a,0xea,0x56,0xcf,0xe6,0xdd,0x77,0xee,0xbd,0x27,0xb9,0xf7,0x5c,0xe0,0x5f,0x43,0x29,0xf8,0xab,0x59,0x1c,0xe5,0x72,0x5a,0xf6,0xc6,0x0,0xd2,0x1d,0x49,0x73,0xcd,0xb7,0xea,0xf5,0xfa,0x31,0x0,0x33,0x8,0x2,0x9,0x20,0xc8,0x78,0x9b,0x73,0x7e,0xbf,0x56,0xab,0xb9,0x52,0xca,0x9,0x80,0x5f,0x45,0x2,0x5a,0xa3,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0x73,0x5c,0x4,0x11,0x8e,0xb1,0x88,0x31,0x1c,0x6,0x16,0x64,0x85,0x65,0x6a,0x8f,0x72,0x2b,0x5,0x25,0x3f,0xcb,0x14,0x46,0xb9,0x58,0x42,0x4b,0x79,0x7,0xd2,0xc,0x4b,0xd6,0xf1,0x36,0x7e,0x3,0x2b,0x36,0x3d,0x6b,0xfa,0xe7,0xaf,0xa6,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
};
@@ -65,7 +65,7 @@ static const unsigned char dosfont_png[]={
static const unsigned char dropdown_png[]={
-0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0x8,0x0,0x0,0x0,0x8,0x8,0x6,0x0,0x0,0x0,0xc4,0xf,0xbe,0x8b,0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0x73,0x0,0x29,0x0,0x7c,0x29,0x1e,0x61,0x18,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xdd,0x9,0x19,0x1,0x18,0x18,0xd2,0xc0,0xb5,0xd,0x0,0x0,0x0,0x8e,0x49,0x44,0x41,0x54,0x18,0xd3,0x63,0x60,0x60,0x60,0x60,0xf8,0xf0,0xf6,0x33,0x33,0x3,0x1a,0x80,0x89,0x31,0x7e,0x78,0xfb,0x99,0xf9,0xdf,0xbf,0x7f,0x7a,0x28,0xb2,0xff,0x19,0x98,0x19,0x18,0x18,0x18,0x84,0xc4,0xf8,0xcf,0xb0,0xfc,0xfd,0xfb,0xcf,0xfe,0xcb,0xc7,0x6f,0x7b,0x19,0xb0,0x80,0x57,0xcf,0xde,0x75,0x33,0x31,0x31,0x32,0xde,0x87,0xf2,0xff,0xa0,0x2b,0x60,0x62,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0xfd,0xff,0x7e,0x26,0xf,0x0,0xc0,0xcc,0x1a,0xc3,0xf5,0x4e,0x31,0xb3,0x6e,0xad,0x9d,0xf6,0x50,0x44,0x34,0x0,0x38,0xe7,0x1e,0x53,0xad,0xf5,0x5c,0x4a,0xb9,0x8f,0x1f,0x0,0x20,0x84,0x70,0x23,0xa5,0xd4,0x6b,0xcb,0xdf,0x71,0x40,0x44,0x4f,0x22,0xa2,0xb7,0xb5,0xf6,0x0,0x60,0x2,0x50,0x3b,0x34,0xc6,0x5c,0xbc,0xf7,0xab,0xda,0x84,0x66,0x11,0x71,0x39,0xe7,0xcf,0xe,0x2e,0xa3,0xf5,0x9c,0x52,0x3a,0xc6,0x18,0xaf,0xff,0x7c,0xfa,0x88,0xc6,0xee,0x7,0x3f,0xda,0x36,0xc7,0xfa,0xc,0x38,0x2c,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
};
@@ -75,7 +75,7 @@ static const unsigned char error_icon_png[]={
static const unsigned char focus_png[]={
-0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0x10,0x0,0x0,0x0,0x10,0x8,0x6,0x0,0x0,0x0,0x1f,0xf3,0xff,0x61,0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0x34,0x0,0x2e,0x0,0x39,0xc0,0x34,0x46,0xdb,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xdd,0x9,0x1b,0x12,0x3,0x2b,0x70,0x4f,0xca,0x23,0x0,0x0,0x0,0x19,0x74,0x45,0x58,0x74,0x43,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x0,0x43,0x72,0x65,0x61,0x74,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x47,0x49,0x4d,0x50,0x57,0x81,0xe,0x17,0x0,0x0,0x1,0x41,0x49,0x44,0x41,0x54,0x38,0xcb,0xad,0x53,0x3b,0x6e,0xc2,0x50,0x10,0x9c,0xb5,0xcd,0x47,0xf,0x1b,0x9,0x21,0x71,0x1,0xce,0x90,0x1b,0xa4,0xd,0x17,0x40,0xe9,0x42,0x84,0x94,0x2a,0x5d,0x4,0x32,0x2d,0xe9,0xa8,0xd2,0xc4,0xe9,0x72,0x84,0xb4,0xa9,0x28,0x49,0xc5,0x1,0xb8,0x80,0x45,0x1a,0x40,0x18,0x23,0xfb,0x4d,0x9a,0x67,0xc9,0x21,0x18,0x85,0x28,0x23,0x8d,0xb6,0x9a,0x91,0x76,0x77,0x46,0x60,0x40,0x52,0x0,0x58,0x86,0xc8,0xcd,0xc,0x3a,0x37,0xb5,0x88,0x10,0x0,0x24,0x27,0x76,0x0,0x94,0xd,0x9d,0x3,0x33,0x6d,0x98,0x0,0xd8,0x1b,0x26,0x22,0x42,0xc9,0x89,0xab,0x93,0xbb,0xd7,0x60,0xb5,0x59,0x5d,0x26,0xc9,0xbe,0x89,0x23,0x70,0x9c,0xf2,0x67,0xdd,0xad,0xbf,0xdf,0x3f,0x5d,0xf7,0x0,0xec,0x0,0x24,0x20,0x69,0x93,0xac,0x8d,0x7b,0xc1,0xb4,0xdf,0x19,0x30,0x9c,0xf3,0xa8,0x18,0x0,0xc2,0x39,0x9b,0xfd,0xce,0x80,0xe3,0x5e,0x30,0x25,0x59,0x23,0x69,0x83,0x64,0x89,0x64,0xc3,0xef,0x4e,0xa2,0x34,0xa6,0x78,0x2d,0xb4,0x8b,0xc,0xbc,0x16,0xda,0x69,0x4c,0xf1,0xbb,0x93,0x88,0x64,0x83,0x64,0x29,0xdb,0xd3,0x21,0x59,0xb5,0x2b,0xc2,0x75,0x88,0x45,0x91,0xc1,0x3a,0xc4,0xc2,0xae,0x8,0x49,0x56,0xb3,0x3b,0x15,0x5d,0xfc,0x37,0xb0,0x70,0xe2,0x65,0x67,0x1b,0xfc,0x19,0xd6,0x41,0x48,0xce,0x81,0xfe,0x37,0x3,0x6d,0x52,0x15,0x9d,0xca,0x40,0x3e,0xb,0x22,0x12,0x99,0x54,0xea,0xcc,0x60,0xaf,0x94,0x3b,0x1b,0xf9,0xc3,0x65,0x1a,0xd3,0x2b,0x12,0xa7,0x31,0xbd,0x91,0x3f,0x5c,0x2a,0xe5,0xce,0x4c,0x9c,0x75,0x3e,0xca,0xea,0xf1,0xf6,0xe5,0x6d,0xbb,0xdd,0x5c,0x98,0x3f,0xff,0x80,0x88,0xec,0x94,0x72,0x3f,0x1e,0x9e,0x6f,0xae,0x0,0x6c,0x1,0x24,0x59,0x99,0x6c,0xb3,0xce,0x39,0x65,0xd2,0x22,0x92,0x4a,0x41,0x9d,0xad,0x13,0x87,0xfb,0x56,0xe7,0x2f,0x3a,0x44,0xa3,0xad,0xf6,0x7e,0xe,0x1,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
+0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0x10,0x0,0x0,0x0,0x10,0x8,0x6,0x0,0x0,0x0,0x1f,0xf3,0xff,0x61,0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0xff,0x0,0xff,0x0,0xff,0xa0,0xbd,0xa7,0x93,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xde,0x9,0xf,0x14,0x37,0x23,0x98,0xdc,0x7f,0x32,0x0,0x0,0x0,0x19,0x74,0x45,0x58,0x74,0x43,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x0,0x43,0x72,0x65,0x61,0x74,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x47,0x49,0x4d,0x50,0x57,0x81,0xe,0x17,0x0,0x0,0x1,0x33,0x49,0x44,0x41,0x54,0x38,0x8d,0xad,0x53,0x3b,0x6e,0xc2,0x50,0x10,0x9c,0x85,0xe7,0x8,0x65,0xe5,0x2,0x71,0x4,0xce,0x90,0x1b,0xa4,0xcd,0x2d,0x9c,0x23,0xb8,0x40,0xb2,0x84,0xa9,0x38,0x44,0x8e,0x91,0x36,0x15,0x25,0x39,0x3,0xfd,0x2b,0x48,0x85,0x5e,0x8c,0x60,0xf3,0x26,0x5,0x7e,0x91,0x45,0x70,0x94,0xdf,0x48,0xa3,0xad,0x66,0xa4,0xdd,0x9d,0x11,0xb4,0x20,0x29,0x0,0x6,0x2d,0xd1,0x99,0x9,0xb1,0x33,0xa3,0x88,0x10,0x0,0xa4,0x23,0x76,0x0,0xae,0x5a,0xba,0x33,0xb3,0xd8,0xd2,0x0,0x1c,0x5a,0x9a,0x88,0x50,0x3a,0xe2,0xd1,0x72,0xb9,0x7c,0xd8,0xed,0x76,0xb7,0xc7,0xe3,0x71,0x82,0xb,0xc8,0xb2,0xec,0x25,0xcf,0xf3,0xa7,0xd9,0x6c,0x76,0xf,0x60,0xf,0xc0,0x40,0x72,0x48,0x52,0xeb,0xba,0x5e,0x15,0x45,0x41,0xef,0xfd,0x45,0x31,0x0,0x78,0xef,0x27,0x45,0x51,0xb0,0xae,0xeb,0x15,0x49,0x25,0x39,0x4,0xc9,0x8c,0xe4,0xb8,0x2c,0xcb,0xc6,0xcc,0x44,0x55,0xa7,0x7d,0x6,0xaa,0x3a,0x35,0x33,0x29,0xcb,0xb2,0x21,0x39,0x26,0x99,0xa5,0x3d,0x1d,0xc9,0x91,0x73,0x8e,0x21,0x84,0x4d,0x9f,0x41,0x8,0x61,0xe3,0x9c,0x23,0xc9,0x51,0xba,0x53,0xdf,0xc5,0xbf,0x83,0x41,0x57,0xf8,0x67,0x83,0x5f,0xa3,0xfb,0xe7,0x9f,0x22,0xfe,0x9b,0x41,0xc4,0x29,0x55,0xcd,0x57,0x19,0x48,0xf0,0xde,0x4f,0x44,0xa4,0xc1,0x29,0x95,0x31,0x19,0x1c,0x54,0x75,0x5d,0x55,0xd5,0xd6,0xcc,0xf2,0x3e,0xb1,0x99,0xe5,0x55,0x55,0x6d,0x55,0x75,0x8d,0x53,0x9c,0x63,0x37,0xca,0xd7,0x8b,0xc5,0xe2,0x31,0x84,0x70,0xd3,0xfe,0xf9,0x13,0x44,0x64,0xaf,0xaa,0xcf,0xf3,0xf9,0xfc,0xe,0xc0,0x2b,0x0,0x4b,0x65,0x1a,0xb6,0xeb,0xfc,0xa4,0x4c,0x51,0x44,0xde,0x24,0xb9,0x9f,0xd5,0xb9,0xef,0xbd,0xc9,0xe8,0xa3,0xce,0xef,0x1,0xe9,0xa5,0x7b,0x14,0xf7,0x5d,0x8c,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
};
@@ -95,7 +95,7 @@ static const unsigned char font_normal_png[]={
static const unsigned char full_panel_bg_png[]={
-0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0x20,0x0,0x0,0x0,0x20,0x8,0x6,0x0,0x0,0x0,0x73,0x7a,0x7a,0xf4,0x0,0x0,0x0,0x1,0x73,0x52,0x47,0x42,0x0,0xae,0xce,0x1c,0xe9,0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0xff,0x0,0xff,0x0,0xff,0xa0,0xbd,0xa7,0x93,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xdb,0xb,0x4,0x13,0x34,0x38,0xc1,0xd7,0xb6,0x4a,0x0,0x0,0x4,0x58,0x49,0x44,0x41,0x54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2,0x53,0x7,0x34,0x22,0x91,0x72,0x70,0x2a,0x4f,0xad,0x15,0x29,0x9e,0x20,0xa4,0xb2,0x20,0x1d,0xb0,0x30,0xee,0xb5,0xec,0xd,0x8a,0xcd,0x32,0xa1,0x41,0x82,0x29,0x14,0xe6,0x2b,0x4d,0x13,0xc6,0xb2,0x94,0xf,0x9f,0xa5,0x5f,0x80,0x5c,0x11,0x81,0x95,0x82,0x86,0xcb,0x73,0x23,0xc7,0xb,0xfe,0xc5,0x59,0x5a,0xcf,0x2c,0xd3,0x39,0x3a,0xe3,0x79,0xe0,0xc9,0x7c,0x92,0xa2,0x95,0x62,0x24,0xc4,0xee,0x65,0xf3,0x0,0x61,0x24,0x4e,0xe7,0x5a,0xf6,0xbc,0x35,0xd1,0xb3,0xc6,0xaf,0x38,0x72,0x2,0x4b,0x46,0x23,0x80,0xdd,0x5a,0x2b,0x3a,0x48,0x54,0x43,0x7c,0x1,0xc4,0x5d,0x98,0x55,0x14,0x9c,0x99,0xbd,0x8,0x39,0xf5,0xf3,0xdc,0xbc,0xc,0x21,0xb3,0x97,0x23,0xd7,0x13,0x3,0x78,0xbc,0x47,0x39,0xce,0x69,0x47,0x6b,0xc1,0xcf,0x1b,0x10,0xa9,0x1e,0xca,0xce,0x32,0xf4,0x2c,0x45,0x5a,0xeb,0x46,0xfd,0x18,0x38,0x33,0xc1,0x51,0x31,0xc0,0x28,0x46,0x79,0x1d,0x29,0x44,0x27,0x2e,0xab,0x80,0xcd,0xc,0x73,0xc5,0xff,0xc5,0xce,0xe7,0x7d,0x60,0xa1,0xef,0xa9,0xbf,0x1,0xda,0x71,0x2c,0x91,0xf,0x16,0xac,0x8,0xf4,0xe3,0x0,0xf7,0x94,0xe1,0x1b,0xe3,0x83,0x92,0x36,0x30,0x62,0x8b,0x1,0x76,0x2b,0xba,0x2a,0x5,0x29,0x5b,0x8a,0x6c,0x99,0x8e,0xa9,0x84,0xe1,0xc4,0x1e,0xb9,0x60,0xea,0x80,0xcf,0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0x5b,0xce,0xdc,0x6c,0x6c,0x6,0x7,0x88,0x31,0x62,0x36,0x56,0xff,0x4c,0x80,0x85,0xc0,0xb6,0x6d,0x5f,0x2b,0x33,0xab,0xfe,0x98,0x34,0x27,0xfe,0x51,0x5d,0xa0,0xb,0x74,0x81,0x2e,0xd0,0x5,0xba,0x40,0x17,0xe8,0x2,0x5d,0x40,0x60,0xde,0xd9,0xcb,0xa6,0xda,0x14,0x28,0x32,0xf1,0x0,0x64,0x99,0x52,0x44,0x3c,0x21,0x84,0x66,0xf0,0x10,0x2,0x22,0xfe,0x77,0x32,0x2a,0x89,0xe5,0x76,0xbf,0xee,0x12,0x4c,0x54,0x75,0xce,0x89,0xc3,0x70,0xc9,0x65,0x55,0xde,0x33,0x9a,0x95,0x91,0x4f,0x1d,0x0,0x50,0x55,0x44,0x64,0xb7,0x70,0xa,0xcc,0x2,0xce,0xb9,0x7f,0x89,0xe7,0xdf,0x5f,0xef,0xae,0xd,0xbd,0x13,0x36,0x6e,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
};
@@ -114,58 +114,38 @@ static const unsigned char graph_port_png[]={
};
-static const unsigned char hscroll_bg_png[]={
-0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0x8,0x0,0x0,0x0,0x8,0x8,0x6,0x0,0x0,0x0,0xc4,0xf,0xbe,0x8b,0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0x49,0x0,0x42,0x0,0x4e,0x4e,0xda,0xb4,0x7e,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xdd,0x9,0x1b,0x12,0x30,0x1c,0x3c,0x99,0xa,0x1c,0x0,0x0,0x0,0x19,0x74,0x45,0x58,0x74,0x43,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x0,0x43,0x72,0x65,0x61,0x74,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x47,0x49,0x4d,0x50,0x57,0x81,0xe,0x17,0x0,0x0,0x0,0x53,0x49,0x44,0x41,0x54,0x18,0xd3,0x7d,0x8f,0xc9,0xd,0x80,0x20,0x0,0xc0,0xca,0x21,0xe8,0x5f,0x12,0x89,0x84,0xfd,0x5c,0x48,0x26,0x34,0x3e,0x74,0x2,0xa2,0xe8,0x2,0x40,0xbf,0xed,0xa7,0xc2,0xbb,0xb0,0x3,0x1b,0x75,0x92,0xf0,0x2e,0x7c,0x46,0x9b,0xaa,0xcd,0x4f,0x46,0x3,0x8c,0x76,0xea,0x7,0x4a,0x29,0x5a,0x68,0x0,0x29,0x65,0x3f,0x30,0x83,0xed,0x6,0xe9,0xbc,0x8e,0xf6,0x45,0x79,0xb,0xc0,0x5c,0xb3,0xeb,0x12,0xef,0x1f,0xc6,0x6f,0x12,0x2,0xa,0xbd,0xc9,0x5d,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
-};
-
-
-static const unsigned char hscroll_bg_focus_png[]={
-0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0x8,0x0,0x0,0x0,0x8,0x8,0x6,0x0,0x0,0x0,0xc4,0xf,0xbe,0x8b,0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0x49,0x0,0x42,0x0,0x4e,0x4e,0xda,0xb4,0x7e,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xdd,0x9,0x1b,0x12,0x30,0x29,0x6a,0x2a,0xce,0x3f,0x0,0x0,0x0,0x19,0x74,0x45,0x58,0x74,0x43,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x0,0x43,0x72,0x65,0x61,0x74,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x47,0x49,0x4d,0x50,0x57,0x81,0xe,0x17,0x0,0x0,0x0,0x53,0x49,0x44,0x41,0x54,0x18,0xd3,0x7d,0x8f,0xc9,0xd,0x80,0x20,0x0,0xc0,0xca,0x21,0xe8,0x5f,0x12,0x89,0x84,0xfd,0x5c,0x48,0x26,0x34,0x3e,0x74,0x2,0xa2,0xe8,0x2,0x40,0xbf,0xed,0xa7,0xc2,0xbb,0xb0,0x3,0x1b,0x75,0x92,0xf0,0x2e,0x7c,0x46,0x9b,0xaa,0xcd,0x4f,0x46,0x3,0x8c,0x76,0xea,0x7,0x4a,0x29,0x5a,0x68,0x0,0x29,0x65,0x3f,0x30,0x83,0xed,0x6,0xe9,0xbc,0x8e,0xf6,0x45,0x79,0xb,0xc0,0x5c,0xb3,0xeb,0x12,0xef,0x1f,0xc6,0x6f,0x12,0x2,0xa,0xbd,0xc9,0x5d,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
-};
-
-
-static const unsigned char hscroll_grabber_png[]={
-0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0x8,0x0,0x0,0x0,0x8,0x8,0x6,0x0,0x0,0x0,0xc4,0xf,0xbe,0x8b,0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0x49,0x0,0x42,0x0,0x4e,0x4e,0xda,0xb4,0x7e,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xdd,0x9,0x1b,0x12,0x2f,0x24,0xd9,0xc1,0xbc,0x1c,0x0,0x0,0x0,0x19,0x74,0x45,0x58,0x74,0x43,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x0,0x43,0x72,0x65,0x61,0x74,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x47,0x49,0x4d,0x50,0x57,0x81,0xe,0x17,0x0,0x0,0x0,0x93,0x49,0x44,0x41,0x54,0x18,0xd3,0x85,0x8f,0xb1,0xa,0x82,0x50,0x18,0x46,0x8f,0xf9,0x73,0xad,0x74,0x68,0xa8,0x20,0x68,0x71,0x72,0x10,0x5a,0x5b,0x7a,0xfc,0x96,0xa6,0xa0,0x47,0x88,0xa0,0x92,0x1b,0x86,0x10,0x79,0xed,0xbf,0xda,0x10,0x4,0x2d,0x79,0x96,0x6f,0x3b,0x1f,0x27,0x58,0xcc,0x96,0x1d,0x7f,0x10,0x11,0x61,0x3a,0x99,0xb3,0x5e,0x6d,0x18,0x45,0x31,0x0,0x4f,0xf7,0x60,0x77,0xd8,0x62,0xef,0x5,0x2,0x90,0xa5,0x39,0xd7,0xdb,0x19,0xef,0x3d,0x0,0x61,0x18,0x92,0xa5,0x39,0x76,0x5f,0x20,0xaa,0x8a,0x6b,0x6a,0x5c,0x53,0x7f,0xb5,0xea,0x5f,0x9f,0x55,0x45,0x8c,0x18,0x4e,0x97,0x23,0x91,0x19,0xfe,0x7c,0xbb,0xa6,0xc0,0x88,0x61,0x10,0x8f,0x13,0xca,0xca,0xe2,0x5b,0xa5,0xa3,0xa5,0xa3,0xc5,0xb7,0x4a,0x59,0x59,0xe2,0x71,0x42,0xd0,0x57,0xd1,0xcb,0x1b,0xea,0x76,0x39,0x31,0xbf,0x4b,0x5d,0xcc,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
-};
-
-
-static const unsigned char hscroll_grabber_hl_png[]={
-0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0x8,0x0,0x0,0x0,0x8,0x8,0x6,0x0,0x0,0x0,0xc4,0xf,0xbe,0x8b,0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0x49,0x0,0x42,0x0,0x4e,0x4e,0xda,0xb4,0x7e,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xdd,0x9,0x1b,0x12,0x2e,0x38,0xd4,0xdb,0xd1,0x12,0x0,0x0,0x0,0x19,0x74,0x45,0x58,0x74,0x43,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x0,0x43,0x72,0x65,0x61,0x74,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x47,0x49,0x4d,0x50,0x57,0x81,0xe,0x17,0x0,0x0,0x0,0x95,0x49,0x44,0x41,0x54,0x18,0xd3,0x85,0x8f,0x21,0xf,0x82,0x40,0x0,0x85,0x3f,0xe4,0x6e,0x27,0xca,0xa0,0x58,0x1c,0xc5,0x60,0x21,0x11,0x28,0x56,0x83,0xbf,0xda,0x60,0xb0,0xf8,0x23,0x9c,0xc5,0x9d,0xe0,0x70,0x34,0xc7,0xb1,0x3b,0xd0,0x80,0x73,0xb3,0xc8,0xf7,0xc2,0x4b,0xef,0xbd,0x3d,0x6f,0x95,0xac,0x5f,0xfc,0x41,0x48,0x29,0x59,0x2e,0x12,0xb6,0x9b,0x1d,0xc1,0x74,0xe,0x40,0x63,0x9e,0x1c,0x4e,0x7b,0x8a,0x87,0x46,0x0,0x64,0x69,0xce,0xed,0xae,0x71,0x5d,0x37,0xa4,0x7c,0x9f,0x2c,0xcd,0x29,0x8e,0x1a,0x61,0xad,0xc5,0x98,0x6,0xd3,0x36,0xdf,0x5a,0xe7,0x6,0xb7,0xd6,0x22,0x94,0x54,0x5c,0xae,0x67,0x2,0x35,0xfb,0xd9,0x6e,0x5a,0x8d,0x92,0x8a,0x49,0x14,0xc6,0x54,0x75,0x89,0xeb,0x2d,0xfd,0x47,0xae,0xb7,0x54,0x75,0x49,0x14,0xc6,0x78,0x63,0x2f,0x46,0x79,0x3,0x79,0x63,0x38,0x4a,0x58,0xf8,0x57,0x67,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
-};
-
-
static const unsigned char hseparator_png[]={
0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0x8,0x0,0x0,0x0,0x8,0x8,0x6,0x0,0x0,0x0,0xc4,0xf,0xbe,0x8b,0x0,0x0,0x0,0x1,0x73,0x52,0x47,0x42,0x0,0xae,0xce,0x1c,0xe9,0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0xff,0x0,0xff,0x0,0xff,0xa0,0xbd,0xa7,0x93,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xda,0x3,0x15,0x11,0x5,0xc,0x36,0x33,0x39,0xbd,0x0,0x0,0x0,0x24,0x49,0x44,0x41,0x54,0x18,0xd3,0x63,0x60,0x40,0x2,0xc5,0xb3,0x57,0x6d,0x66,0xc0,0x7,0xce,0xdd,0x79,0x88,0xa1,0x80,0x89,0x81,0x0,0x18,0x74,0xa,0x96,0xee,0x3f,0x89,0xa1,0x0,0x0,0x48,0xe6,0x7,0xe3,0x62,0xce,0xeb,0xba,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
};
static const unsigned char hslider_bg_png[]={
-0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0x10,0x0,0x0,0x0,0x10,0x8,0x6,0x0,0x0,0x0,0x1f,0xf3,0xff,0x61,0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0x4b,0x0,0x3f,0x0,0x52,0x7c,0x32,0x40,0x52,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xdd,0x9,0x1b,0x16,0x2b,0x22,0x53,0xc7,0x74,0xf1,0x0,0x0,0x0,0x19,0x74,0x45,0x58,0x74,0x43,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x0,0x43,0x72,0x65,0x61,0x74,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x47,0x49,0x4d,0x50,0x57,0x81,0xe,0x17,0x0,0x0,0x0,0xd1,0x49,0x44,0x41,0x54,0x38,0xcb,0xed,0x93,0x31,0x4a,0x4,0x41,0x14,0x44,0xdf,0xff,0xfd,0x77,0x86,0x41,0x57,0x10,0x19,0x99,0xc1,0x89,0xd,0x4d,0x4,0xf,0xe0,0x49,0xc4,0xcc,0x23,0x98,0xb8,0x18,0x9,0x5e,0xc0,0x4c,0x3c,0x8f,0x60,0x62,0x68,0xec,0xb2,0xa2,0x88,0x81,0x8b,0x83,0xd2,0xfd,0xdb,0xc8,0xd8,0xde,0x7c,0xb,0x2a,0xac,0x82,0x57,0x50,0xb0,0x96,0x0,0xf4,0xed,0x70,0x2,0x9c,0x1,0x47,0x85,0xb9,0x7b,0xe0,0x66,0xf1,0xf6,0x7c,0x27,0x7d,0x3b,0x5c,0x84,0x10,0x2e,0x45,0x4,0x45,0x8b,0xd2,0x8e,0x93,0x73,0x26,0xa5,0x34,0x93,0xbe,0x1d,0x16,0x4d,0xdd,0x74,0xaa,0x8a,0x4a,0x28,0x2b,0xc8,0x9,0x77,0x67,0xfc,0x1e,0x5f,0xc,0xe8,0xaa,0x49,0x8d,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x38,0x8d,0x63,0x60,0x18,0x5,0x14,0x3,0x46,0x18,0x43,0x42,0x42,0x62,0x1a,0x3,0x3,0x43,0x26,0x91,0xfa,0xa6,0xbf,0x78,0xf1,0x22,0xb,0xdd,0x80,0xff,0xec,0xec,0x9c,0x44,0xe9,0xfe,0xf9,0xf3,0x3b,0xc3,0x8b,0x17,0x2f,0x18,0x19,0x18,0x18,0x18,0x98,0x88,0x76,0x2b,0xe,0x30,0xf0,0x6,0xb0,0x20,0xb1,0xa7,0xff,0xfc,0xf9,0x9d,0xe8,0x40,0xa4,0xd4,0xe2,0x51,0x80,0x4,0x0,0x2b,0x51,0x10,0x8d,0x9f,0x1f,0x30,0xd7,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
};
static const unsigned char hslider_grabber_png[]={
-0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0x10,0x0,0x0,0x0,0x10,0x8,0x6,0x0,0x0,0x0,0x1f,0xf3,0xff,0x61,0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0x4b,0x0,0x3f,0x0,0x52,0x7c,0x32,0x40,0x52,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xdd,0x9,0x1b,0x16,0x29,0x3a,0x72,0x9d,0x8e,0x25,0x0,0x0,0x0,0x19,0x74,0x45,0x58,0x74,0x43,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x0,0x43,0x72,0x65,0x61,0x74,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x47,0x49,0x4d,0x50,0x57,0x81,0xe,0x17,0x0,0x0,0x1,0xd8,0x49,0x44,0x41,0x54,0x38,0xcb,0x7d,0x92,0xb1,0x6b,0x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77,0xff,0x99,0x1d,0xfe,0x4c,0xf4,0xfd,0x5,0x7b,0xf0,0xd8,0x4,0x34,0x6f,0x3,0xa9,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
+0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0x10,0x0,0x0,0x0,0x10,0x8,0x6,0x0,0x0,0x0,0x1f,0xf3,0xff,0x61,0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0x92,0x0,0x92,0x0,0x99,0x25,0xc1,0x88,0x71,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xde,0x9,0x12,0x0,0x2,0x21,0x6d,0xbf,0x58,0x46,0x0,0x0,0x0,0x19,0x74,0x45,0x58,0x74,0x43,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x0,0x43,0x72,0x65,0x61,0x74,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x47,0x49,0x4d,0x50,0x57,0x81,0xe,0x17,0x0,0x0,0x1,0x4b,0x49,0x44,0x41,0x54,0x38,0x8d,0xa5,0x93,0x31,0x6b,0xc2,0x40,0x14,0xc7,0xff,0x77,0xbd,0x34,0x26,0x97,0x5a,0x2c,0x41,0xa,0x9d,0x6b,0x8,0x86,0x2e,0xe,0xfd,0x4,0x1d,0xb2,0xf8,0x29,0x3a,0x15,0xec,0x87,0xa9,0x63,0xfb,0x3d,0x9c,0x3b,0x76,0xd0,0x82,0x8,0xe1,0x14,0xdc,0x82,0x74,0xc8,0x50,0xc4,0xdc,0x5d,0x32,0xd8,0xe5,0x22,0xa1,0x60,0x95,0xfa,0x1f,0x1f,0xef,0xf7,0xe3,0xdd,0xe3,0x1d,0x70,0x62,0x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52,0x8a,0xed,0x76,0x8b,0xa2,0xd0,0x58,0xaf,0xbf,0x31,0x9d,0x7e,0x4a,0x3,0xef,0x4e,0xf9,0xe4,0xcf,0x74,0x72,0x7e,0x0,0xd9,0x87,0x82,0x9b,0x21,0x12,0xa2,0x6e,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
};
static const unsigned char hslider_grabber_hl_png[]={
-0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0x10,0x0,0x0,0x0,0x10,0x8,0x6,0x0,0x0,0x0,0x1f,0xf3,0xff,0x61,0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0x4b,0x0,0x3f,0x0,0x52,0x7c,0x32,0x40,0x52,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xdd,0x9,0x1b,0x16,0x2a,0x25,0xd4,0xb8,0xd0,0x13,0x0,0x0,0x0,0x19,0x74,0x45,0x58,0x74,0x43,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x0,0x43,0x72,0x65,0x61,0x74,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x47,0x49,0x4d,0x50,0x57,0x81,0xe,0x17,0x0,0x0,0x1,0xd9,0x49,0x44,0x41,0x54,0x38,0xcb,0x7d,0x92,0x3d,0x6f,0x13,0x41,0x10,0x86,0x9f,0xbd,0xe0,0xf8,0xe3,0x8c,0x7c,0x12,0xc2,0x36,0x10,0x12,0xb9,0x40,0x41,0xb6,0x44,0x41,0xe1,0x2a,0x4a,0x43,0x81,0x52,0xd1,0x80,0xbb,0x48,0xb4,0xd4,0x54,0x69,0x90,0x40,0x14,0xf9,0x1,0x48,0x54,0x48,0xd4,0x40,0xc3,0x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0x0,0x0,0x0,0x10,0x0,0x0,0x0,0x10,0x8,0x6,0x0,0x0,0x0,0x1f,0xf3,0xff,0x61,0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0x92,0x0,0x92,0x0,0x99,0x25,0xc1,0x88,0x71,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xde,0x9,0x12,0x0,0x2,0x1d,0x42,0xd0,0x24,0xc1,0x0,0x0,0x0,0x19,0x74,0x45,0x58,0x74,0x43,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x0,0x43,0x72,0x65,0x61,0x74,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x47,0x49,0x4d,0x50,0x57,0x81,0xe,0x17,0x0,0x0,0x1,0x30,0x49,0x44,0x41,0x54,0x38,0x8d,0xa5,0x93,0xb1,0x6a,0xc2,0x50,0x14,0x86,0xbf,0x63,0xe2,0x90,0xd0,0x2e,0xc1,0xad,0x8b,0xad,0x60,0x9e,0xc0,0xbe,0x41,0x7,0x33,0x38,0x7,0x1d,0xba,0x74,0x2a,0xe8,0xc3,0xe8,0x68,0xc1,0x49,0xc8,0xec,0x10,0x9f,0xa1,0x8,0xee,0x71,0xcf,0x52,0x4d,0x70,0x73,0x8a,0xb7,0x83,0x37,0x72,0x11,0xb4,0xa1,0xfe,0xe3,0xe5,0x7c,0xdf,0xbd,0x1c,0xfe,0xb,0x77,0x46,0x2e,0xf,0x7c,0xdf,0x7f,0x2,0x86,0x40,0x17,0x68,0xeb,0xe3,0xd,0xb0,0x4,0x26,0x49,0x92,0xa4,0x57,0x5,0xbe,0xef,0x7f,0x0,0xe3,0x30,0x1c,0x38,0x9e,0xd7,0x40,0xa4,0x6,0x80,0x52,0x47,0xf2,0x7c,0x47,0x14,0xcd,0xf,0xc0,0x28,0x49,0x92,0xaf,0x92,0xb1,0x4c,0xb8,0xd9,0x7c,0x9e,0xf6,0xfb,0xef,0x75,0xd7,0x7d,0xd4,0xb0,0x0,0x82,0x48,0xd,0xd7,0x7d,0xa0,0xd3,0x79,0xad,0x6f,0xb7,0x3f,0x3d,0xdb,0xb6,0xd2,0x2c,0xcb,0xd6,0x0,0x35,0xe3,0xd9,0xe3,0x20,0xe8,0x21,0x62,0x71,0x2d,0x22,0x16,0x41,0xd0,0x3,0x18,0x6b,0xe6,0x24,0x0,0x86,0x61,0x38,0x70,0x6e,0xc1,0xa6,0x24,0xc,0x7,0x8e,0xde,0xd3,0x59,0xd0,0xf5,0xbc,0xc6,0x9f,0x70,0x19,0x3d,0xdb,0x35,0x5,0xed,0x72,0x61,0x55,0xa2,0x67,0xdb,0xa6,0xe0,0xdf,0x29,0x5,0x1b,0xa5,0x8e,0x95,0x21,0x3d,0xbb,0x31,0x5,0xcb,0x3c,0xdf,0x55,0x16,0xe8,0xd9,0xa5,0x29,0x98,0x44,0xd1,0xfc,0xa0,0x54,0x51,0xe1,0xf6,0xa2,0x2c,0xd4,0xe4,0x2c,0xd0,0xf5,0x1c,0xc5,0xf1,0x82,0x5b,0x12,0xa5,0xa,0xe2,0x78,0x1,0xa7,0x36,0xa6,0x60,0x34,0x31,0xcb,0xb2,0xb5,0x6d,0x5b,0xe9,0x6a,0xf5,0xfd,0xd6,0x6a,0xbd,0xd4,0x1d,0xc7,0x41,0x44,0x34,0x78,0x24,0xcf,0xb7,0xcc,0x66,0xd3,0xc3,0x7e,0xbf,0xff,0x34,0xab,0x7c,0xf7,0x67,0xba,0x3b,0xbf,0x4d,0x78,0x75,0x34,0x1f,0x21,0x5d,0xa6,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
};
static const unsigned char hslider_tick_png[]={
-0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0x4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f3,0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0xff,0x0,0xff,0x0,0xff,0xa0,0xbd,0xa7,0x93,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xde,0x9,0xf,0x14,0x34,0x2e,0xcd,0x40,0x50,0x4c,0x0,0x0,0x0,0x65,0x49,0x44,0x41,0x54,0x18,0x95,0xbd,0x8f,0xb1,0x9,0x80,0x30,0x10,0x0,0x8f,0x44,0xb0,0x4a,0x61,0xa3,0x73,0x38,0x5e,0x76,0x70,0x80,0xc,0xe1,0x0,0x6e,0x21,0x36,0xc2,0xf7,0x16,0x62,0xa,0x41,0x78,0xc1,0x4a,0x1b,0xb5,0x50,0xb0,0xf4,0xca,0xab,0xee,0x2c,0x40,0x8,0xc1,0x1b,0x63,0x54,0x44,0x46,0x3,0xa0,0xaa,0x5c,0xbc,0x84,0x5,0x70,0xce,0x29,0x10,0x45,0x64,0x49,0x0,0xa6,0x34,0x6b,0xf9,0x15,0xb,0x50,0xd5,0xd,0xcb,0x6e,0x19,0xfa,0xee,0x2c,0x5d,0x1f,0xe9,0xc5,0x1a,0x7d,0xbe,0xcd,0xe5,0x2d,0x3e,0xe7,0xe,0xef,0x24,0x27,0x89,0xb7,0xa5,0x60,0x2,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
};
static const unsigned char hsplit_bg_png[]={
-0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0x8,0x0,0x0,0x0,0x8,0x8,0x6,0x0,0x0,0x0,0xc4,0xf,0xbe,0x8b,0x0,0x0,0x0,0x1,0x73,0x52,0x47,0x42,0x0,0xae,0xce,0x1c,0xe9,0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0x3b,0x0,0x36,0x0,0x38,0x27,0x56,0x13,0x54,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xdb,0xc,0x1b,0x3,0x20,0x14,0x7b,0xdd,0x35,0x55,0x0,0x0,0x0,0x19,0x74,0x45,0x58,0x74,0x43,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x0,0x43,0x72,0x65,0x61,0x74,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x47,0x49,0x4d,0x50,0x57,0x81,0xe,0x17,0x0,0x0,0x0,0x7d,0x49,0x44,0x41,0x54,0x18,0xd3,0x4d,0x8e,0x41,0xe,0x2,0x31,0xc,0x3,0xc7,0x65,0xbf,0x89,0xb8,0xf0,0x7f,0x9,0xa4,0xdd,0xa5,0xaa,0x53,0x73,0xa0,0x2,0x72,0x4b,0x3c,0xb1,0xad,0xfb,0xf5,0x96,0xc7,0xe3,0x89,0x4,0xae,0x89,0x3d,0xa8,0x2a,0x5c,0x45,0xef,0x2f,0xb6,0xfe,0xea,0xb8,0x4c,0x95,0xb1,0xeb,0x2b,0xce,0x32,0xe7,0xd9,0x69,0x21,0x90,0x40,0xc4,0xff,0x4,0x21,0x42,0x93,0x84,0x24,0x50,0x0,0x21,0x40,0x1f,0x82,0xd6,0x2e,0xb4,0xdf,0x8b,0x90,0x42,0xd6,0xaa,0x45,0x36,0x8,0x4,0x58,0xa2,0xbe,0x11,0xcb,0x5,0xb4,0xae,0x42,0x8b,0xfd,0x6f,0xb2,0xed,0xfb,0xce,0x71,0x9c,0x38,0xa6,0x66,0xc8,0xc,0xd3,0x66,0xd8,0x8c,0x31,0x78,0x3,0x89,0x16,0x57,0xf3,0xfa,0x1c,0xf,0x2c,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
+0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0x8,0x0,0x0,0x0,0x8,0x8,0x6,0x0,0x0,0x0,0xc4,0xf,0xbe,0x8b,0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0xff,0x0,0xff,0x0,0xff,0xa0,0xbd,0xa7,0x93,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xde,0x9,0x14,0xd,0x13,0x21,0x13,0xd5,0xb7,0xd9,0x0,0x0,0x0,0x19,0x74,0x45,0x58,0x74,0x43,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x0,0x43,0x72,0x65,0x61,0x74,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x47,0x49,0x4d,0x50,0x57,0x81,0xe,0x17,0x0,0x0,0x0,0x15,0x49,0x44,0x41,0x54,0x18,0x95,0x63,0x54,0x57,0xd7,0xfc,0xcf,0x80,0x7,0x30,0xe1,0x93,0x1c,0x3e,0xa,0x0,0x86,0x1b,0x1,0x86,0x56,0xb4,0xba,0xe,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
};
static const unsigned char hsplitter_png[]={
-0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0x8,0x0,0x0,0x0,0x40,0x8,0x6,0x0,0x0,0x0,0x27,0x4,0x36,0x8a,0x0,0x0,0x0,0x1,0x73,0x52,0x47,0x42,0x0,0xae,0xce,0x1c,0xe9,0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0xff,0x0,0xff,0x0,0xff,0xa0,0xbd,0xa7,0x93,0x0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,0x9,0xf,0x14,0x34,0x17,0x92,0x45,0xd8,0x44,0x0,0x0,0x0,0x19,0x74,0x45,0x58,0x74,0x43,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x0,0x43,0x72,0x65,0x61,0x74,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x47,0x49,0x4d,0x50,0x57,0x81,0xe,0x17,0x0,0x0,0x0,0x3c,0x49,0x44,0x41,0x54,0x48,0x89,0x63,0x60,0x20,0x6,0x2c,0x58,0xb0,0xe0,0x7f,0x6a,0x6a,0xea,0x7f,0x6c,0x7c,0x26,0x6,0x6,0x6,0x86,0xa3,0x47,0x8f,0x32,0x5c,0xbb,0x76,0xd,0xae,0x1,0x9d,0x4f,0x5,0x30,0xea,0x86,0x51,0x37,0x8c,0xba,0x61,0xd4,0xd,0xa3,0x6e,0x18,0x75,0xc3,0xa8,0x1b,0x6,0x8b,0x1b,0x0,0xa,0x48,0x3b,0xf0,0x67,0x1e,0xb,0x3a,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
};
@@ -175,27 +155,27 @@ static const unsigned char icon_close_png[]={
static const unsigned char icon_folder_png[]={
-0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0x10,0x0,0x0,0x0,0x10,0x8,0x6,0x0,0x0,0x0,0x1f,0xf3,0xff,0x61,0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0x73,0x0,0x29,0x0,0x7c,0x29,0x1e,0x61,0x18,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xdd,0x9,0x19,0x1,0x11,0x39,0x4f,0x6b,0x1e,0x1a,0x0,0x0,0x0,0x19,0x74,0x45,0x58,0x74,0x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x0,0x19,0x74,0x45,0x58,0x74,0x43,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x0,0x43,0x72,0x65,0x61,0x74,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x47,0x49,0x4d,0x50,0x57,0x81,0xe,0x17,0x0,0x0,0x1,0x36,0x49,0x44,0x41,0x54,0x38,0x8d,0xc5,0x92,0xcd,0x4a,0xc3,0x40,0x14,0x85,0xbf,0x7b,0x67,0x12,0x48,0x3,0x12,0x62,0x45,0xfa,0x30,0x7d,0x5,0x5d,0xfa,0x8,0xbe,0x88,0x3e,0x45,0x5f,0xc1,0x9d,0x4b,0x77,0x3e,0x81,0x2e,0xa4,0x15,0xa5,0x10,0xb2,0xc8,0xa2,0x9b,0x41,0x2c,0x62,0x4c,0x66,0x5c,0x34,0x8a,0x3f,0x95,0x26,0x2b,0xf,0xc,0xcc,0x9d,0x3b,0xe7,0xce,0x39,0x87,0x81,0xff,0x86,0x14,0x45,0x11,0xb6,0x35,0xe2,0x38,0xbe,0x9c,0x4c,0x26,0x47,0xce,0xb9,0x78,0x4b,0x3b,0x64,0x59,0xf6,0x6,0x20,0x65,0x59,0x56,0xde,0xfb,0x43,0x40,0x80,0x0,0x34,0xdd,0xa5,0x28,0x49,0x92,0x73,0x11,0x79,0xf9,0x49,0x16,0x91,0xd5,0x78,0x3c,0x9e,0x1,0x58,0x63,0x4c,0xe9,0xbd,0x3f,0x0,0xc,0x20,0xa3,0xd1,0xe8,0x2c,0x84,0x10,0x1,0x88,0xc8,0x6b,0x37,0xf8,0x9b,0xea,0x10,0xc2,0xa7,0x2a,0xa9,0xaa,0xea,0xa2,0xae,0xeb,0x63,0x40,0xd3,0x34,0x3d,0x5d,0xaf,0xd7,0xb3,0xde,0xfe,0x45,0x9e,0xd4,0x18,0x53,0x0,0x1e,0xd0,0x10,0x42,0xda,0x97,0xc,0x78,0x55,0xad,0x54,0x44,0x96,0x80,0xfd,0xf0,0x37,0x64,0x80,0x31,0x66,0xa1,0xaa,0xfa,0x8,0x68,0x77,0xb8,0x7,0xd4,0x83,0x6,0x88,0xc8,0x3,0x80,0x31,0x66,0xde,0x34,0xcd,0x94,0x4d,0x98,0x7d,0x10,0xab,0xea,0xad,0xe6,0x79,0xbe,0x4,0x88,0xa2,0xe8,0xba,0xae,0xeb,0xe9,0x17,0x35,0x3b,0xa1,0xaa,0x37,0xf6,0x4b,0x71,0x7,0x24,0x7d,0xc9,0x0,0x79,0x9e,0xcf,0x2d,0x80,0x88,0x3c,0xf,0x79,0x99,0x4d,0xd8,0x1e,0xba,0xf4,0x55,0x75,0xd5,0xed,0xdb,0x6e,0xed,0x42,0x63,0xad,0xbd,0x7,0xb0,0xce,0x39,0x6d,0xdb,0xf6,0x44,0x55,0x17,0x49,0x92,0xec,0xff,0xf1,0xfb,0x7e,0x29,0x50,0xd5,0x2b,0xe7,0x9c,0x8,0x80,0x73,0xce,0x74,0x92,0xa2,0x1,0x36,0xda,0x2c,0xcb,0xda,0x77,0xe3,0x5,0x64,0xf1,0xba,0x53,0xe9,0x44,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
};
static const unsigned char icon_play_png[]={
-0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0x10,0x0,0x0,0x0,0x10,0x8,0x6,0x0,0x0,0x0,0x1f,0xf3,0xff,0x61,0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0x73,0x0,0x29,0x0,0x7c,0x29,0x1e,0x61,0x18,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xdd,0x9,0x19,0x3,0x35,0x2,0xc,0xc,0xc2,0xf6,0x0,0x0,0x0,0xb3,0x49,0x44,0x41,0x54,0x38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d,0x33,0xd5,0xf2,0x2,0x84,0xae,0x82,0xae,0xa4,0x17,0x47,0xe1,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
};
static const unsigned char icon_stop_png[]={
-0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0x10,0x0,0x0,0x0,0x10,0x8,0x6,0x0,0x0,0x0,0x1f,0xf3,0xff,0x61,0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0x73,0x0,0x29,0x0,0x7c,0x29,0x1e,0x61,0x18,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xdd,0x9,0x19,0x3,0x35,0x39,0xbd,0x7,0x2b,0xd2,0x0,0x0,0x0,0x34,0x49,0x44,0x41,0x54,0x38,0xcb,0x63,0x60,0xa0,0x6,0xf8,0xf0,0xf6,0x33,0x33,0xb9,0x7a,0x18,0x61,0x2,0xf,0x6f,0x3f,0xff,0x4f,0x8a,0x1,0xf2,0xaa,0x92,0x8c,0xc,0xc,0xc,0xc,0x4c,0x94,0xba,0x7e,0xd4,0x80,0x51,0x3,0x6,0x87,0x1,0x14,0x67,0x26,0x8a,0x1,0x0,0x2a,0xbb,0xf,0x64,0x53,0x81,0x8c,0xd3,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
+0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0x10,0x0,0x0,0x0,0x10,0x8,0x6,0x0,0x0,0x0,0x1f,0xf3,0xff,0x61,0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0xff,0x0,0xff,0x0,0xff,0xa0,0xbd,0xa7,0x93,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xde,0x9,0xf,0x14,0x33,0x24,0x62,0xd4,0x2f,0x95,0x0,0x0,0x0,0x39,0x49,0x44,0x41,0x54,0x38,0x8d,0x63,0x60,0xa0,0x6,0xf8,0xf0,0xe1,0x3,0x33,0xb9,0x7a,0x18,0x61,0x2,0xf,0x1f,0x3e,0xfc,0x4f,0x8a,0x1,0xf2,0xf2,0xf2,0x8c,0xc,0xc,0xc,0xc,0x4c,0xa4,0xda,0x8c,0xe,0x46,0xd,0x18,0x35,0x60,0x70,0x18,0xc0,0xc0,0xc0,0x40,0x59,0x66,0xa2,0x18,0x0,0x0,0x2a,0xc7,0xf,0x64,0xd5,0xe,0x11,0x85,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
};
static const unsigned char line_edit_png[]={
-0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0x10,0x0,0x0,0x0,0x10,0x8,0x6,0x0,0x0,0x0,0x1f,0xf3,0xff,0x61,0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0x3e,0x0,0x34,0x0,0x44,0xb5,0x81,0x75,0x5d,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xdd,0x9,0x1b,0x15,0x15,0x14,0xdf,0xfe,0x44,0x4c,0x0,0x0,0x0,0x19,0x74,0x45,0x58,0x74,0x43,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x0,0x43,0x72,0x65,0x61,0x74,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x47,0x49,0x4d,0x50,0x57,0x81,0xe,0x17,0x0,0x0,0x0,0xc0,0x49,0x44,0x41,0x54,0x38,0xcb,0xed,0xd0,0x2d,0x8e,0x2,0x41,0x10,0x86,0xe1,0xb7,0x7f,0x66,0x4,0x20,0xd6,0xb0,0x21,0x60,0x20,0x70,0x1,0x34,0x8a,0x5b,0xac,0x26,0x5c,0x62,0x4f,0xc0,0x11,0x30,0x4,0xcd,0x29,0x40,0xa1,0xb9,0x0,0x9,0x6a,0x12,0x2,0x6,0x1,0x23,0x9a,0xa9,0x2e,0xcc,0x1e,0x60,0x3a,0xeb,0x8,0xaf,0xff,0x9e,0x4a,0xca,0xa8,0x2a,0x83,0xde,0x68,0x5,0xfc,0x0,0x4d,0xea,0xf5,0x0,0x36,0xa7,0xe2,0x38,0x37,0xfd,0xee,0x70,0xeb,0xbc,0x9f,0x7a,0xef,0x48,0xa9,0xaa,0x4,0xa9,0xaa,0x9d,0xe9,0x77,0x87,0xd2,0x68,0x36,0xac,0x73,0xe,0x6b,0xea,0x21,0x51,0x5,0x11,0xa1,0x7c,0x94,0xd1,0x3,0x36,0xf3,0x79,0xd2,0x75,0x6b,0x1c,0xd6,0x3b,0xa0,0xb4,0x96,0x7f,0xf6,0x1,0xde,0x6,0x28,0xa2,0x4a,0xf2,0xf0,0x6f,0x53,0x58,0x60,0x19,0x42,0x20,0x5,0x89,0x2a,0x84,0x10,0x0,0x96,0x46,0x55,0x99,0x8c,0xa7,0x8b,0xeb,0xed,0x3c,0x7b,0x86,0xe7,0x77,0x1d,0x20,0xcb,0xb3,0x4b,0xfb,0xab,0xb3,0xde,0x1f,0x76,0xbf,0x46,0x55,0x41,0xc9,0x81,0x56,0xc2,0x4f,0x22,0x70,0xc7,0x10,0x5e,0xb5,0x47,0x48,0x5e,0x61,0x62,0xef,0xf5,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
+0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0x10,0x0,0x0,0x0,0x10,0x8,0x6,0x0,0x0,0x0,0x1f,0xf3,0xff,0x61,0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0x27,0x0,0x27,0x0,0x27,0x12,0xaa,0xad,0x65,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xde,0x9,0x11,0x16,0x1e,0x2f,0x66,0x6e,0x58,0x30,0x0,0x0,0x0,0x19,0x74,0x45,0x58,0x74,0x43,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x0,0x43,0x72,0x65,0x61,0x74,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x47,0x49,0x4d,0x50,0x57,0x81,0xe,0x17,0x0,0x0,0x0,0xba,0x49,0x44,0x41,0x54,0x38,0x8d,0xed,0xd3,0x3b,0x4e,0x3,0x41,0x10,0x84,0xe1,0x6f,0x4c,0x4b,0x1e,0x56,0x1b,0x10,0xef,0x8,0x4e,0xc0,0xe3,0x6c,0x9c,0x84,0xb3,0x19,0x3b,0x26,0x41,0xeb,0x98,0x0,0xd9,0x63,0x69,0x90,0x9,0xd8,0x78,0x17,0xc9,0x9,0x1,0x15,0xb6,0xba,0xfe,0xee,0xa0,0x2a,0xa1,0xc3,0xd,0x7a,0x5c,0x21,0x99,0xd7,0x19,0x5f,0xf8,0xc4,0x47,0x4c,0xe6,0x47,0xdc,0x22,0xff,0x12,0x50,0xf1,0x8e,0xd7,0x98,0x2e,0xdf,0x3d,0xdc,0x3f,0xbd,0x94,0xa1,0x74,0x11,0x31,0xeb,0x6e,0xad,0x19,0xf7,0xe3,0x61,0xbb,0xdb,0x3c,0xe3,0x2d,0x10,0x58,0x97,0xa1,0x74,0xb5,0x56,0xb5,0xd6,0x59,0x40,0xce,0x59,0x19,0x4a,0xb7,0xdd,0x6d,0xd6,0x88,0xd5,0x34,0x4f,0x11,0xb1,0x68,0x86,0x5a,0xab,0xe9,0xcb,0x4,0xab,0xf9,0xf5,0x65,0xfd,0x3,0xfe,0x12,0xe0,0xdc,0x5a,0x93,0x73,0x5e,0x34,0xe4,0x9c,0xb5,0xd6,0xf8,0x89,0xb4,0x40,0xc3,0x69,0xdc,0x8f,0xc7,0x32,0x94,0xeb,0xbe,0xef,0x67,0x1,0x53,0x94,0x8f,0x38,0xa1,0x25,0xc,0x2e,0x28,0x53,0x72,0x61,0x9d,0xbf,0x1,0x2c,0xf1,0x42,0x3f,0xf1,0x88,0x6f,0x8a,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
};
static const unsigned char line_edit_disabled_png[]={
-0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0x10,0x0,0x0,0x0,0x10,0x8,0x6,0x0,0x0,0x0,0x1f,0xf3,0xff,0x61,0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0x3e,0x0,0x34,0x0,0x44,0xb5,0x81,0x75,0x5d,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xdd,0x9,0x1b,0x15,0x1d,0x13,0x89,0x43,0x5b,0xe7,0x0,0x0,0x0,0x19,0x74,0x45,0x58,0x74,0x43,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x0,0x43,0x72,0x65,0x61,0x74,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x47,0x49,0x4d,0x50,0x57,0x81,0xe,0x17,0x0,0x0,0x0,0xc0,0x49,0x44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,0x0,0x0,0x0,0x10,0x8,0x6,0x0,0x0,0x0,0x1f,0xf3,0xff,0x61,0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0x27,0x0,0x27,0x0,0x27,0x12,0xaa,0xad,0x65,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xde,0x9,0x11,0x16,0x1e,0x28,0xf8,0xa,0xcd,0x93,0x0,0x0,0x0,0x19,0x74,0x45,0x58,0x74,0x43,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x0,0x43,0x72,0x65,0x61,0x74,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x47,0x49,0x4d,0x50,0x57,0x81,0xe,0x17,0x0,0x0,0x0,0xb8,0x49,0x44,0x41,0x54,0x38,0x8d,0xed,0x93,0x31,0xa,0xc2,0x50,0x10,0x44,0xdf,0x97,0x8d,0x59,0x24,0x8d,0xa4,0xcb,0x7,0x4f,0xa0,0x78,0x22,0x4f,0xe7,0x89,0x42,0x72,0x2,0x21,0x29,0x4,0x5b,0x59,0x75,0x31,0x16,0x89,0xa5,0x49,0xc0,0xc6,0xc2,0xe9,0x67,0x66,0x67,0x99,0x9,0x40,0xa,0xac,0x0,0x5,0x16,0xcc,0xc3,0x13,0x30,0xe0,0x2a,0x3,0x79,0x3,0xe4,0x40,0x2,0x84,0x9,0x72,0x7,0x3c,0x80,0xb,0x70,0x92,0xc1,0x39,0xdf,0x6d,0xf7,0x87,0x58,0xc4,0xa5,0x88,0x8c,0xa,0xb8,0x7b,0xd7,0xb4,0xcd,0xbd,0xaa,0xcb,0x23,0x70,0x96,0xe1,0xec,0x24,0x16,0x31,0x35,0x33,0xcc,0x6c,0xd4,0x5e,0x55,0x43,0x2c,0x62,0x5a,0xd5,0x65,0x2,0x2c,0xde,0x99,0x83,0x88,0x4c,0x92,0x1,0xcc,0xc,0x11,0x81,0x21,0xea,0xdc,0xa7,0x7d,0xc4,0x5f,0xe0,0x97,0x4,0x3a,0x77,0x47,0x55,0x27,0x9,0xaa,0x8a,0xbb,0x43,0x5f,0x69,0x84,0x7e,0x18,0x8f,0xa6,0x6d,0x6e,0xb1,0x88,0xcb,0x2c,0xcb,0x66,0x55,0x99,0x7e,0xf,0xcf,0x0,0xac,0xf9,0x62,0x4c,0x81,0x2f,0xe7,0xfc,0x2,0xba,0x32,0x42,0x24,0xee,0x6e,0x22,0x60,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
};
@@ -210,12 +190,12 @@ static const unsigned char logo_png[]={
static const unsigned char option_arrow_png[]={
-0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0x10,0x0,0x0,0x0,0x10,0x8,0x6,0x0,0x0,0x0,0x1f,0xf3,0xff,0x61,0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0x89,0x0,0x76,0x0,0x95,0x95,0xac,0x1a,0xb5,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xdd,0x9,0x1b,0x15,0x35,0x3,0xc9,0xa9,0xe5,0x29,0x0,0x0,0x0,0x19,0x74,0x45,0x58,0x74,0x43,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x0,0x43,0x72,0x65,0x61,0x74,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x47,0x49,0x4d,0x50,0x57,0x81,0xe,0x17,0x0,0x0,0x0,0xc7,0x49,0x44,0x41,0x54,0x38,0xcb,0x63,0x60,0x18,0x9e,0xc0,0xdb,0x3e,0x88,0x81,0x87,0x41,0x58,0x82,0x9f,0x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61,0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0xff,0x0,0xff,0x0,0xff,0xa0,0xbd,0xa7,0x93,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xde,0x9,0x14,0xd,0x1c,0x2e,0x4,0xf2,0xb6,0x87,0x0,0x0,0x0,0x19,0x74,0x45,0x58,0x74,0x43,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x0,0x43,0x72,0x65,0x61,0x74,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x47,0x49,0x4d,0x50,0x57,0x81,0xe,0x17,0x0,0x0,0x0,0x61,0x49,0x44,0x41,0x54,0x38,0x8d,0x63,0xbc,0x7b,0xf7,0x2e,0x3,0x25,0x80,0x89,0x22,0xdd,0xb4,0x36,0x40,0x82,0x81,0x81,0xe1,0x3f,0x94,0x26,0xd9,0x0,0x16,0x6,0x6,0x86,0xe7,0x50,0xf6,0x73,0x28,0x9f,0x24,0x3,0x7e,0x13,0xe0,0x13,0x34,0x80,0x68,0x80,0xcb,0x69,0xbc,0x94,0x1a,0xf0,0x19,0x8b,0x18,0x23,0x36,0x85,0x34,0x8b,0x46,0x49,0x2,0x7c,0x82,0x6,0xf0,0x30,0x30,0x30,0x70,0x40,0xd9,0x1c,0x50,0x3e,0x56,0x80,0x2b,0xc,0xee,0x40,0x69,0x46,0x34,0x3e,0xd1,0x2e,0x20,0x1a,0xc,0xbc,0x1,0x0,0x1e,0x2d,0xa,0xcc,0x68,0x85,0xc9,0x5b,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
};
static const unsigned char option_button_disabled_png[]={
-0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0x20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44,0x0,0x5a,0x0,0x5a,0x0,0x5a,0x61,0x75,0x7f,0x99,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xde,0x9,0x10,0x16,0x18,0x29,0x61,0xeb,0x3d,0xe6,0x0,0x0,0x0,0x19,0x74,0x45,0x58,0x74,0x43,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x0,0x43,0x72,0x65,0x61,0x74,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x47,0x49,0x4d,0x50,0x57,0x81,0xe,0x17,0x0,0x0,0x0,0xc9,0x49,0x44,0x41,0x54,0x48,0x89,0xed,0x95,0xb1,0xaa,0xc2,0x40,0x10,0x45,0xcf,0x86,0x11,0x46,0x4c,0x61,0xb1,0x55,0xb6,0x4f,0xa5,0xbc,0xff,0xff,0x87,0xd7,0x88,0x56,0xf6,0xb1,0x4a,0x61,0xa1,0x30,0xe0,0x10,0x2d,0x76,0x53,0x3f,0xf1,0x11,0xd3,0x64,0x60,0x58,0xd8,0x62,0xee,0xb9,0x53,0xdc,0x9,0x80,0x0,0xab,0xf2,0x86,0xd2,0x53,0xd6,0xb3,0xb4,0x3,0x8f,0x51,0x7c,0xb,0x6c,0x80,0xea,0x4b,0x0,0x3,0x70,0x7,0xae,0x42,0x76,0xbe,0xd9,0xef,0x7e,0xb6,0xa9,0x49,0xad,0x88,0x4c,0xaa,0xee,0xee,0x74,0x97,0xee,0x7c,0x3c,0x1d,0x0,0x6e,0x42,0x76,0x5d,0xa5,0x26,0xb5,0x66,0x86,0x99,0xfd,0x39,0x24,0xc6,0x48,0xdf,0xf7,0x1f,0x1,0xa8,0x2a,0xa9,0x49,0xed,0xf1,0x74,0xf8,0x5,0xaa,0xaa,0xfc,0x7,0x11,0x79,0x4b,0xfc,0xbf,0x65,0x66,0x94,0x2d,0x7,0xc8,0xee,0x67,0xad,0x5,0x60,0x1,0x58,0x0,0x46,0x80,0xa7,0xbb,0xa3,0xaa,0x93,0xb,0xaa,0x2a,0xee,0xe,0x39,0x92,0x11,0x72,0x2e,0xf,0xdd,0xa5,0x3b,0xa7,0x26,0xb5,0x75,0x5d,0xbf,0x35,0x28,0xc6,0xf8,0x11,0xc0,0x18,0xc5,0xa3,0x6e,0x0,0xd6,0xcc,0x78,0x8c,0x2,0x33,0x9f,0xe3,0x17,0x68,0xff,0x45,0x43,0x59,0xe8,0x6b,0xa8,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
};
@@ -225,27 +205,27 @@ static const unsigned char option_button_focus_png[]={
static const unsigned char option_button_hover_png[]={
-0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0x20,0x0,0x0,0x0,0x10,0x8,0x6,0x0,0x0,0x0,0x77,0x0,0x7d,0x59,0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0x89,0x0,0x76,0x0,0x95,0x95,0xac,0x1a,0xb5,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xdd,0x9,0x1b,0x15,0x30,0x2f,0x86,0x6,0x7d,0x8f,0x0,0x0,0x0,0x19,0x74,0x45,0x58,0x74,0x43,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x0,0x43,0x72,0x65,0x61,0x74,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x47,0x49,0x4d,0x50,0x57,0x81,0xe,0x17,0x0,0x0,0x2,0x3,0x49,0x44,0x41,0x54,0x48,0xc7,0xbd,0x95,0x31,0x68,0x14,0x41,0x14,0x86,0xbf,0x99,0xbb,0xa8,0x18,0x4b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,0x34,0x10,0x2d,0x82,0xb9,0x7c,0xb5,0xaf,0xd8,0xac,0x4b,0xd8,0x8a,0x1e,0x10,0xd4,0xe4,0x80,0x48,0xd9,0x23,0x75,0x18,0x40,0x2c,0x34,0x6c,0x68,0x40,0xa2,0x2,0xe,0x8f,0x41,0x74,0x89,0x6c,0xb9,0xa9,0x6a,0x35,0x15,0x4c,0x44,0xd0,0xa8,0x39,0xa6,0x89,0xe7,0x2b,0xbc,0x84,0xe1,0x2d,0x55,0x3f,0x2c,0x5d,0xa3,0x1b,0x35,0xa0,0x2a,0x80,0x2b,0xe3,0x2b,0xaa,0x2c,0x96,0x88,0xab,0xc1,0x62,0x20,0x84,0x38,0x82,0x45,0xa3,0x3c,0x83,0x52,0x2e,0xa6,0x39,0xc6,0xd2,0x4d,0xc4,0x94,0x80,0xe1,0x2d,0x7,0xd4,0x81,0xb7,0x5c,0xb1,0x34,0x54,0x83,0x49,0x88,0x79,0xef,0x54,0x79,0x76,0x90,0x37,0xd4,0x74,0xa8,0x59,0x11,0x8,0x9a,0x9a,0xa9,0x59,0xdc,0x69,0x43,0xf3,0x74,0xcd,0xa3,0x68,0x59,0x1,0x80,0xd5,0x60,0x41,0x84,0xa0,0x61,0x94,0x87,0x27,0x8e,0xf1,0x74,0x24,0xd4,0x34,0xaf,0x39,0x77,0xec,0x8,0xa,0xa6,0x52,0x31,0x7d,0x28,0x26,0x22,0xa8,0xc4,0xfa,0xbc,0x6b,0xba,0xbd,0x3c,0x8,0x57,0xf9,0x4f,0x6,0x7a,0x59,0x18,0x2c,0x35,0x1a,0x73,0x87,0x76,0x7c,0x1d,0x26,0x92,0x95,0xd7,0x70,0x9a,0x2f,0xc4,0xc,0xa0,0xe7,0x81,0xee,0xb7,0xed,0x1e,0x41,0x32,0x8c,0x38,0xd1,0x0,0x8,0x41,0x50,0xa6,0x1b,0x99,0xc,0x78,0xff,0x61,0x1d,0xa0,0xeb,0xcc,0x8c,0x95,0xcb,0xab,0xf7,0xb7,0x7e,0x7e,0xbf,0x35,0xc8,0xf6,0x97,0x66,0xf1,0x14,0x1e,0x3f,0x76,0xa2,0x77,0xe6,0xf4,0xd9,0xe7,0xef,0xd6,0xdf,0x3e,0x70,0x66,0x86,0x99,0xcd,0x1,0xa7,0x80,0xc6,0x8c,0x9e,0xe3,0x8,0xec,0x7a,0xef,0xc3,0x5f,0x3e,0xcd,0x47,0x5a,0x1d,0xdb,0x7d,0x47,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
+0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0x20,0x0,0x0,0x0,0x10,0x8,0x6,0x0,0x0,0x0,0x77,0x0,0x7d,0x59,0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0x4b,0x0,0x49,0x0,0x4e,0x38,0x4f,0x8,0xff,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xde,0x9,0x10,0x16,0x17,0x13,0x20,0x7f,0xf8,0x9b,0x0,0x0,0x0,0x19,0x74,0x45,0x58,0x74,0x43,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x0,0x43,0x72,0x65,0x61,0x74,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x47,0x49,0x4d,0x50,0x57,0x81,0xe,0x17,0x0,0x0,0x0,0xd8,0x49,0x44,0x41,0x54,0x48,0x89,0xed,0xd5,0xb1,0x4e,0x2,0x51,0x10,0x85,0xe1,0xef,0xe2,0x46,0x8c,0x31,0x91,0x64,0xab,0xdd,0xe5,0xfa,0x4,0xa8,0x2f,0x26,0xbe,0x8c,0xbe,0x18,0x42,0x4d,0x73,0x59,0x68,0x97,0xc4,0x42,0x12,0xc,0x16,0x40,0x67,0x14,0x49,0x56,0x1a,0x4e,0x39,0x99,0x9c,0xf9,0x27,0x93,0x9c,0x9,0xb8,0x46,0xf,0x37,0xb8,0x40,0xd0,0xae,0x36,0xf8,0xc4,0x3b,0x9a,0x6c,0x37,0xfc,0x1,0x11,0x57,0xff,0x4,0xf0,0x81,0x84,0xb7,0xcc,0x76,0xf3,0xbb,0xfb,0xc1,0xe3,0xa0,0x2a,0xab,0xa7,0xd8,0x8f,0xad,0x2,0xa4,0x59,0xda,0xd4,0xf3,0xfa,0x75,0x3c,0x19,0x5,0x4c,0x33,0x64,0xe8,0x56,0x65,0x35,0xcc,0xf3,0xdc,0x7c,0xb1,0xf8,0xd5,0xa4,0x2c,0x8a,0x83,0xfa,0xbe,0x53,0x9e,0xe7,0x1,0xc3,0xf1,0x64,0xf4,0x8c,0xac,0xb3,0xab,0x87,0xd8,0x8f,0x9a,0x66,0x79,0x94,0xe9,0x5f,0xd4,0x34,0x4b,0xb1,0x1f,0xd9,0x9d,0xba,0xf3,0x73,0x7b,0xfb,0x3a,0x3,0x9c,0x1,0xce,0x0,0x7b,0x80,0x4d,0x9a,0x25,0xbd,0xde,0x6d,0xeb,0x3,0xbb,0xdd,0x4b,0x69,0x96,0xd8,0x46,0xb2,0xc,0x6b,0xac,0xea,0x79,0xfd,0x82,0x83,0xa3,0xb8,0x2c,0x8a,0xa3,0x0,0xf6,0x51,0x8c,0x15,0xd6,0x1,0xa5,0x13,0x3e,0xa3,0xe0,0xc4,0xef,0xf8,0xb,0x70,0x57,0x43,0xed,0x5d,0x76,0xf,0x70,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
};
static const unsigned char option_button_normal_png[]={
-0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0x20,0x0,0x0,0x0,0x10,0x8,0x6,0x0,0x0,0x0,0x77,0x0,0x7d,0x59,0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0x89,0x0,0x76,0x0,0x95,0x95,0xac,0x1a,0xb5,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xdd,0x9,0x1b,0x15,0x2d,0xd,0xac,0xa,0x50,0x77,0x0,0x0,0x0,0x19,0x74,0x45,0x58,0x74,0x43,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x0,0x43,0x72,0x65,0x61,0x74,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x47,0x49,0x4d,0x50,0x57,0x81,0xe,0x17,0x0,0x0,0x1,0xfb,0x49,0x44,0x41,0x54,0x48,0xc7,0xbd,0x95,0xbd,0x6b,0x14,0x51,0x14,0xc5,0x7f,0x77,0x76,0x4c,0x11,0x2d,0xfc,0x8a,0xdf,0x6,0x52,0xd8,0xc4,0x42,0x48,0xa1,0xad,0x8d,0x8d,0x8d,0xf8,0x27,0x68,0xb7,0x9d,0x8d,0x82,0x95,0xd8,0xfa,0xf,0x2c,0x58,0x28,0x76,0x76,0x29,0x45,0x4,0x4b,0xb,0x1b,0x2b,0x9,0x4,0x89,0xb0,0x44,0xa2,0x46,0xe2,0x7,0x59,0x48,0xe6,0xdd,0xfb,0xae,0xc5,0xcc,0x6c,0x66,0x77,0x26,0xeb,0x66,0x85,0x1d,0x78,0x30,0x73,0xde,0x79,0xf7,0x9e,0x7b,0xee,0x1d,0x9e,0xb8,0x3b,0xe7,0x4e,0x5d,0xbc,0xd,0xb4,0x81,0x1b,0x4c,0xe7,0x79,0x3,0x74,0x36,0x36,0xd7,0x97,0xe5,0xec,0xdc,0x85,0xfb,0x73,0xc7,0x4e,0x3f,0xb9,0x7c,0xe9,0xa,0x67,0x4e,0x9c,0x1f,0xeb,0xf4,0xcb,0x57,0xcf,0xb9,0x77,0xe7,0xe1,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0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xde,0x9,0x10,0x16,0x11,0x12,0x1,0x22,0x6f,0x8b,0x0,0x0,0x0,0x19,0x74,0x45,0x58,0x74,0x43,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x0,0x43,0x72,0x65,0x61,0x74,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x47,0x49,0x4d,0x50,0x57,0x81,0xe,0x17,0x0,0x0,0x0,0xd5,0x49,0x44,0x41,0x54,0x48,0x89,0xed,0x95,0xb1,0x6e,0xc2,0x50,0xc,0x45,0xcf,0xa3,0x96,0x6a,0x55,0x19,0x3a,0xbc,0xe9,0x3d,0xc1,0x17,0xa4,0xed,0x8f,0x91,0xfe,0xc,0xfc,0x18,0x85,0x99,0x5,0x85,0x29,0x3,0x43,0x7,0x47,0x72,0x95,0xe,0x24,0x6b,0x8b,0x40,0x81,0x25,0x77,0xb4,0x2c,0xdf,0x63,0x59,0xba,0xe,0xc0,0xb,0xf0,0xa,0x14,0xc0,0x13,0x10,0x18,0x57,0x1d,0xf0,0x3,0x7c,0x3,0x27,0xe9,0xcd,0xdf,0x81,0x39,0xa0,0x77,0x2,0x30,0xe0,0x0,0x7c,0x9,0xe7,0xcd,0x17,0x6f,0xe5,0x47,0x99,0x53,0x5e,0x8a,0xc8,0xa8,0x0,0xee,0xde,0xd5,0xc7,0x7a,0xbd,0xdd,0x6d,0x2,0xb0,0x17,0x40,0x80,0xe7,0x9c,0x72,0x65,0x66,0x98,0xd9,0xbf,0x43,0x62,0x8c,0x34,0x4d,0x73,0x15,0x80,0xaa,0x86,0x9c,0x72,0xb5,0xdd,0x6d,0x3e,0x1,0x99,0xf5,0xf5,0x20,0x22,0x17,0x99,0xdf,0x2a,0x33,0x43,0x44,0xa0,0x3f,0xf5,0xec,0xef,0xf6,0xf1,0x35,0x1,0x4c,0x0,0x13,0xc0,0x0,0xd0,0xb9,0x3b,0xaa,0x3a,0xba,0xa1,0xaa,0xe2,0xee,0x70,0x8e,0x64,0x4,0x70,0xa0,0xad,0x8f,0xf5,0x2a,0xa7,0xbc,0x2c,0x8a,0xe2,0xa2,0x28,0x8e,0x31,0x5e,0x5,0x30,0x44,0x31,0xd0,0x2,0x1e,0x80,0xc4,0x3,0x9f,0x51,0xe0,0xc1,0xef,0xf8,0x17,0x29,0x4,0x47,0x72,0x2c,0x4,0x5,0x25,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
};
static const unsigned char option_button_pressed_png[]={
-0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0x20,0x0,0x0,0x0,0x10,0x8,0x6,0x0,0x0,0x0,0x77,0x0,0x7d,0x59,0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0x89,0x0,0x76,0x0,0x95,0x95,0xac,0x1a,0xb5,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xdd,0x9,0x1b,0x15,0x31,0x33,0x8b,0x1c,0x10,0x81,0x0,0x0,0x0,0x19,0x74,0x45,0x58,0x74,0x43,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x0,0x43,0x72,0x65,0x61,0x74,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x47,0x49,0x4d,0x50,0x57,0x81,0xe,0x17,0x0,0x0,0x2,0x8,0x49,0x44,0x41,0x54,0x48,0xc7,0xbd,0x95,0xbf,0x8a,0x14,0x41,0x10,0xc6,0x7f,0x35,0x37,0xee,0x3f,0xf,0x15,0x31,0xba,0xe0,0xb8,0xe3,0x9e,0x40,0x30,0x13,0xc4,0x40,0x1f,0x40,0xdf,0x40,0xb3,0x35,0xd7,0x54,0x4c,0x7d,0x81,0xcd,0xcc,0x8d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xde,0x31,0x6a,0x57,0x80,0x6d,0x60,0xab,0x8b,0x83,0x4d,0xdf,0x80,0xb,0xda,0x3c,0x4d,0xb6,0x92,0xe2,0x1f,0x29,0x56,0x40,0xcc,0x4c,0xed,0x94,0xcb,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
+0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0x20,0x0,0x0,0x0,0x10,0x8,0x6,0x0,0x0,0x0,0x77,0x0,0x7d,0x59,0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0x2f,0x0,0x2d,0x0,0x31,0xdb,0x99,0xd6,0x23,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xde,0x9,0x10,0x16,0x15,0x22,0x43,0x97,0x9a,0x23,0x0,0x0,0x0,0x19,0x74,0x45,0x58,0x74,0x43,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x0,0x43,0x72,0x65,0x61,0x74,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x47,0x49,0x4d,0x50,0x57,0x81,0xe,0x17,0x0,0x0,0x0,0xd2,0x49,0x44,0x41,0x54,0x48,0x89,0xed,0xd5,0x31,0x4e,0xc3,0x50,0x10,0x84,0xe1,0xef,0x5,0x4b,0x20,0x44,0xc1,0xeb,0x6c,0x3f,0xc1,0x9,0x2,0x5c,0x2c,0xe1,0x32,0x70,0xb1,0x90,0xd4,0x34,0xc8,0x9,0x9d,0x29,0x28,0x1c,0x29,0xc8,0x14,0x76,0x44,0x7,0x51,0x90,0x93,0x26,0x53,0xaf,0x76,0xfe,0xd5,0x4a,0x33,0x1,0x97,0xb8,0xc6,0x15,0xce,0x10,0xc,0xab,0x16,0x5f,0xf8,0xc4,0x47,0xd6,0x9b,0xdf,0xe3,0x6,0x17,0x7,0x2,0x68,0xf0,0x86,0x97,0x4c,0x77,0xf9,0xed,0xdd,0xf8,0x61,0x9c,0xca,0x34,0xd1,0xe,0xc,0x10,0xb4,0xd5,0xb2,0x7a,0x9e,0x2f,0x66,0x1,0xaf,0x19,0x32,0x9c,0xa7,0x32,0x4d,0x9b,0xa6,0x51,0xd7,0xf5,0x9f,0x3b,0x8a,0xbc,0xb0,0x7a,0x5f,0xed,0xe5,0x1f,0x63,0xc,0xa9,0x4c,0xd3,0xf9,0x62,0xf6,0x88,0x6c,0xf4,0xc3,0x65,0x27,0xf3,0xff,0xaa,0xae,0xeb,0xee,0x9,0xfd,0xab,0x47,0xbf,0x4e,0x1f,0x40,0x27,0x80,0x13,0xc0,0x9,0x60,0xb,0xd0,0xa,0xc4,0x18,0x7,0x37,0x8c,0x31,0x6e,0xc3,0xbe,0xa5,0x4b,0xc1,0xd,0xd6,0xd5,0xb2,0x7a,0x4a,0x65,0x9a,0x14,0x79,0xb1,0x53,0x14,0x17,0x79,0xb1,0x1f,0x41,0x1f,0xc5,0x58,0x63,0x13,0x50,0x3a,0x62,0x19,0x5,0x47,0xae,0xe3,0x6f,0x22,0x6d,0x3e,0xb3,0x5c,0x94,0xd4,0xe,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
};
static const unsigned char panel_bg_png[]={
-0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0x8,0x0,0x0,0x0,0x8,0x8,0x6,0x0,0x0,0x0,0xc4,0xf,0xbe,0x8b,0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0x41,0x0,0x3c,0x0,0x44,0xc0,0x10,0x53,0xfb,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xdd,0x9,0x1b,0x17,0xb,0xf,0x82,0x5e,0x66,0x11,0x0,0x0,0x0,0x19,0x74,0x45,0x58,0x74,0x43,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x0,0x43,0x72,0x65,0x61,0x74,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x47,0x49,0x4d,0x50,0x57,0x81,0xe,0x17,0x0,0x0,0x0,0x16,0x49,0x44,0x41,0x54,0x18,0xd3,0x63,0x74,0x77,0xf6,0xff,0xcf,0x80,0x7,0x30,0x31,0x10,0x0,0xc3,0x43,0x1,0x0,0xea,0x61,0x1,0xe8,0x68,0xbf,0x2f,0x36,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
+0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0x8,0x0,0x0,0x0,0x8,0x8,0x6,0x0,0x0,0x0,0xc4,0xf,0xbe,0x8b,0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0xff,0x0,0xff,0x0,0xff,0xa0,0xbd,0xa7,0x93,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xde,0x9,0x10,0x10,0x25,0xd,0x33,0x8d,0xed,0x3b,0x0,0x0,0x0,0x19,0x74,0x45,0x58,0x74,0x43,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x0,0x43,0x72,0x65,0x61,0x74,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x47,0x49,0x4d,0x50,0x57,0x81,0xe,0x17,0x0,0x0,0x0,0x15,0x49,0x44,0x41,0x54,0x18,0x95,0x63,0x54,0x57,0xd7,0xfc,0xcf,0x80,0x7,0x30,0xe1,0x93,0x1c,0x3e,0xa,0x0,0x86,0x1b,0x1,0x86,0x56,0xb4,0xba,0xe,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
};
static const unsigned char popup_bg_png[]={
-0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0x10,0x0,0x0,0x0,0x20,0x8,0x6,0x0,0x0,0x0,0x1b,0x89,0xf8,0xcc,0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0x30,0x0,0x27,0x0,0x35,0x33,0xd3,0x97,0xbf,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xdd,0x9,0x1b,0x11,0x1c,0x2f,0xb8,0x3e,0xbe,0xfd,0x0,0x0,0x0,0x19,0x74,0x45,0x58,0x74,0x43,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x0,0x43,0x72,0x65,0x61,0x74,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x47,0x49,0x4d,0x50,0x57,0x81,0xe,0x17,0x0,0x0,0x1,0xea,0x49,0x44,0x41,0x54,0x48,0xc7,0xed,0x95,0xb1,0x6e,0xd4,0x40,0x10,0x86,0xbf,0xf1,0x39,0x77,0xb9,0x2,0x21,0x90,0x2,0x42,0x40,0x83,0x94,0x74,0x44,0x22,0xaf,0x40,0xcf,0x1b,0xa0,0xbc,0x4,0x75,0x8a,0x20,0xa8,0x78,0xb,0x3a,0xe8,0xe8,0x79,0x6,0xa,0xca,0x48,0x34,0x10,0x25,0x87,0x93,0xb,0xc7,0x9,0x2e,0x17,0xef,0xce,0x50,0x78,0x7d,0x59,0xaf,0x7c,0x76,0x91,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f,0x9,0xd0,0xe7,0x9c,0x55,0xcb,0x6a,0x52,0x50,0x2d,0x2b,0x39,0x67,0x7e,0x23,0x2d,0x90,0x71,0x6c,0xf6,0xcd,0x67,0xaa,0xd3,0x62,0x7d,0xbb,0x3e,0x29,0xca,0x38,0x22,0x17,0xa8,0x9d,0x51,0xa6,0xc2,0x99,0x75,0xfe,0x1,0x7d,0xe1,0x44,0x88,0x9a,0x7d,0x74,0x9f,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
};
@@ -255,7 +235,7 @@ static const unsigned char popup_bg_disabled_png[]={
static const unsigned char popup_checked_png[]={
-0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0x8,0x0,0x0,0x0,0x8,0x8,0x6,0x0,0x0,0x0,0xc4,0xf,0xbe,0x8b,0x0,0x0,0x0,0x1,0x73,0x52,0x47,0x42,0x0,0xae,0xce,0x1c,0xe9,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xd9,0xb,0x17,0x6,0xe,0x15,0xb4,0x28,0xc,0xa7,0x0,0x0,0x0,0x4a,0x49,0x44,0x41,0x54,0x18,0xd3,0x85,0x8c,0xbb,0xd,0xc0,0x20,0x14,0x3,0xef,0xa1,0xcc,0x91,0x2a,0xb,0xb0,0xff,0xe,0xb0,0x0,0x4d,0xb2,0x88,0xd3,0xe4,0x21,0x44,0xf8,0xd8,0x95,0x7d,0xd2,0x99,0x10,0xab,0x4,0x36,0x39,0x66,0x20,0x97,0x47,0x53,0x83,0xc3,0x78,0x9d,0x16,0x7c,0x8c,0x60,0x35,0xf8,0xd9,0x43,0x0,0x13,0xa2,0xb5,0xb4,0x10,0x0,0x7d,0x4d,0xe5,0x96,0xf8,0xf7,0x5,0x67,0x99,0x30,0x2b,0xcf,0xbf,0xba,0xe0,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
+0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0x8,0x0,0x0,0x0,0x8,0x8,0x6,0x0,0x0,0x0,0xc4,0xf,0xbe,0x8b,0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0xdd,0x0,0xdd,0x0,0xdd,0xf5,0x15,0x8,0x9d,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xde,0x9,0x10,0x16,0x5,0xf,0x4c,0x8a,0xd4,0x7,0x0,0x0,0x0,0x43,0x49,0x44,0x41,0x54,0x18,0x95,0x7d,0xcc,0xc9,0xd,0x0,0x20,0xc,0x3,0xc1,0xd,0xa2,0x18,0xe8,0xbf,0x98,0xd0,0x8d,0xf9,0x10,0x84,0xb8,0xe2,0x57,0x3c,0x92,0x4d,0x88,0xdf,0xa5,0xaf,0x2,0xf9,0x5,0xcd,0x9b,0x9e,0xb,0x81,0xa5,0x16,0x4b,0xf1,0xdc,0x70,0x2e,0x44,0xb9,0x23,0x80,0x9,0xb1,0xae,0xac,0x8,0x80,0x46,0xdc,0x5d,0xe2,0x4c,0x7,0x5d,0x41,0x30,0x13,0xdf,0x10,0x9e,0xf0,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
};
@@ -270,17 +250,17 @@ static const unsigned char popup_unchecked_png[]={
static const unsigned char popup_window_png[]={
-0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0x10,0x0,0x0,0x0,0x40,0x8,0x6,0x0,0x0,0x0,0x13,0x7d,0xf7,0x96,0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0x94,0x0,0x80,0x0,0xa0,0xea,0x26,0x82,0xc7,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xdd,0x9,0x1b,0x14,0x21,0x38,0x57,0xce,0xb1,0x6f,0x0,0x0,0x0,0x19,0x74,0x45,0x58,0x74,0x43,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x0,0x43,0x72,0x65,0x61,0x74,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x47,0x49,0x4d,0x50,0x57,0x81,0xe,0x17,0x0,0x0,0x2,0x9c,0x49,0x44,0x41,0x54,0x58,0xc3,0xed,0x97,0x3f,0x6b,0x14,0x51,0x14,0xc5,0x7f,0x77,0x76,0x92,0xac,0xa2,0x1,0x6d,0x8c,0x89,0x89,0x60,0x29,0x58,0x88,0xdf,0xc0,0x4f,0x20,0x76,0x56,0x96,0x36,0xb6,0x5a,0xa8,0xa5,0x5a,0x68,0x15,0xb0,0xb1,0xb4,0xb2,0x13,0x21,0xbd,0xdf,0x40,0x2c,0x4,0x5b,0x31,0x31,0x71,0x25,0x26,0x9a,0x7f,0x24,0x3b,0x7f,0xde,0xb1,0x78,0xef,0xcd,0xce,0x6c,0x26,0x89,0x41,0xc1,0x66,0x7,0x6,0x86,0xd9,0x7b,0xcf,0x3b,0xe7,0xdc,0x33,0x33,0xfb,0xe0,0x7f,0x1f,0x56,0x3b,0x93,0x99,0xa9,0xd9,0x9b,0x66,0x76,0xc7,0xcc,0xae,0xb7,0x15,0x4b,0x7a,0x27,0xe9,0xe5,0x72,0x6f,0xe9,0xd,0xe0,0x0,0x19,0x90,0x0,0x9d,0x99,0xa9,0xd9,0xf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,0x0,0x61,0xac,0x60,0x76,0x88,0x4,0x27,0x55,0x44,0xe5,0x6f,0x54,0x14,0x22,0x90,0xb3,0x23,0x19,0xc,0xa2,0xab,0x7d,0x6a,0x2c,0x46,0xf2,0x60,0x6,0x16,0x72,0x2b,0x53,0xa8,0xb5,0xca,0x84,0x6,0x68,0xab,0x89,0xa5,0x42,0x80,0x86,0x56,0x72,0x54,0x13,0x39,0xc2,0xc4,0x32,0xac,0x58,0xcb,0xc3,0x70,0xfa,0xe,0xf5,0x40,0xf2,0xf6,0xa9,0xf1,0x1a,0x6a,0x36,0xe,0x1,0xe,0x31,0x50,0x1c,0x56,0x20,0x3b,0x48,0x80,0xe4,0x47,0x79,0x44,0x12,0x5d,0x23,0x79,0x98,0x2,0x3,0x6b,0x8c,0xf2,0x60,0x0,0x85,0xc,0x48,0x10,0x1e,0x67,0xa2,0xac,0xe0,0xab,0xd9,0x21,0x12,0xb2,0xac,0xef,0x1f,0xf4,0x8e,0xa1,0xd2,0x50,0x47,0x50,0x8a,0xa4,0xe3,0x9b,0x5c,0xa9,0xd6,0xd7,0xfa,0x24,0x70,0x76,0x76,0xfa,0xe2,0xe7,0xe3,0x7c,0xf,0x96,0x56,0xbe,0x5c,0x2,0xd6,0x2a,0x6,0x45,0x5e,0x72,0xf5,0xca,0xb5,0x3f,0x6a,0xfe,0xf0,0xf1,0x7d,0xbb,0x84,0x8d,0xcd,0x5f,0xc7,0xfe,0x32,0x25,0x7f,0xfb,0x69,0x1b,0x1,0x8c,0x0,0x46,0x0,0x23,0x80,0x11,0xc0,0x8,0x60,0x4,0xf0,0xef,0x0,0x14,0x1,0x14,0xf6,0x84,0x3f,0x5c,0x71,0x74,0x97,0x2b,0x7c,0x6d,0x4,0x89,0xc,0x5c,0x9e,0x67,0xb,0xab,0xeb,0x3d,0xe,0x3,0x71,0x5,0xac,0xae,0xf7,0xc8,0xf3,0x6c,0x21,0xfe,0xfd,0x4c,0x81,0x12,0x28,0xd6,0x36,0x56,0xe7,0x5,0x27,0xb7,0x76,0xb6,0x6e,0x24,0x49,0x32,0xd1,0xa,0xe0,0x5c,0x3f,0x2f,0xf2,0xb7,0xeb,0x1b,0xab,0xf3,0x40,0x11,0x37,0x9e,0x5d,0xe0,0x14,0x70,0x26,0x9c,0xa7,0xc3,0x96,0x6e,0xd8,0x1f,0x7,0x64,0xc0,0x16,0xf0,0x33,0x9c,0xdb,0x91,0xc1,0x5e,0xf8,0x81,0x50,0x34,0x16,0xf6,0x93,0x56,0x33,0xac,0x4,0x72,0x60,0x27,0xd4,0xee,0x45,0x6,0x49,0x90,0x32,0x1e,0xd8,0x4c,0x84,0xe6,0x64,0x8,0xc0,0x5,0x90,0x7e,0x68,0xce,0x80,0xe2,0x37,0x5,0x81,0x51,0xea,0x99,0x8b,0xa0,0x84,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
+0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0x10,0x0,0x0,0x0,0x40,0x8,0x6,0x0,0x0,0x0,0x13,0x7d,0xf7,0x96,0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0xc2,0x0,0xc2,0x0,0xcc,0x6a,0x6f,0xcc,0x71,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xde,0x9,0x12,0x0,0x3,0x34,0x19,0x79,0x8d,0xec,0x0,0x0,0x0,0x19,0x74,0x45,0x58,0x74,0x43,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x0,0x43,0x72,0x65,0x61,0x74,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x47,0x49,0x4d,0x50,0x57,0x81,0xe,0x17,0x0,0x0,0x1,0x64,0x49,0x44,0x41,0x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0x2,0x20,0x0,0x2,0x20,0x0,0x2,0x20,0x0,0xf6,0x7,0x70,0x1e,0xe0,0x0,0x9c,0x73,0xef,0xb9,0x9d,0x3f,0x5a,0xe7,0x13,0x64,0xc6,0x98,0xa1,0x31,0xe9,0x9f,0x66,0x63,0x52,0x8c,0x31,0x43,0x56,0x83,0x27,0x11,0xb0,0x4,0xec,0x64,0x32,0x79,0x0,0x8e,0xa2,0x28,0x6a,0x6b,0xad,0xab,0xbb,0xcc,0x59,0x96,0xa5,0xd6,0xda,0x27,0xd1,0x5a,0x64,0xf0,0xac,0x1,0xc7,0x40,0x43,0xfa,0x84,0xd5,0x48,0xb7,0xfd,0x3e,0x19,0xb0,0x0,0x3e,0x80,0xa9,0xf4,0xa7,0x4f,0x30,0x97,0xd,0x44,0x54,0x66,0x35,0x4f,0xfa,0x81,0xcc,0x89,0xce,0x0,0x5f,0xa2,0x9d,0xfb,0x4,0x5a,0xae,0x52,0x91,0x34,0x55,0x31,0xeb,0x2d,0x40,0x26,0x90,0x54,0xcc,0xb,0xc0,0x7e,0x3,0xa,0x34,0x6f,0x6c,0x6b,0x15,0x5c,0x54,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
};
static const unsigned char progress_bar_png[]={
-0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0x10,0x0,0x0,0x0,0x10,0x8,0x6,0x0,0x0,0x0,0x1f,0xf3,0xff,0x61,0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0x30,0x0,0x2d,0x0,0x31,0x39,0x29,0xd6,0x70,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xdd,0x9,0x17,0xe,0x26,0xb,0xfc,0x38,0xdf,0xa0,0x0,0x0,0x0,0x19,0x74,0x45,0x58,0x74,0x43,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x0,0x43,0x72,0x65,0x61,0x74,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x47,0x49,0x4d,0x50,0x57,0x81,0xe,0x17,0x0,0x0,0x1,0xb2,0x49,0x44,0x41,0x54,0x38,0xcb,0x6d,0x92,0xbd,0x8e,0x13,0x51,0xc,0x85,0x3f,0x7b,0xa6,0x49,0x93,0x49,0xa,0x2a,0x9a,0x28,0x4a,0xc7,0xdf,0x2,0xed,0x2a,0x35,0x25,0x1d,0x88,0xdd,0x17,0x98,0x82,0x7,0x48,0x8f,0xc4,0x23,0xa4,0xdc,0x86,0x20,0xb6,0xa3,0xe4,0x25,0xb2,0x12,0x7f,0x55,0x14,0xa5,0xa2,0xa2,0x1,0x69,0xa5,0x14,0x7b,0x6d,0x53,0xcc,0xdc,0xd9,0x4c,0x58,0x4b,0x6e,0xae,0xcf,0xb1,0x8f,0x8f,0xaf,0x4c,0xa6,0x33,0x72,0xa8,0xf3,0x2,0xa8,0x81,0xe7,0xc0,0x7d,0xfa,0xf1,0xb,0x58,0x3,0xcb,0xed,0x6e,0xf3,0x25,0x3f,0xca,0x64,0x3a,0x43,0x9d,0xa,0x78,0x2f,0x22,0xb5,0x8a,0xa0,0x85,0x40,0x8,0x22,0x2,0x40,0x44,0x80,0x4,0x6e,0x81,0x47,0x10,0x11,0x4b,0x60,0xb1,0xdd,0x6d,0xfe,0x96,0xea,0x0,0xbc,0x53,0x91,0xba,0x28,0xb5,0x21,0x22,0x20,0x74,0xd,0xda,0x59,0xa8,0x6,0x2a,0x81,0x25,0xaf,0x3d,0xc2,0x80,0xb7,0x32,0x9d,0xcc,0x5e,0x89,0xc8,0xa7,0xb2,0x54,0x4,0x6d,0xa0,0x22,0xa8,0x8,0xd1,0x51,0xc9,0x93,0x1b,0x45,0x38,0x29,0x39,0x11,0xf1,0xba,0x4,0x6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,0xf7,0x60,0x30,0xf8,0xfa,0xf0,0xd1,0x83,0xd5,0xea,0xe3,0x87,0xcf,0xc0,0x1f,0x80,0x7f,0x8a,0x82,0x28,0xc9,0xa8,0xf,0x19,0xf1,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
+0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0x10,0x0,0x0,0x0,0x10,0x8,0x6,0x0,0x0,0x0,0x1f,0xf3,0xff,0x61,0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0x27,0x0,0x27,0x0,0x27,0x12,0xaa,0xad,0x65,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xde,0x9,0x11,0x16,0x16,0x1b,0x8f,0x3,0x26,0x8d,0x0,0x0,0x0,0x19,0x74,0x45,0x58,0x74,0x43,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x0,0x43,0x72,0x65,0x61,0x74,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x47,0x49,0x4d,0x50,0x57,0x81,0xe,0x17,0x0,0x0,0x0,0xba,0x49,0x44,0x41,0x54,0x38,0x8d,0xed,0xd3,0x3b,0x4e,0x3,0x41,0x10,0x84,0xe1,0x6f,0x4c,0x4b,0x1e,0xaf,0x36,0x20,0xde,0x11,0x9c,0x80,0xc7,0xd9,0x38,0x9,0x67,0x33,0x76,0x4c,0x82,0xd6,0x31,0x1,0x82,0xb1,0x34,0xc8,0x4,0x6c,0xbc,0x6b,0xc9,0x9,0x1,0x1d,0xb6,0xba,0xfe,0x52,0x4b,0x55,0x9,0x1d,0xae,0xd1,0xe3,0xa,0xc9,0xfc,0x9c,0xf0,0x8d,0xf,0xbc,0xc7,0x24,0x7e,0xc0,0xd,0xf2,0x99,0x80,0x8a,0x37,0xbc,0xc4,0xe4,0x7c,0x7b,0x7f,0xf7,0xf8,0x5c,0x86,0xb2,0x89,0x88,0x59,0x40,0x6b,0xed,0x34,0x1e,0xc6,0xaf,0xdd,0x7e,0xfb,0x84,0xd7,0x40,0x60,0x5d,0x86,0xd2,0xd5,0x5a,0xd5,0x5a,0x67,0xed,0x73,0xce,0xa9,0xc,0xa5,0xdb,0xed,0xb7,0x6b,0xc4,0x6a,0xda,0xa7,0x88,0x58,0x14,0x43,0xad,0x55,0x44,0x30,0xbd,0xba,0x9a,0x3f,0x5f,0x9e,0x7f,0xc0,0x5f,0x2,0x9c,0x5a,0x6b,0x72,0xce,0x8b,0x82,0x9c,0xb3,0xd6,0x1a,0xbf,0x91,0x16,0x68,0x38,0x8e,0x87,0xf1,0xb3,0xc,0x65,0xd3,0xf7,0xfd,0x59,0x51,0xc6,0x11,0x2d,0x61,0x70,0x41,0x99,0x92,0xb,0xeb,0xfc,0x3,0x18,0xa7,0x44,0x3f,0xdc,0xad,0xd9,0x96,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
};
static const unsigned char progress_fill_png[]={
-0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0x10,0x0,0x0,0x0,0x10,0x8,0x6,0x0,0x0,0x0,0x1f,0xf3,0xff,0x61,0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0xaf,0x0,0x9a,0x0,0xec,0x52,0xc,0x20,0x4d,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xdd,0x9,0x17,0xe,0x28,0x33,0x4a,0xb9,0x4a,0xb0,0x0,0x0,0x0,0x19,0x74,0x45,0x58,0x74,0x43,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x0,0x43,0x72,0x65,0x61,0x74,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x47,0x49,0x4d,0x50,0x57,0x81,0xe,0x17,0x0,0x0,0x2,0x9a,0x49,0x44,0x41,0x54,0x38,0xcb,0x75,0x93,0x4b,0x88,0x5c,0x45,0x14,0x86,0xbf,0x53,0x75,0x6b,0xa6,0x67,0x92,0xee,0x76,0x32,0xce,0x18,0x8c,0xc3,0xb4,0x4,0x62,0x30,0xf,0x41,0x41,0x8c,0xae,0x5d,0xb8,0x8,0x98,0x8c,0x90,0x85,0x44,0x70,0x2d,0x66,0xab,0xb,0x97,0x6e,0xdc,0xeb,0x5a,0x48,0x16,0x32,0x90,0xc9,0x80,0x2e,0x7c,0x80,0xd9,0x9,0x1a,0xc8,0x42,0xe3,0xa0,0x84,0x3c,0xe6,0x21,0x61,0x3a,0x9d,0x89,0xf6,0xed,0x3b,0xf7,0xd9,0x55,0xc7,0x45,0xdf,0x91,0x9e,0x80,0x3f,0x14,0x75,0xaa,0xea,0xd4,0x7f,0xfe,0xf3,0x53,0x25,0xaa,0xca,0x1e,0x3a,0xb3,0x67,0x3e,0xd1,0xe1,0xc4,0x7,0x61,0x18,0xcd,0x11,0x22,0xcb,0x38,0xcc,0xd0,0x9b,0x68,0xd8,0x93,0xa8,0xfc,0xa2,0x7b,0xb8,0xf9,0xe9,0xde,0xb6,0x0,0x74,0x9e,0x7e,0x75,0xc1,0x57,0xee,0xdb,0x93,0xc7,0x5f,0x3b,0x71,0xfe,0x9d,0xf3,0x2c,0x2e,0x1e,0xa5,0xd5,0x3a,0x44,0x91,0x7,0x0,0x26,0x1b,0x86,0x38,0x7e,0xcc,0xc6,0xc6,0x5d,0xae,0x5d,0xbd,0xc6,0xef,0x7f,0xfe,0xbc,0x66,0x5d,0xf5,0xd6,0xf6,0x7c,0x7b,0x4b,0x0,0x16,0xda,0x6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3,0x54,0x93,0x2d,0x42,0x64,0x9e,0xf8,0xce,0x1,0x57,0xc4,0xad,0x39,0xfd,0xe6,0xd8,0x2b,0xb3,0x9f,0xad,0xac,0xac,0xdc,0x7,0xb2,0x7f,0x1,0x90,0xaf,0x58,0x10,0xf8,0xc7,0xe,0xbe,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
+0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0x10,0x0,0x0,0x0,0x10,0x8,0x6,0x0,0x0,0x0,0x1f,0xf3,0xff,0x61,0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0x26,0x0,0x26,0x0,0x26,0x59,0xf,0xde,0x74,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xde,0x9,0x14,0x15,0x1e,0x28,0xcd,0x92,0x83,0xf8,0x0,0x0,0x0,0x19,0x74,0x45,0x58,0x74,0x43,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x0,0x43,0x72,0x65,0x61,0x74,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x47,0x49,0x4d,0x50,0x57,0x81,0xe,0x17,0x0,0x0,0x0,0x82,0x49,0x44,0x41,0x54,0x38,0x8d,0xed,0xd0,0x21,0xe,0xc3,0x30,0xc,0x5,0xd0,0xbf,0xc9,0x2c,0x3f,0xb4,0xbd,0xca,0x60,0x6e,0xd0,0xb3,0xe6,0x6,0x81,0x3b,0x4b,0x59,0x64,0x87,0x39,0xd2,0xc8,0x40,0xe7,0x4a,0x93,0xc6,0x6,0xfa,0xe1,0xb3,0xfd,0x81,0x81,0x2b,0xb7,0x8,0xa5,0x94,0x87,0xaa,0x56,0x33,0x5b,0x8e,0x4e,0x72,0xcf,0x39,0x6f,0xad,0xb5,0xe7,0xd1,0x25,0x16,0xa8,0x6a,0xed,0xbd,0x27,0x77,0xff,0xf0,0x39,0x67,0x2,0x50,0x1,0xac,0x5f,0xb,0xcc,0x6c,0x89,0xc7,0x0,0xe0,0xee,0xc9,0xcc,0x52,0xf4,0xfb,0x69,0xf3,0xc7,0xfc,0x61,0x1,0xc9,0x5d,0x44,0x46,0x74,0x11,0x19,0x24,0xf7,0x93,0x47,0xc8,0x39,0x6f,0x0,0x6a,0x7c,0x18,0xc9,0xf1,0x9e,0x5d,0x9,0x79,0x1,0x2e,0x56,0x2e,0xc3,0x70,0xd9,0xde,0xde,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
};
@@ -289,53 +269,68 @@ static const unsigned char reference_border_png[]={
};
+static const unsigned char scroll_bg_png[]={
+0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0x8,0x0,0x0,0x0,0x8,0x8,0x6,0x0,0x0,0x0,0xc4,0xf,0xbe,0x8b,0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0x26,0x0,0x26,0x0,0x26,0x59,0xf,0xde,0x74,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xde,0x9,0x14,0x17,0x37,0x2c,0x8d,0x3d,0xc,0x64,0x0,0x0,0x0,0x19,0x74,0x45,0x58,0x74,0x43,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x0,0x43,0x72,0x65,0x61,0x74,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x47,0x49,0x4d,0x50,0x57,0x81,0xe,0x17,0x0,0x0,0x0,0x3f,0x49,0x44,0x41,0x54,0x18,0x95,0xad,0x8e,0x31,0xa,0x0,0x20,0xc,0x3,0xaf,0xda,0x47,0xf4,0xe5,0xf6,0xb3,0x4a,0x5d,0x1c,0x54,0x50,0x17,0xf,0x42,0x96,0x24,0x44,0xcc,0x8c,0x1b,0x69,0x78,0x1,0x62,0x53,0x1,0x90,0xb1,0x10,0xb5,0xb6,0xa5,0xa9,0x9a,0x1,0x24,0xf1,0xe0,0x5f,0xc0,0x55,0x33,0xb3,0x0,0x9f,0x4f,0x1e,0xe9,0xf,0x1d,0xb,0x68,0x95,0x6b,0x4f,0xeb,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
+};
+
+
static const unsigned char scroll_button_down_png[]={
-0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0x10,0x0,0x0,0x0,0x10,0x8,0x6,0x0,0x0,0x0,0x1f,0xf3,0xff,0x61,0x0,0x0,0x0,0x1,0x73,0x52,0x47,0x42,0x0,0xae,0xce,0x1c,0xe9,0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0xff,0x0,0xff,0x0,0xff,0xa0,0xbd,0xa7,0x93,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xdb,0xb,0x4,0x11,0x20,0xd,0xba,0x4e,0x71,0x52,0x0,0x0,0x0,0x19,0x74,0x45,0x58,0x74,0x43,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x0,0x43,0x72,0x65,0x61,0x74,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x47,0x49,0x4d,0x50,0x57,0x81,0xe,0x17,0x0,0x0,0x1,0x8d,0x49,0x44,0x41,0x54,0x38,0xcb,0x9d,0x93,0xcf,0x4a,0x5b,0x41,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x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xde,0x9,0x11,0x13,0x19,0x1f,0x9,0x3d,0x3c,0xb0,0x0,0x0,0x0,0x19,0x74,0x45,0x58,0x74,0x43,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x0,0x43,0x72,0x65,0x61,0x74,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x47,0x49,0x4d,0x50,0x57,0x81,0xe,0x17,0x0,0x0,0x0,0xa3,0x49,0x44,0x41,0x54,0x38,0x8d,0xcd,0x93,0x31,0xa,0x2,0x31,0x10,0x45,0x7f,0xc2,0x14,0x3,0x6,0xab,0xad,0x32,0x57,0x50,0xbc,0x87,0x88,0x97,0x11,0xf1,0xc,0x22,0x1e,0x33,0x5b,0xa5,0xb1,0x59,0xa7,0x18,0x58,0x5b,0x89,0x9b,0x95,0x88,0xa0,0xbf,0x4c,0xfe,0xfb,0xf9,0x3,0x13,0xb7,0x5e,0x6d,0x58,0xa2,0xc,0x44,0xe4,0xd0,0x20,0x33,0x1b,0x53,0x9f,0x16,0x24,0x51,0xee,0xaa,0xa,0x55,0x6d,0xe1,0xc1,0xcc,0x4e,0xa2,0xc,0x9e,0x88,0x9a,0x61,0x0,0x50,0x55,0x10,0x11,0x7c,0x33,0x59,0xe8,0xf7,0x1,0x54,0x1e,0x5c,0xae,0xe7,0x59,0xe0,0x78,0x38,0x7d,0xb7,0xc1,0x4b,0x40,0xf9,0xc2,0xbb,0xbb,0xc9,0x6,0x53,0xc6,0x5a,0x70,0x75,0x84,0x67,0x60,0xae,0x95,0xdb,0x6d,0xf7,0x63,0xce,0xb9,0x6a,0x98,0x53,0xd7,0x75,0x7f,0xb0,0x7,0xde,0xcc,0xc0,0xcc,0xcd,0x20,0x33,0xc3,0xcc,0x40,0xa9,0x4f,0x4b,0x89,0x72,0xb,0x21,0x7c,0xf2,0x9d,0xe5,0x1,0xd1,0x91,0x38,0x2b,0x1d,0x55,0xcb,0xf6,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
};
static const unsigned char scroll_button_down_hl_png[]={
-0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0x10,0x0,0x0,0x0,0x10,0x8,0x6,0x0,0x0,0x0,0x1f,0xf3,0xff,0x61,0x0,0x0,0x0,0x1,0x73,0x52,0x47,0x42,0x0,0xae,0xce,0x1c,0xe9,0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0xff,0x0,0xff,0x0,0xff,0xa0,0xbd,0xa7,0x93,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xdb,0xb,0x4,0x11,0x1f,0x1f,0x11,0x29,0x2a,0x26,0x0,0x0,0x0,0x19,0x74,0x45,0x58,0x74,0x43,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x0,0x43,0x72,0x65,0x61,0x74,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x47,0x49,0x4d,0x50,0x57,0x81,0xe,0x17,0x0,0x0,0x1,0x84,0x49,0x44,0x41,0x54,0x38,0xcb,0x9d,0x93,0xcf,0x4a,0x6b,0x31,0x10,0x87,0xbf,0x94,0xfa,0x7,0xa1,0x82,0xdd,0xea,0xc2,0x9d,0xfa,0x16,0x45,0x10,0x1f,0xc0,0xbd,0xa0,0x2f,0x71,0x71,0x23,0x72,0x17,0x82,0xb8,0x70,0xd1,0xb5,0xa,0xee,0x7d,0x0,0xf1,0x41,0xd4,0x9d,0xe0,0x15,0x17,0x52,0x2f,0x9c,0x43,0x32,0x49,0xce,0x49,0x72,0x17,0xad,0x4d,0x6b,0x7b,0x55,0x1c,0x8,0x9,0x99,0xf9,0x7d,0x33,0xc9,0x24,0xa,0x48,0xab,0xcb,0x2b,0xfc,0xc4,0x1e,0x9f,0xff,0xd0,0x5c,0x5d,0x5e,0x61,0x63,0x6d,0x9d,0xed,0xad,0x2d,0x16,0x5b,0x2d,0x40,0x41,0x4a,0xa0,0x3e,0x44,0x27,0x40,0x29,0x20,0x51,0x94,0x25,0x37,0xb7,0xb7,0x0,0x34,0x1,0x36,0x3b,0x1d,0x0,0x7a,0xaf,0xbd,0xf7,0xc8,0x91,0x99,0x89,0xbd,0x99,0xf9,0x59,0x36,0x3b,0x1d,0xee,0x1e,0xee,0xfb,0x80,0xf6,0xd2,0x12,0x7f,0xdf,0xde,0xf0,0xde,0xe5,0xec,0x69,0x5c,0x9e,0xf5,0xa,0xd5,0x80,0x76,0xbb,0x9d,0x2b,0x8,0x21,0x12,0x43,0x24,0xc6,0x38,0xa2,0x98,0x72,0x4,0x80,0x94,0x88,0x21,0x12,0x42,0xcc,0x80,0xba,0xae,0xa8,0x43,0x20,0x86,0x30,0x55,0x3b,0x6a,0xa,0xa8,0x43,0xa0,0xae,0xab,0xc,0x70,0xd6,0x51,0x79,0x8f,0x77,0x8e,0x9d,0xbd,0xdd,0x4f,0x1,0xd7,0x97,0x57,0xa0,0x14,0xce,0xba,0xc,0xb0,0xce,0xe2,0xac,0xc5,0x7b,0xff,0x65,0xeb,0x9c,0xf7,0x24,0xc0,0xce,0xcf,0x1,0xd0,0x0,0x30,0x62,0x30,0x46,0x30,0xc6,0x70,0x7e,0xd6,0xfd,0xaf,0xf8,0xfc,0xac,0x8b,0x31,0x83,0x58,0x31,0x19,0x20,0xa5,0x46,0x8c,0x46,0xa4,0xef,0xe8,0x1e,0x9f,0x4c,0x88,0xbb,0xc7,0x27,0x18,0x31,0x88,0x48,0x3f,0xb6,0xd4,0x19,0xa0,0xc5,0x20,0x62,0x11,0x2b,0xc3,0x71,0x7a,0x78,0x34,0x14,0x9f,0x1e,0x1e,0x8d,0xf9,0x44,0x2c,0x7a,0x50,0x41,0x13,0x40,0x6b,0x83,0x38,0x4b,0x55,0x55,0x63,0xd7,0xfd,0xfb,0xd7,0xc1,0x64,0x1b,0x81,0x30,0x13,0x41,0x37,0x32,0x40,0xb4,0xe0,0xbc,0x23,0xd4,0x35,0xdf,0xe9,0x63,0x8c,0x11,0x92,0xca,0x0,0xe3,0x2c,0x95,0xf7,0xf9,0x21,0x7d,0x61,0x8d,0x10,0x9,0x83,0x44,0x4d,0x80,0xa7,0x97,0x67,0x5a,0xb,0xb,0xa4,0xd1,0xf4,0x69,0xca,0xb,0x1a,0x2e,0x15,0x65,0xef,0x75,0x8,0xd8,0x2f,0xca,0xe2,0xa2,0x28,0x8b,0x9f,0xfc,0xe8,0xfd,0x7f,0xcd,0x23,0xeb,0x93,0x35,0xff,0xc7,0x89,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
+0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0x10,0x0,0x0,0x0,0x10,0x8,0x6,0x0,0x0,0x0,0x1f,0xf3,0xff,0x61,0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0x59,0x0,0x59,0x0,0x59,0xbd,0x9a,0xea,0xaa,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xde,0x9,0x11,0x13,0x1a,0x0,0xaf,0x18,0x62,0x86,0x0,0x0,0x0,0x19,0x74,0x45,0x58,0x74,0x43,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x0,0x43,0x72,0x65,0x61,0x74,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x47,0x49,0x4d,0x50,0x57,0x81,0xe,0x17,0x0,0x0,0x0,0x9c,0x49,0x44,0x41,0x54,0x38,0x8d,0xc5,0x93,0x41,0xa,0x2,0x31,0xc,0x45,0x7f,0x87,0x6,0x21,0x5,0xe7,0x6,0x2e,0x9a,0x63,0x88,0x78,0x30,0x11,0x4,0xf1,0x98,0x9d,0x4b,0x48,0xa3,0x90,0x85,0x6e,0xb5,0xce,0x8c,0xad,0xa,0xfe,0x65,0xd2,0xf7,0xf3,0x53,0x88,0xdb,0xac,0xb7,0xb,0x89,0x72,0x21,0x22,0x87,0x6,0x99,0xd9,0x2d,0xd,0x69,0xe9,0x25,0xca,0x55,0x55,0x91,0x55,0x5b,0x78,0x4,0x66,0x27,0x51,0xce,0x1d,0x11,0x35,0xc3,0x0,0x90,0x55,0x41,0x44,0xe8,0x9a,0xc9,0x42,0xff,0x37,0xf0,0x65,0xe1,0x78,0x3a,0xcc,0x2,0xfb,0xdd,0x73,0xff,0xf7,0x2b,0x94,0x13,0xde,0xf5,0x46,0x13,0x8c,0x3d,0x9c,0x32,0x9e,0x5c,0xe1,0x11,0x98,0x4b,0xf5,0xf2,0x89,0x35,0x53,0xab,0x12,0xd4,0xea,0x7b,0x3,0x33,0x43,0x60,0x6e,0x6,0x3,0x33,0xcc,0xc,0x3e,0xd,0x89,0x25,0x4a,0xee,0xfb,0xfe,0x93,0x73,0x5e,0xdd,0x1,0xb6,0x6d,0x35,0xa4,0xf0,0x42,0xdf,0x17,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
};
static const unsigned char scroll_button_left_png[]={
-0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0x10,0x0,0x0,0x0,0x10,0x8,0x6,0x0,0x0,0x0,0x1f,0xf3,0xff,0x61,0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0x30,0x0,0x2d,0x0,0x31,0x39,0x29,0xd6,0x70,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xdd,0x9,0x17,0xe,0x16,0x1f,0x39,0xa4,0x3d,0x2e,0x0,0x0,0x0,0x19,0x74,0x45,0x58,0x74,0x43,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x0,0x43,0x72,0x65,0x61,0x74,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x47,0x49,0x4d,0x50,0x57,0x81,0xe,0x17,0x0,0x0,0x2,0x47,0x49,0x44,0x41,0x54,0x38,0xcb,0x5d,0x93,0x51,0x4b,0x54,0x51,0x10,0xc7,0x7f,0x77,0x77,0x75,0x33,0xd7,0x5d,0x64,0xa3,0x56,0x83,0x50,0xb1,0xd0,0xd2,0x90,0xa,0xa1,0x97,0x9e,0xfb,0x8,0xe1,0x37,0xd8,0x87,0x90,0x1e,0x12,0xd3,0xd5,0xc2,0x82,0x88,0x5e,0x3,0x3f,0x41,0xdf,0xa1,0xcf,0x10,0x18,0x91,0x41,0x11,0xa2,0x66,0x65,0xab,0xbb,0xa6,0x5e,0x77,0xb5,0xbb,0x7b,0x66,0xa6,0x87,0x7b,0xf7,0xb6,0x3a,0x70,0x38,0x87,0x73,0x66,0xe6,0x3f,0xf3,0x9f,0xf3,0xf7,0x68,0xb3,0xa1,0x81,0xe1,0xfb,0x40,0x11,0xb8,0xd,0x5c,0xe6,0xb4,0xfd,0x2,0x56,0x80,0xe5,0xf5,0xcd,0xb5,0x77,0xad,0x4b,0x2f,0xa,0xcc,0x1,0x2f,0xb,0x85,0xfe,0xe2,0xd8,0xe8,0x38,0xbd,0xb9,0x5e,0x3a,0xd3,0x69,0x54,0xc,0x80,0x44,0xd2,0xa3,0x11,0x4,0xec,0x1f,0xee,0xf3,0xf9,0xcb,0x2a,0xe5,0xf2,0xf6,0x32,0xf0,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x35,0x9d,0xb,0x47,0xc,0xe0,0x9c,0x43,0x4d,0x11,0x15,0x4c,0x95,0x67,0xa5,0xe7,0x58,0xdc,0x8f,0x61,0x18,0xaa,0x82,0xa9,0xc4,0xbb,0x6b,0x4b,0x70,0xe8,0x9c,0x43,0x45,0x30,0x8b,0x88,0x32,0x61,0x71,0x6e,0x9,0x33,0x8b,0x97,0xaa,0x22,0xaa,0xa8,0xa,0xa2,0xda,0x4a,0x50,0x4b,0x0,0xab,0xce,0x35,0x51,0x5c,0xec,0xa0,0x12,0xee,0xb,0x73,0x4f,0x23,0xfc,0xb0,0x82,0xd6,0x14,0x14,0x87,0xb,0x39,0x58,0xf1,0x86,0x6,0x86,0xa7,0x72,0xb9,0xdc,0xdb,0x8b,0xf9,0x4b,0xf8,0xbe,0x8f,0x47,0x22,0xfa,0xe0,0x6d,0x8c,0x79,0x5e,0x4c,0xa6,0xa1,0x64,0xb3,0x59,0x76,0xaa,0x65,0x7c,0xdf,0x7f,0x90,0xdc,0x3f,0xf8,0xb3,0x7a,0xbe,0xab,0xfb,0x42,0x3a,0x9d,0x9e,0xcc,0x74,0x67,0x68,0x48,0x23,0xea,0x33,0x42,0x8e,0x26,0x61,0x9e,0xe0,0x25,0x3d,0x7a,0x32,0x3d,0xd4,0x4f,0xea,0xec,0xed,0x55,0xdf,0xac,0x6f,0xae,0xbd,0x6e,0x69,0xa1,0xf4,0xbb,0xbc,0x9d,0xec,0xc9,0x64,0x8b,0xf9,0x7c,0x1e,0x2f,0x91,0xf8,0xaf,0xb4,0xb6,0x69,0x98,0x2a,0x3b,0x95,0x1d,0x8e,0x6a,0xfe,0x32,0x50,0x6a,0xf7,0x39,0x2b,0xe7,0x49,0xa0,0x70,0x46,0xce,0x65,0xe0,0xfd,0x59,0x39,0xff,0x3,0xf4,0x94,0x88,0x15,0xb6,0xb0,0x66,0x34,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
+0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0x10,0x0,0x0,0x0,0x10,0x8,0x6,0x0,0x0,0x0,0x1f,0xf3,0xff,0x61,0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0x59,0x0,0x59,0x0,0x59,0xbd,0x9a,0xea,0xaa,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xde,0x9,0x11,0x13,0x19,0x39,0xdb,0x30,0xb9,0x4d,0x0,0x0,0x0,0x19,0x74,0x45,0x58,0x74,0x43,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x0,0x43,0x72,0x65,0x61,0x74,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x47,0x49,0x4d,0x50,0x57,0x81,0xe,0x17,0x0,0x0,0x0,0xbb,0x49,0x44,0x41,0x54,0x38,0x8d,0xad,0x93,0x3d,0xe,0x82,0x40,0x10,0x85,0x1f,0x64,0x8a,0x49,0x24,0x56,0x54,0x3b,0x57,0xd0,0x78,0xf,0x63,0x3c,0x8e,0xbf,0x7,0x50,0x44,0x8e,0x9,0x15,0x8d,0xd,0x4e,0x31,0xc9,0x5a,0x61,0xa1,0x22,0x2c,0xfa,0x92,0xa9,0x36,0xdf,0xb7,0x6f,0x93,0x9d,0x68,0x3e,0x5b,0xb0,0x38,0x69,0x88,0x28,0x42,0x40,0xcc,0xcc,0x97,0x55,0x39,0x21,0x71,0x72,0x57,0x55,0xa8,0x6a,0x8,0xf,0x66,0x8e,0xc4,0x49,0x13,0x13,0x51,0x30,0xc,0x0,0xaa,0xa,0x22,0x42,0x1c,0x4c,0xbe,0xa4,0x57,0x90,0x17,0x19,0xf2,0x22,0xeb,0x3c,0xa7,0x6f,0xf0,0xe5,0x7a,0x86,0xf7,0x7e,0x5c,0x83,0x2c,0x3f,0xf5,0x95,0xeb,0x6e,0xd0,0xc2,0x7d,0xb7,0x77,0xa,0x86,0x80,0x6d,0x3e,0x3e,0x61,0xb7,0x39,0xfc,0x26,0x68,0x25,0xde,0xfb,0xe7,0x4,0xb,0x0,0x60,0xbf,0x3d,0xf6,0xa,0xa2,0xd5,0x72,0xed,0xeb,0xba,0x1e,0xd2,0xf6,0x2d,0x69,0x9a,0xfe,0xe1,0x27,0x9a,0x19,0x98,0x39,0x18,0x64,0x66,0x98,0x19,0xa8,0xac,0xca,0xa9,0x38,0xb9,0x25,0x49,0x32,0x66,0x9d,0xe5,0x1,0x80,0xd0,0x51,0x2e,0x9,0x63,0x6e,0xe0,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
};
static const unsigned char scroll_button_left_hl_png[]={
-0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0x10,0x0,0x0,0x0,0x10,0x8,0x6,0x0,0x0,0x0,0x1f,0xf3,0xff,0x61,0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0x30,0x0,0x2d,0x0,0x31,0x39,0x29,0xd6,0x70,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xdd,0x9,0x17,0xe,0x16,0x30,0x92,0x75,0x0,0x77,0x0,0x0,0x0,0x19,0x74,0x45,0x58,0x74,0x43,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x0,0x43,0x72,0x65,0x61,0x74,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x47,0x49,0x4d,0x50,0x57,0x81,0xe,0x17,0x0,0x0,0x2,0x5a,0x49,0x44,0x41,0x54,0x38,0xcb,0x5d,0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,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xde,0x9,0x11,0x13,0x19,0x35,0xd2,0x86,0xf5,0x66,0x0,0x0,0x0,0x19,0x74,0x45,0x58,0x74,0x43,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x0,0x43,0x72,0x65,0x61,0x74,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x47,0x49,0x4d,0x50,0x57,0x81,0xe,0x17,0x0,0x0,0x0,0xc3,0x49,0x44,0x41,0x54,0x38,0x8d,0x9d,0x93,0x4d,0xa,0x83,0x30,0x10,0x85,0x5f,0xc4,0xa1,0x10,0xa1,0xde,0xa0,0xb,0x73,0x8c,0x52,0x7a,0x2d,0xa9,0x68,0x5d,0xb4,0xf6,0xef,0x8c,0xf1,0x12,0xc5,0xb4,0x30,0x8b,0xe9,0x4e,0x8a,0x68,0x34,0xbe,0x6d,0x78,0xdf,0xbc,0x99,0x47,0xd4,0x61,0x7f,0xdc,0x98,0xcc,0x7c,0x88,0x48,0x21,0x40,0xcc,0x2c,0xb6,0xb5,0xdb,0xd8,0x64,0xe6,0xeb,0x9c,0x43,0xe7,0x5c,0x88,0x1f,0x89,0xd6,0xca,0x64,0xe6,0x1d,0x11,0x51,0xb0,0x19,0x0,0x3a,0xe7,0x40,0x44,0x88,0x82,0x9d,0x3,0xcd,0x2,0xaa,0xba,0x40,0x55,0x17,0x93,0xef,0xb1,0xcf,0x5c,0x9e,0x4f,0x10,0x11,0xef,0x80,0x49,0x40,0x51,0xe6,0x10,0x11,0x88,0x8,0x94,0x9a,0x2e,0x68,0x14,0x50,0x94,0x39,0x0,0xf4,0x80,0xe0,0x4,0x43,0x93,0xf,0x32,0x7a,0xc4,0xe6,0xf2,0xe8,0xa7,0xcf,0xa5,0x98,0x6c,0xe1,0x76,0x7d,0x2e,0x5a,0xc1,0x5b,0xe3,0xbd,0x79,0x1,0xf0,0xaf,0xe0,0xad,0xf1,0x1f,0xb2,0x2a,0xc1,0x12,0x45,0xcc,0x8c,0x44,0xeb,0x60,0x63,0xa2,0x35,0x98,0x19,0xb1,0x6d,0xad,0x36,0x99,0xe9,0xd2,0x34,0x5d,0xf3,0x9d,0x77,0x3f,0xd3,0x69,0x5f,0xde,0x59,0x55,0x4f,0x95,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
};
static const unsigned char scroll_button_right_png[]={
-0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0x10,0x0,0x0,0x0,0x10,0x8,0x6,0x0,0x0,0x0,0x1f,0xf3,0xff,0x61,0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0x30,0x0,0x2d,0x0,0x31,0x39,0x29,0xd6,0x70,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xdd,0x9,0x17,0xe,0x16,0x14,0xae,0x76,0xe4,0xa6,0x0,0x0,0x0,0x19,0x74,0x45,0x58,0x74,0x43,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x0,0x43,0x72,0x65,0x61,0x74,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x47,0x49,0x4d,0x50,0x57,0x81,0xe,0x17,0x0,0x0,0x2,0x43,0x49,0x44,0x41,0x54,0x38,0xcb,0x5d,0x93,0xdf,0x4a,0x54,0x51,0x14,0x87,0xbf,0x73,0x46,0x9d,0xcc,0xd1,0x41,0x26,0x6a,0x34,0x8,0x15,0xb,0x2d,0xd,0xa9,0x10,0xba,0xe9,0xba,0x47,0x8,0xdf,0x60,0x2e,0xa2,0x82,0x90,0xb4,0x29,0x85,0x84,0x88,0x6e,0x3,0x9f,0xa0,0x77,0xe8,0x19,0x2,0x23,0x32,0x28,0x42,0xd4,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x57,0xca,0xa8,0x9,0xaa,0x82,0x8a,0x80,0x1,0x66,0x3c,0xc9,0x3f,0x42,0xd5,0x43,0x34,0x86,0x97,0x2b,0x47,0x88,0x8,0xc0,0x54,0x8,0xa4,0x9d,0xb8,0xe6,0x47,0x15,0x45,0x4d,0x30,0x53,0x5f,0x2,0xc6,0xdc,0xf3,0xc7,0x98,0xc6,0xf0,0x58,0xc4,0x89,0x3,0x48,0x87,0x0,0xe2,0xea,0x5e,0x41,0x62,0x25,0x55,0x6f,0x0,0xc3,0xcc,0x3f,0xf3,0xb,0xb3,0x5e,0x40,0x5,0x31,0x45,0x9c,0x6f,0x72,0x7,0x40,0xdd,0x39,0x54,0x85,0x0,0xef,0xbc,0x61,0xdf,0x9a,0xb3,0xf6,0xef,0xa2,0xd2,0x9c,0x4a,0xdd,0xb9,0x16,0xc0,0x39,0x87,0x9a,0x82,0x19,0x41,0x7c,0xbd,0x95,0xee,0x79,0x8b,0xf9,0xa5,0xa6,0x40,0x10,0xe7,0x34,0x0,0x87,0xce,0xb9,0xb4,0x8a,0x10,0x4,0x86,0x35,0x0,0xd6,0x2,0x2c,0xe4,0x5f,0xd0,0xe2,0x79,0x44,0xc,0x28,0x87,0xc0,0xaa,0x73,0x75,0x14,0x87,0xc4,0x35,0xaa,0xa8,0xaf,0x1d,0xe3,0xd9,0xfc,0xa2,0x8f,0xb5,0x4d,0x41,0x71,0x38,0xdf,0x83,0x95,0x60,0x64,0x68,0x74,0x26,0x9d,0x4e,0xbf,0x3d,0x9f,0xb9,0x40,0x14,0x45,0x4,0x84,0xf1,0xf,0xde,0x2e,0x18,0x40,0xec,0xc8,0x50,0xfa,0xfa,0xfa,0xd8,0x29,0x15,0x88,0xa2,0xe8,0x5e,0x62,0xff,0xe0,0xcf,0xea,0xd9,0xee,0x9e,0x73,0xc9,0x64,0x72,0x3a,0xd5,0x93,0xa2,0x26,0x35,0x54,0x5,0x53,0xef,0x40,0x31,0xdf,0xd0,0x40,0x8,0x12,0x1,0xbd,0xa9,0x5e,0x2a,0x27,0x15,0xf6,0xf6,0x4a,0x6f,0xd6,0x37,0xd7,0x5e,0x37,0x76,0x21,0xff,0xbb,0xb0,0x9d,0xe8,0x4d,0xf5,0xe5,0x32,0x99,0xc,0x41,0x18,0xb6,0x36,0x8d,0x56,0xf9,0xa6,0xca,0x4e,0x71,0x87,0xa3,0x72,0xb4,0xc,0xe4,0xdb,0xef,0x9c,0x5e,0xe7,0x69,0x20,0x7b,0x6a,0x9d,0xb,0xc0,0xfb,0xd3,0xeb,0xfc,0xf,0xed,0x2d,0x85,0x24,0xfc,0x1,0xe2,0x46,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
+0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0x10,0x0,0x0,0x0,0x10,0x8,0x6,0x0,0x0,0x0,0x1f,0xf3,0xff,0x61,0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0x59,0x0,0x59,0x0,0x59,0xbd,0x9a,0xea,0xaa,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xde,0x9,0x11,0x13,0x19,0x31,0xd5,0xeb,0x31,0x7f,0x0,0x0,0x0,0x19,0x74,0x45,0x58,0x74,0x43,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x0,0x43,0x72,0x65,0x61,0x74,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x47,0x49,0x4d,0x50,0x57,0x81,0xe,0x17,0x0,0x0,0x0,0xbb,0x49,0x44,0x41,0x54,0x38,0x8d,0xad,0x93,0x3d,0xe,0x82,0x40,0x10,0x85,0x1f,0x64,0x8a,0x49,0x24,0x56,0x54,0x3b,0x57,0xd0,0x78,0xf,0x63,0x3c,0x8e,0xbf,0x7,0x50,0x44,0x8e,0x9,0x15,0x8d,0xd,0x4e,0x31,0x61,0xad,0xb0,0x30,0x82,0x2c,0xf1,0x25,0x9b,0x6c,0xf1,0xbe,0x97,0x37,0x99,0xdd,0x68,0xb9,0x58,0xb1,0x38,0x69,0x88,0x28,0x42,0x80,0xcc,0xcc,0x97,0x55,0x39,0x23,0x71,0xf2,0x54,0x55,0xa8,0x6a,0x8,0xf,0x66,0x8e,0xc4,0x49,0x13,0x13,0x51,0x30,0xc,0x0,0xaa,0xa,0x22,0x42,0x1c,0x4c,0x7e,0xa8,0x37,0x20,0x2f,0x32,0xe4,0x45,0x36,0x3d,0x0,0x0,0xbc,0xf7,0xb8,0xdd,0xaf,0xd3,0x2,0xda,0xb6,0x7d,0xdf,0x87,0x42,0x7e,0x36,0xe8,0x4e,0x96,0x5f,0xbe,0x7a,0x68,0x8,0x1e,0xa3,0xd1,0x5b,0x38,0xec,0x4e,0xd3,0x1b,0x1c,0xf7,0xe7,0xf0,0x6,0xdd,0xec,0x43,0x30,0x0,0x44,0x9b,0xf5,0xd6,0xd7,0x75,0x3d,0x68,0xea,0x53,0x9a,0xa6,0x7f,0x78,0x89,0x66,0x6,0x66,0xe,0x6,0x99,0x19,0x66,0x6,0x2a,0xab,0x72,0x2e,0x4e,0x1e,0x49,0x92,0x4c,0xf9,0xce,0xf2,0x2,0x3d,0xd2,0x54,0x2c,0x85,0x2c,0xaa,0x56,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
};
static const unsigned char scroll_button_right_hl_png[]={
-0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0x10,0x0,0x0,0x0,0x10,0x8,0x6,0x0,0x0,0x0,0x1f,0xf3,0xff,0x61,0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0x30,0x0,0x2d,0x0,0x31,0x39,0x29,0xd6,0x70,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xdd,0x9,0x17,0xe,0x17,0x3,0x34,0xbe,0x50,0x20,0x0,0x0,0x0,0x19,0x74,0x45,0x58,0x74,0x43,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x0,0x43,0x72,0x65,0x61,0x74,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x47,0x49,0x4d,0x50,0x57,0x81,0xe,0x17,0x0,0x0,0x2,0x58,0x49,0x44,0x41,0x54,0x38,0xcb,0x5d,0x93,0x5d,0x4b,0x54,0x51,0x14,0x86,0x9f,0x73,0xc6,0x1c,0x1d,0xd2,0xd1,0xc,0xad,0x2c,0x31,0x88,0x2c,0x51,0xfc,0x2,0xa3,0x8f,0x8b,0xa0,0x9b,0x7e,0x42,0x78,0x5d,0xd1,0x20,0x46,0x49,0x4,0x81,0x57,0x91,0x7d,0x49,0x5d,0x5,0xfe,0x82,0xfe,0x43,0x7f,0x20,0xa2,0x40,0x21,0x14,0x51,0x88,0xf0,0xa3,0xa1,0xd1,0xa1,0xc6,0xf1,0xa8,0xcd,0xcc,0xd9,0x6b,0xad,0x2e,0xce,0xcc,0x38,0xba,0x6f,0x36,0xac,0xbd,0xde,0xf7,0x5d,0x6b,0xed,0xf5,0x7a,0xd4,0x9c,0xde,0x9e,0xbe,0xdb,0x40,0xa,0x18,0x1,0x3a,0x39,0x7c,0xd2,0xc0,0x1c,0x30,0xbb,0xb4,0xb2,0xf8,0xa9,0x12,0xf4,0xca,0xc0,0x24,0xf0,0xea,0x5c,0x57,0x77,0x6a,0x78,0x60,0x98,0xd6,0x64,0x2b,0xf5,0xf1,0x38,0xaa,0x6,0x80,0xef,0x7b,0x94,0x8a,0x45,0x72,0xf9,0x1c,0xf3,0xdf,0xe7,0xd9,0x58,0x5f,0x9d,0x5,0x9e,0x2d,0xad,0x2c,0xe6,0xeb,0xca,0x44,0x2f,0xae,0x5e,0xb9,0x9e,0xba,0x70,0xfe,0x12,0x9b,0x9b,0x59,0xfe,0x6e,0xad,0x51,0x28,0x84,0x87,0xe4,0x1b,0x1a,0x8e,0xd1,0x98,0x48,0x70,0xf3,0xda,0x2d,0x7e,0x9c,0x5e,0x4e,0x7d,0xf9,0xfa,0x59,0x80,0x89,0x58,0x6f,0x4f,0xdf,0x58,0x57,0x57,0xf7,0x9b,0xcb,0x17,0xfb,0x58,0xfb,0xb9,0xc1,0xde,0xee,0x1e,0xa1,0xb,0x31,0x14,0x33,0xc3,0xcc,0x0,0xc3,0x85,0x8e,0xfd,0x7f,0xfb,0xe4,0x73,0x3b,0x74,0x9e,0xed,0x24,0xd8,0xdd,0x19,0x8d,0xd7,0xc7,0x97,0x7d,0x20,0x35,0xd8,0x3f,0x44,0x26,0x9d,0xa5,0x50,0x2c,0x20,0x26,0xa8,0x2a,0xe3,0x8f,0xef,0x31,0x3e,0x79,0x17,0x35,0x41,0x54,0xa2,0xb8,0x28,0x85,0x62,0x81,0x4c,0x3a,0xcb,0xd0,0xc0,0x8,0x40,0xca,0x7,0xfa,0x45,0x84,0x20,0x8,0x50,0x15,0x54,0x4,0x75,0x2,0x66,0x60,0xc6,0xc4,0xe4,0x7d,0x54,0x4,0x27,0x52,0x7e,0x57,0x82,0x60,0x7,0x11,0x1,0x18,0xf4,0x81,0x64,0x28,0xe,0x31,0x17,0x29,0x89,0x20,0xe6,0x30,0xab,0xb4,0xa0,0x3c,0x7c,0xf2,0x0,0x53,0x87,0x68,0x25,0xcf,0x11,0x8a,0x3,0x48,0xfa,0x0,0x12,0x96,0x10,0x8d,0x94,0x45,0xa2,0x16,0xa2,0xce,0xad,0x3a,0x87,0x47,0x4f,0xc7,0x51,0x55,0x54,0x5,0x31,0x45,0xc2,0x12,0x0,0x75,0x0,0x25,0xe7,0x10,0x11,0x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0x78,0x8a,0x5f,0xe7,0x67,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
+0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0x10,0x0,0x0,0x0,0x10,0x8,0x6,0x0,0x0,0x0,0x1f,0xf3,0xff,0x61,0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0x59,0x0,0x59,0x0,0x59,0xbd,0x9a,0xea,0xaa,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xde,0x9,0x11,0x13,0x19,0x2c,0xb6,0xed,0x5d,0xa6,0x0,0x0,0x0,0x19,0x74,0x45,0x58,0x74,0x43,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x0,0x43,0x72,0x65,0x61,0x74,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x47,0x49,0x4d,0x50,0x57,0x81,0xe,0x17,0x0,0x0,0x0,0xba,0x49,0x44,0x41,0x54,0x38,0x8d,0xa5,0x93,0x4d,0xa,0xc2,0x30,0x10,0x85,0x5f,0xa5,0x83,0x90,0x82,0xbd,0x81,0x8b,0xe4,0x18,0x22,0x5e,0x4b,0xad,0xad,0xdd,0x68,0xfd,0xbb,0x62,0x7a,0x9,0x69,0x14,0x6,0x32,0xae,0x4,0x91,0xb6,0x92,0xf8,0x56,0xb3,0x98,0xef,0xe3,0x2d,0x66,0x92,0xe5,0x62,0x35,0x35,0xda,0x3c,0x88,0x28,0x41,0x40,0x98,0x59,0x6c,0x6b,0x67,0xa9,0xd1,0xe6,0xe9,0x9c,0x43,0xe7,0x5c,0x8,0x8f,0x4c,0xa9,0xc4,0x68,0x73,0x9f,0x10,0x51,0x30,0xc,0x0,0x9d,0x73,0x20,0x22,0x4c,0x82,0xc9,0xaf,0xc,0xa,0xaa,0xba,0x40,0x55,0x17,0xf1,0x2,0x11,0x81,0x88,0xa0,0xdc,0x6f,0xe3,0x4,0xde,0x7b,0x88,0x8,0xbc,0xf7,0xd8,0x55,0x9b,0x70,0xc1,0x67,0xb,0x11,0x41,0x51,0xae,0x7b,0x77,0xd2,0x31,0xb8,0x6f,0x8e,0x12,0x0,0x40,0x73,0xb8,0xc4,0xb,0x4e,0xc7,0x6b,0x7c,0x83,0x73,0x73,0x1b,0x84,0x47,0x5,0xbf,0xc0,0x77,0xfe,0xbf,0x44,0x66,0x46,0xa6,0x54,0x30,0x98,0x29,0x5,0x66,0x46,0x6a,0x5b,0xab,0x8c,0x36,0x5d,0x9e,0xe7,0x31,0xef,0x3c,0x7f,0x1,0x85,0xa9,0x5c,0xe7,0x16,0x3f,0x9a,0xd3,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
};
static const unsigned char scroll_button_up_png[]={
-0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0x10,0x0,0x0,0x0,0x10,0x8,0x6,0x0,0x0,0x0,0x1f,0xf3,0xff,0x61,0x0,0x0,0x0,0x1,0x73,0x52,0x47,0x42,0x0,0xae,0xce,0x1c,0xe9,0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0xff,0x0,0xff,0x0,0xff,0xa0,0xbd,0xa7,0x93,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xdb,0xb,0x4,0x11,0x1f,0x28,0xa9,0x94,0x8f,0x29,0x0,0x0,0x0,0x19,0x74,0x45,0x58,0x74,0x43,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x0,0x43,0x72,0x65,0x61,0x74,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x47,0x49,0x4d,0x50,0x57,0x81,0xe,0x17,0x0,0x0,0x1,0x86,0x49,0x44,0x41,0x54,0x38,0xcb,0x9d,0x93,0x4d,0x4a,0x9c,0x41,0x10,0x86,0x9f,0xfe,0x66,0x14,0x25,0x28,0x38,0x9b,0x19,0x98,0x95,0xe4,0xe,0x9,0x28,0x62,0xc8,0x15,0xb2,0x71,0x21,0xc,0x82,0xb,0x17,0x5e,0x41,0xb2,0xcd,0x35,0x2,0x6e,0x73,0x85,0x10,0x97,0x1e,0x42,0x5c,0x9,0x8a,0x38,0x9,0x51,0xfb,0xaf,0xba,0xba,0x5d,0x38,0x33,0xfd,0xe9,0x28,0x82,0xb5,0xe9,0xa6,0xba,0xde,0xa7,0xba,0xab,0xaa,0xcd,0xb0,0x3f,0xf8,0x4,0x9c,0xf2,0x3e,0xfb,0x6c,0x86,0xfd,0x41,0xf9,0xb8,0xbe,0xce,0xd7,0xed,0x2f,0xac,0xae,0xac,0x0,0x6,0x4a,0x1,0xf3,0x2c,0xb4,0x0,0xc6,0x0,0x85,0xff,0xb7,0xb7,0xfc,0x3e,0xf9,0xc3,0xd9,0xf9,0x39,0x5d,0x80,0xad,0x8d,0x4d,0x0,0x6e,0xae,0x6f,0xa6,0x91,0xad,0x95,0x39,0xdf,0xc2,0xd2,0x22,0x5b,0x1b,0x9b,0x15,0xd0,0x5b,0x5b,0xe3,0xef,0x78,0x4c,0x8c,0xa1,0x66,0x2f,0x4f,0xe5,0x55,0x6f,0x30,0xd,0xf4,0x7a,0x3d,0x80,0x47,0x80,0x6a,0x26,0x6b,0x26,0xe7,0xdc,0x52,0xbc,0xf0,0x4,0x80,0x52,0xc8,0x9a,0x51,0xcd,0x15,0x90,0x92,0x90,0x54,0xc9,0xaa,0x4f,0xb4,0xdf,0x46,0xbb,0x0,0xfc,0xfa,0x79,0x3c,0xf3,0x19,0x20,0xa9,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0x6,0x0,0x0,0x0,0x1f,0xf3,0xff,0x61,0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0x59,0x0,0x59,0x0,0x59,0xbd,0x9a,0xea,0xaa,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xde,0x9,0x11,0x13,0x19,0x26,0x56,0x38,0xb4,0xb8,0x0,0x0,0x0,0x19,0x74,0x45,0x58,0x74,0x43,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x0,0x43,0x72,0x65,0x61,0x74,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x47,0x49,0x4d,0x50,0x57,0x81,0xe,0x17,0x0,0x0,0x0,0x9a,0x49,0x44,0x41,0x54,0x38,0x8d,0xcd,0x93,0x31,0xa,0xc3,0x30,0xc,0x45,0xbf,0x83,0x6,0x41,0x4d,0x27,0x4f,0xd6,0x15,0x5a,0x7a,0x8f,0x52,0x7a,0xaf,0x10,0x72,0x4c,0x67,0xf2,0xd2,0x25,0xd5,0x20,0x48,0xd7,0x92,0xba,0xa1,0x76,0x29,0xf4,0xaf,0xe2,0x3d,0x81,0xd0,0x77,0xc7,0xc3,0x89,0x25,0xca,0x4c,0x44,0xe,0x15,0x31,0xb3,0x25,0x4d,0x69,0x47,0x12,0xe5,0xae,0xaa,0x50,0xd5,0x1a,0x1e,0xcc,0xec,0x24,0xca,0xdc,0x11,0x51,0x35,0xc,0x0,0xaa,0xa,0x22,0x42,0x57,0x4d,0xae,0xf2,0x5b,0xc1,0x30,0xf6,0x18,0xc6,0xbe,0x4d,0xf0,0xc,0x6e,0x49,0x8a,0x82,0x12,0xf0,0x4e,0xf2,0x22,0xd8,0xda,0x56,0x9a,0x7d,0x7d,0x44,0x77,0x39,0x5f,0x97,0x9c,0x73,0x13,0x1c,0x42,0xf8,0xf7,0x3f,0xf8,0x48,0x60,0x66,0x60,0xe6,0x6a,0x90,0x99,0x61,0x66,0xa0,0x34,0xa5,0xbd,0x44,0xb9,0x79,0xef,0x5b,0xea,0x2c,0xf,0x4,0x76,0x39,0xf7,0xc5,0x49,0xf5,0x9f,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
};
static const unsigned char scroll_button_up_hl_png[]={
-0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0x10,0x0,0x0,0x0,0x10,0x8,0x6,0x0,0x0,0x0,0x1f,0xf3,0xff,0x61,0x0,0x0,0x0,0x1,0x73,0x52,0x47,0x42,0x0,0xae,0xce,0x1c,0xe9,0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0xff,0x0,0xff,0x0,0xff,0xa0,0xbd,0xa7,0x93,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xdb,0xb,0x4,0x11,0x20,0x2,0x2a,0xf1,0x6c,0xc3,0x0,0x0,0x0,0x19,0x74,0x45,0x58,0x74,0x43,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x0,0x43,0x72,0x65,0x61,0x74,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x47,0x49,0x4d,0x50,0x57,0x81,0xe,0x17,0x0,0x0,0x1,0x86,0x49,0x44,0x41,0x54,0x38,0xcb,0x9d,0x93,0xbf,0x4e,0x1b,0x41,0x10,0x87,0xbf,0xbd,0x9c,0x51,0x64,0xc9,0x91,0x70,0x6b,0x17,0xee,0x20,0x2f,0x40,0x5a,0xb,0x9,0xa5,0x4b,0x43,0x81,0x64,0x51,0x50,0x50,0xf0,0x14,0x88,0x3a,0xf,0x82,0x94,0x36,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6f,0x6d,0x6d,0x65,0x6e,0x74,0x0,0x43,0x72,0x65,0x61,0x74,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x47,0x49,0x4d,0x50,0x57,0x81,0xe,0x17,0x0,0x0,0x0,0x9a,0x49,0x44,0x41,0x54,0x38,0x8d,0xcd,0x93,0x51,0xa,0xc2,0x30,0xc,0x86,0xff,0x8d,0x6,0x21,0x5,0x7b,0x3,0x1f,0x9a,0x63,0x88,0x78,0x30,0x11,0x6,0x63,0xc7,0xec,0x2e,0x21,0x8d,0x42,0x1e,0xf4,0x75,0xcc,0x6e,0xd8,0x89,0xe0,0xff,0x98,0xf2,0x7d,0x29,0x21,0x69,0x4e,0xc7,0xf3,0x4e,0xa2,0xdc,0x89,0xa8,0x41,0x45,0xcc,0xec,0x99,0xc6,0xb4,0x77,0x12,0xe5,0xa1,0xaa,0xc8,0xaa,0x35,0x3c,0x3c,0x73,0x23,0x51,0x6e,0x2d,0x11,0x55,0xc3,0x0,0x90,0x55,0x41,0x44,0x68,0xab,0xc9,0x59,0x7e,0x2b,0xe8,0x87,0xe,0xfd,0xd0,0x6d,0x13,0x4c,0xc1,0x35,0x49,0x51,0x50,0x2,0x96,0x24,0x6f,0x82,0xb5,0x6e,0xa5,0xb7,0xaf,0x87,0xe8,0xe6,0x85,0xeb,0x65,0xf9,0x7,0xa5,0xfc,0xf9,0x1e,0x7c,0x24,0x30,0x33,0x78,0xe6,0x6a,0xd0,0x33,0xc3,0xcc,0xe0,0xd2,0x98,0x58,0xa2,0xe4,0x10,0xc2,0x96,0x73,0x3e,0xbc,0x0,0x5f,0x36,0x36,0x12,0x78,0xeb,0xb3,0xc5,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
+};
+
+
+static const unsigned char scroll_grabber_png[]={
+0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0x8,0x0,0x0,0x0,0x8,0x8,0x6,0x0,0x0,0x0,0xc4,0xf,0xbe,0x8b,0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0x26,0x0,0x26,0x0,0x26,0x59,0xf,0xde,0x74,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xde,0x9,0x14,0x17,0x25,0x29,0x85,0xa3,0x88,0x38,0x0,0x0,0x0,0x19,0x74,0x45,0x58,0x74,0x43,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x0,0x43,0x72,0x65,0x61,0x74,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x47,0x49,0x4d,0x50,0x57,0x81,0xe,0x17,0x0,0x0,0x0,0x72,0x49,0x44,0x41,0x54,0x18,0x95,0x7d,0xcd,0xb1,0x9,0xc3,0x30,0x0,0x44,0xd1,0x17,0x21,0x91,0x42,0x10,0xdc,0x4,0x34,0x80,0x77,0xc8,0x4,0x6e,0x32,0xb0,0x1b,0xf,0xe2,0x26,0x4d,0x6a,0x37,0xc2,0x5d,0x40,0x45,0x1a,0x1b,0x4c,0x20,0xfe,0xe5,0xbf,0x3b,0xee,0x52,0x4a,0x71,0x46,0x8c,0x31,0x1a,0x86,0x67,0x87,0x19,0x7b,0x7b,0x41,0x3f,0x4d,0xe3,0x1a,0x36,0x31,0xa3,0x3b,0xc,0x6f,0x78,0x41,0x6c,0xad,0x39,0x2c,0x77,0xae,0xb8,0xb7,0xd6,0x84,0x94,0xd2,0xdf,0xff,0x94,0x92,0x90,0x73,0x86,0xf7,0x4f,0xf6,0xc1,0x92,0x73,0x16,0x6a,0xad,0xf0,0xd8,0xe4,0xce,0x8a,0x7e,0xcb,0xce,0xf9,0x2,0x99,0xd9,0x19,0x5e,0xac,0x65,0x2e,0x22,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
+};
+
+
+static const unsigned char scroll_grabber_hl_png[]={
+0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0x8,0x0,0x0,0x0,0x8,0x8,0x6,0x0,0x0,0x0,0xc4,0xf,0xbe,0x8b,0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0x26,0x0,0x26,0x0,0x26,0x59,0xf,0xde,0x74,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xde,0x9,0x14,0x17,0x25,0x15,0xaa,0xcc,0xf4,0xbf,0x0,0x0,0x0,0x19,0x74,0x45,0x58,0x74,0x43,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x0,0x43,0x72,0x65,0x61,0x74,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x47,0x49,0x4d,0x50,0x57,0x81,0xe,0x17,0x0,0x0,0x0,0x86,0x49,0x44,0x41,0x54,0x18,0x95,0x7d,0x8e,0xb1,0xa,0x83,0x30,0x18,0x84,0xbf,0x36,0x81,0x6e,0xe5,0xf,0xad,0x6e,0xe,0x11,0x97,0x2e,0xfa,0xae,0x6e,0x7d,0x29,0xa1,0xce,0xa5,0xae,0x5,0x7,0x83,0x53,0xb,0xf9,0xa1,0x4b,0x94,0xe,0xe2,0x8d,0x77,0xdf,0x71,0x77,0x68,0xdb,0x3b,0x7b,0xb2,0x0,0xc3,0xf0,0xba,0x86,0x30,0x75,0x40,0x91,0xfc,0x51,0xc4,0x55,0xde,0x97,0xb3,0x5,0x8,0x61,0xea,0xea,0xba,0xb9,0x18,0x63,0x1,0x50,0x8d,0xe7,0xbe,0x7f,0x3c,0x81,0xdc,0xa6,0x46,0xb1,0x84,0x0,0xc6,0xd8,0x13,0x90,0x1,0x1c,0x77,0xf,0xfc,0x1,0xa3,0x6a,0xfc,0x2e,0xa6,0x6a,0xfc,0x0,0xef,0xf5,0xa4,0x88,0xab,0xd2,0x66,0x96,0x98,0x20,0xe2,0x6e,0x2b,0xe0,0x7d,0x39,0x3,0xf9,0xd6,0xc4,0xf,0x70,0x6e,0x25,0xf5,0x5c,0xbc,0xd7,0xd3,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
};
static const unsigned char selection_png[]={
-0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0x10,0x0,0x0,0x0,0x10,0x8,0x6,0x0,0x0,0x0,0x1f,0xf3,0xff,0x61,0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0x4e,0x0,0x41,0x0,0x56,0xed,0xd0,0x4e,0x61,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xdd,0x9,0x1b,0x13,0x25,0x36,0xd1,0x55,0x4f,0xe9,0x0,0x0,0x0,0x19,0x74,0x45,0x58,0x74,0x43,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x0,0x43,0x72,0x65,0x61,0x74,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x47,0x49,0x4d,0x50,0x57,0x81,0xe,0x17,0x0,0x0,0x1,0x76,0x49,0x44,0x41,0x54,0x38,0xcb,0x95,0x92,0xb1,0x6e,0x13,0x41,0x10,0x86,0xbf,0x59,0xd9,0xb2,0x4c,0x68,0x63,0xc2,0x21,0x39,0xb2,0x29,0xa9,0x52,0xb8,0x4b,0x93,0x2,0xa5,0xe,0xd,0x3d,0x1d,0xf,0x0,0x2d,0xa2,0xe5,0x5,0xdc,0x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x64,0x20,0x77,0x69,0x74,0x68,0x20,0x47,0x49,0x4d,0x50,0x57,0x81,0xe,0x17,0x0,0x0,0x0,0xba,0x49,0x44,0x41,0x54,0x38,0x8d,0xed,0x93,0x31,0xa,0xc2,0x50,0x10,0x44,0xdf,0x97,0xbf,0x8a,0x3f,0x45,0xd0,0x52,0xbb,0xfc,0x63,0x88,0x88,0xa7,0xd0,0x23,0x9a,0x63,0x84,0x90,0x63,0x24,0x9d,0x9d,0x60,0x95,0x2f,0xb2,0x21,0x5a,0x18,0xb4,0x52,0x3,0x69,0x2c,0x9c,0x6e,0x8b,0x99,0xd9,0x59,0x76,0xc,0x30,0x6,0xa6,0xc0,0x4,0x18,0xd1,0xf,0x2d,0x70,0x5,0x2e,0xb6,0x23,0x2f,0x81,0x19,0x20,0x3d,0x5,0x14,0x38,0x3,0x47,0xdb,0x39,0xcf,0xd7,0xab,0xcd,0xc2,0x27,0xfe,0x20,0x22,0xe6,0x23,0x53,0xf5,0x56,0x56,0xe5,0x3e,0x2f,0x32,0x3,0x9c,0x6c,0xb7,0xb6,0xf5,0x89,0x4f,0x43,0x8,0xd4,0x21,0x7c,0xb4,0x8e,0x9c,0x33,0x3e,0xf1,0x69,0x5e,0x64,0x5b,0x60,0xf4,0xcc,0x2c,0x22,0x5f,0xc9,0x0,0x75,0x8,0x88,0xbc,0x92,0xf6,0x3d,0xda,0x5b,0xfc,0x5,0x7e,0x4a,0x40,0x55,0x89,0x9c,0xfb,0x4a,0x88,0x9c,0x43,0x55,0x9f,0xb3,0xe5,0x51,0x8c,0xa6,0xac,0xca,0x9d,0x4f,0xfc,0x21,0x8e,0xe3,0x5e,0xaf,0xc,0x34,0x40,0x6b,0x80,0x98,0x1,0x65,0x32,0xc,0xac,0xf3,0x1d,0x55,0xc6,0x3e,0x2,0xe2,0x2e,0xc9,0xc8,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
};
static const unsigned char selection_oof_png[]={
-0x89,0x50,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0x69,0xed,0xf0,0xe3,0xb3,0xb1,0xeb,0x78,0x4e,0x25,0xc9,0x33,0xce,0x58,0x99,0xda,0x54,0x2e,0x7f,0x96,0xcf,0x15,0x8f,0x7e,0x1,0x52,0xd8,0xb3,0xdb,0x19,0xc1,0x3b,0xf1,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
+0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0x10,0x0,0x0,0x0,0x10,0x8,0x6,0x0,0x0,0x0,0x1f,0xf3,0xff,0x61,0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0x4c,0x0,0x4a,0x0,0x4e,0x88,0x29,0x6a,0xb6,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xde,0x9,0x10,0x15,0x32,0x22,0x9b,0x14,0x96,0x1f,0x0,0x0,0x0,0x19,0x74,0x45,0x58,0x74,0x43,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x0,0x43,0x72,0x65,0x61,0x74,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x47,0x49,0x4d,0x50,0x57,0x81,0xe,0x17,0x0,0x0,0x0,0xba,0x49,0x44,0x41,0x54,0x38,0x8d,0xed,0xd3,0xb1,0x4e,0xc3,0x40,0x10,0x84,0xe1,0xef,0xc2,0x4a,0x9c,0x90,0xb,0x6a,0x9f,0xe0,0x9,0x2,0xbc,0x58,0xc2,0xcb,0xc0,0x8b,0x85,0xa4,0xa6,0x41,0x4e,0x4d,0x41,0x71,0x91,0xe,0x99,0x2,0xd7,0x76,0xa4,0x34,0x14,0x6c,0xb9,0xda,0xf9,0x47,0x2b,0xcd,0x24,0xdc,0xe0,0x16,0x1d,0xae,0x90,0xcc,0xcf,0x88,0x6f,0x7c,0xe1,0x33,0x26,0xf1,0x23,0xee,0x90,0xcf,0x4,0x54,0x7c,0xe0,0x2d,0x26,0xe7,0xfb,0x87,0xf5,0xd3,0xba,0xf4,0x65,0x13,0x11,0xb3,0x80,0xd6,0xda,0x38,0x1c,0x87,0xd7,0xfd,0x61,0x97,0xf0,0x1e,0x8,0x5c,0x97,0xbe,0x6c,0x6b,0xad,0x6a,0xad,0xb3,0xf6,0x39,0xe7,0x54,0xfa,0xb2,0xdd,0x1f,0x76,0xcf,0x88,0xd5,0xb4,0x4f,0x11,0xb1,0x28,0x86,0x5a,0xab,0x88,0x60,0x7a,0x75,0x35,0x7f,0xbe,0x3c,0xff,0x80,0xbf,0x4,0x18,0x5b,0x6b,0x72,0xce,0x8b,0x82,0x9c,0xb3,0xd6,0x1a,0xbf,0x91,0x16,0x68,0x38,0xd,0xc7,0xe1,0xa5,0xf4,0x65,0xd3,0x75,0xdd,0x59,0x51,0xc6,0x9,0x2d,0xa1,0x77,0x41,0x99,0x92,0xb,0xeb,0xfc,0x3,0xd0,0xc5,0x44,0x36,0x1d,0x79,0x84,0xde,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
};
@@ -345,7 +340,7 @@ static const unsigned char spinbox_updown_png[]={
static const unsigned char submenu_png[]={
-0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0x8,0x0,0x0,0x0,0x8,0x8,0x6,0x0,0x0,0x0,0xc4,0xf,0xbe,0x8b,0x0,0x0,0x0,0x1,0x73,0x52,0x47,0x42,0x0,0xae,0xce,0x1c,0xe9,0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0xff,0x0,0xff,0x0,0xff,0xa0,0xbd,0xa7,0x93,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xdb,0x4,0x1b,0x16,0x1b,0x32,0xbf,0xff,0x75,0xca,0x0,0x0,0x0,0x3a,0x49,0x44,0x41,0x54,0x18,0xd3,0x63,0x60,0x80,0x82,0x73,0x2f,0x5e,0xdd,0x3b,0xf7,0xe2,0xd5,0x3d,0x6,0x34,0xc0,0x84,0x2e,0x80,0xae,0x8,0x43,0x1,0xba,0x22,0xac,0xa,0x90,0x15,0xe1,0x54,0x40,0xd0,0x4,0x23,0x9,0x31,0x25,0x9c,0xa,0x60,0x92,0x58,0x15,0x20,0x4b,0x32,0x30,0x30,0x30,0x0,0x0,0x56,0x5a,0x13,0xb,0xf,0x58,0x99,0x10,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
+0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0x8,0x0,0x0,0x0,0x8,0x8,0x6,0x0,0x0,0x0,0xc4,0xf,0xbe,0x8b,0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0xdd,0x0,0xdd,0x0,0xdd,0xf5,0x15,0x8,0x9d,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xde,0x9,0x14,0x12,0x38,0x2b,0x92,0xa,0x47,0xe3,0x0,0x0,0x0,0x3a,0x49,0x44,0x41,0x54,0x18,0x95,0x63,0x60,0x80,0x82,0x3b,0x77,0xee,0xdc,0xbb,0x73,0xe7,0xce,0x3d,0x6,0x34,0xc0,0x84,0x2e,0x80,0xae,0x8,0x43,0x1,0xba,0x22,0xac,0xa,0x90,0x15,0xe1,0x54,0x40,0xd0,0x4,0x15,0x15,0x15,0x25,0x9c,0xa,0x60,0x92,0x58,0x15,0x20,0x4b,0x32,0x30,0x30,0x30,0x0,0x0,0x2c,0x62,0x12,0xf3,0xa8,0xc4,0xd,0xa6,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
};
@@ -355,27 +350,27 @@ static const unsigned char tab_png[]={
static const unsigned char tab_behind_png[]={
-0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0x10,0x0,0x0,0x0,0x10,0x8,0x6,0x0,0x0,0x0,0x1f,0xf3,0xff,0x61,0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0x4f,0x0,0x42,0x0,0x57,0xa5,0xf1,0xe9,0x1e,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xdd,0x9,0x1b,0x10,0x25,0x6,0xf5,0xca,0xc1,0x1c,0x0,0x0,0x0,0x19,0x74,0x45,0x58,0x74,0x43,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x0,0x43,0x72,0x65,0x61,0x74,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x47,0x49,0x4d,0x50,0x57,0x81,0xe,0x17,0x0,0x0,0x1,0x30,0x49,0x44,0x41,0x54,0x38,0xcb,0xa5,0x90,0x31,0x4e,0xc3,0x40,0x14,0x44,0xdf,0x97,0x82,0x2,0x45,0x64,0xc7,0xc8,0x29,0x28,0x90,0x2c,0x51,0xd0,0xd1,0xd3,0x50,0x71,0x0,0x8e,0xc1,0x1,0xe0,0x10,0x5c,0x80,0x63,0x70,0x0,0x2a,0x1a,0x7a,0x3a,0xa,0x4,0x12,0x5,0x45,0x24,0x14,0x4b,0xa0,0x4,0xb,0xb1,0x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,0xcb,0xd1,0x99,0xd4,0xb1,0xd0,0xc9,0x43,0xe9,0xa1,0x15,0x59,0x29,0xfe,0x51,0xbf,0xb4,0x87,0x9c,0x22,0x50,0x2e,0x97,0xaa,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
+0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0x10,0x0,0x0,0x0,0x10,0x8,0x6,0x0,0x0,0x0,0x1f,0xf3,0xff,0x61,0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0x4c,0x0,0x4a,0x0,0x4e,0x88,0x29,0x6a,0xb6,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xde,0x9,0x10,0x13,0x3a,0x0,0x82,0x20,0x21,0x41,0x0,0x0,0x0,0x19,0x74,0x45,0x58,0x74,0x43,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x0,0x43,0x72,0x65,0x61,0x74,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x47,0x49,0x4d,0x50,0x57,0x81,0xe,0x17,0x0,0x0,0x0,0x92,0x49,0x44,0x41,0x54,0x38,0x8d,0xed,0x8f,0x3b,0xe,0xc2,0x30,0x10,0x5,0xc7,0x89,0xa5,0x80,0x45,0x81,0xb,0x6f,0x7,0x27,0xe0,0x73,0x36,0x4e,0xc2,0xd9,0xf8,0xd4,0x34,0x74,0xa1,0x30,0x5,0x12,0x34,0xab,0xa5,0x31,0xad,0x83,0x4,0x65,0xa6,0x7c,0xda,0x37,0x4f,0xb,0x3f,0xe2,0x80,0x0,0xcc,0x81,0x19,0xd0,0x96,0xac,0x86,0x1,0xa,0x3c,0x80,0xbb,0x2f,0xe5,0xd,0xb0,0x0,0x26,0x5f,0xa,0x5e,0xc0,0x15,0x38,0xfa,0xb2,0xbc,0x5c,0xaf,0xb6,0x7b,0x49,0x32,0x35,0xb5,0xaa,0xc0,0xb5,0xce,0xfa,0x5b,0xff,0x3c,0x9d,0xf,0x3b,0xe0,0xe2,0x1,0xf,0x74,0x92,0x24,0xa8,0x2a,0x39,0xe7,0xea,0x7c,0x8c,0xd1,0x49,0x92,0x0,0x74,0x80,0x6f,0x3e,0x62,0x53,0x1b,0x2c,0x3,0xe4,0x9c,0x31,0x35,0x28,0xaf,0x36,0xf5,0xf3,0x61,0x46,0xc1,0x28,0xf8,0x8b,0xe0,0xd,0xec,0x2e,0x27,0x7c,0x4,0xc2,0x7d,0x9a,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
};
static const unsigned char tab_container_bg_png[]={
-0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0x10,0x0,0x0,0x0,0x20,0x8,0x6,0x0,0x0,0x0,0x1b,0x89,0xf8,0xcc,0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0x4b,0x0,0x3f,0x0,0x52,0x7c,0x32,0x40,0x52,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xdd,0x9,0x1b,0x10,0x1b,0x28,0x68,0xd9,0xd7,0xae,0x0,0x0,0x0,0x19,0x74,0x45,0x58,0x74,0x43,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x0,0x43,0x72,0x65,0x61,0x74,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x47,0x49,0x4d,0x50,0x57,0x81,0xe,0x17,0x0,0x0,0x1,0xf3,0x49,0x44,0x41,0x54,0x48,0xc7,0xcd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4,0xe4,0x7c,0x7b,0x7f,0xf7,0xf8,0x5c,0x86,0xb2,0x89,0x88,0x59,0x40,0x6b,0xed,0x34,0x1e,0xc6,0xaf,0xdd,0x7e,0xfb,0x84,0xd7,0x40,0x60,0x5d,0x86,0xd2,0xd5,0x5a,0xd5,0x5a,0x67,0xed,0x73,0xce,0xa9,0xc,0xa5,0xdb,0xed,0xb7,0x6b,0xc4,0x6a,0xda,0xa7,0x88,0x58,0x14,0x43,0xad,0x55,0x44,0x30,0xbd,0xba,0x9a,0x3f,0x5f,0x9e,0x7f,0xc0,0x5f,0x2,0x9c,0x5a,0x6b,0x72,0xce,0x8b,0x82,0x9c,0xb3,0xd6,0x1a,0xbf,0x91,0x16,0x68,0x38,0x8e,0x87,0xf1,0xb3,0xc,0x65,0xd3,0xf7,0xfd,0x59,0x51,0xc6,0x11,0x2d,0x61,0x70,0x41,0x99,0x92,0xb,0xeb,0xfc,0x3,0x18,0xa7,0x44,0x3f,0xdc,0xad,0xd9,0x96,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
};
static const unsigned char tab_current_png[]={
-0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0x10,0x0,0x0,0x0,0x10,0x8,0x6,0x0,0x0,0x0,0x1f,0xf3,0xff,0x61,0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0x4f,0x0,0x42,0x0,0x57,0xa5,0xf1,0xe9,0x1e,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xdd,0x9,0x1b,0x10,0x28,0x1b,0x23,0x62,0xd3,0x88,0x0,0x0,0x0,0x19,0x74,0x45,0x58,0x74,0x43,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x0,0x43,0x72,0x65,0x61,0x74,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x47,0x49,0x4d,0x50,0x57,0x81,0xe,0x17,0x0,0x0,0x1,0x4a,0x49,0x44,0x41,0x54,0x38,0xcb,0xa5,0x92,0x31,0x4a,0x3,0x51,0x14,0x45,0xcf,0x1b,0x82,0x4,0x5b,0x65,0x24,0x24,0x44,0x52,0xd9,0x9,0xae,0xc0,0xca,0xca,0x2a,0xcb,0x70,0x1,0xba,0x8,0x37,0xe0,0x32,0x52,0x59,0x59,0xb9,0x2,0xc1,0xce,0x46,0x11,0x2,0x41,0x31,0x85,0xc5,0x24,0x41,0x98,0x77,0x2d,0xfe,0x9f,0x9f,0x2f,0x93,0x62,0xc0,0xc7,0x14,0x7f,0xe6,0xde,0x77,0xdf,0xbd,0x6f,0xbe,0x49,0x62,0x74,0x74,0x3c,0x5,0xae,0x80,0xb,0xba,0xd5,0x3,0x70,0x37,0xff,0x78,0x9f,0xd9,0xb0,0x1c,0x5f,0x97,0x7,0x83,0xdb,0xd3,0x93,0x33,0x6,0x87,0xa3,0x4e,0xdd,0x8b,0xaf,0x39,0xcf,0x2f,0x4f,0x7c,0x2e,0x17,0x37,0x36,0x2c,0xc7,0xaf,0x97,0xe7,0xd3,0xc9,0xe6,0x67,0xc3,0x6a,0xb3,0xea,0x24,0xb0,0xdf,0xdf,0xa7,0xbf,0xd7,0xe7,0xfe,0x71,0xf6,0xd6,0x3,0x26,0xcb,0xef,0xe5,0xe,0x9a,0x10,0x6,0x80,0x21,0x88,0x67,0x80,0x6a,0x5d,0x51,0xad,0x2b,0x80,0x49,0xf,0xc0,0x25,0x70,0x41,0x11,0xe8,0xe6,0x42,0x10,0xdf,0x41,0x2e,0xc,0xa1,0xc2,0x0,0x81,0x3,0x45,0x10,0xc,0x2,0x75,0x1d,0xf4,0xeb,0x30,0x48,0x8a,0xa3,0xea,0xdc,0xf,0xa1,0x31,0x62,0x8a,0x58,0xaf,0x81,0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x5b,0x0,0x0,0x0,0x19,0x74,0x45,0x58,0x74,0x43,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x0,0x43,0x72,0x65,0x61,0x74,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x47,0x49,0x4d,0x50,0x57,0x81,0xe,0x17,0x0,0x0,0x0,0x8e,0x49,0x44,0x41,0x54,0x38,0x8d,0xed,0x8f,0x3d,0xe,0xc2,0x30,0x18,0x43,0x5f,0x8a,0xa5,0x86,0x88,0x81,0xb9,0x11,0x9c,0x80,0x9f,0xb3,0x71,0x12,0xce,0x56,0xda,0x99,0x5,0x95,0x99,0x1,0xa9,0xdf,0x10,0x54,0x96,0xcc,0x29,0x23,0x43,0x3d,0x5a,0xf6,0xb3,0xec,0x80,0x0,0x6c,0x81,0xd,0xb0,0x2,0x1c,0x65,0x4d,0xc0,0x7,0x78,0x3,0x2f,0xe5,0xf2,0x9,0xd8,0x1,0xfe,0x47,0x80,0x1,0xf,0xe0,0xa6,0xbc,0xbc,0x3f,0x1e,0xce,0xd7,0xd8,0xc4,0xb5,0xa4,0x22,0x20,0xa5,0x34,0xd,0xcf,0x61,0xec,0xfa,0xf6,0x2,0xdc,0x5,0x8,0xa8,0x63,0x13,0x83,0x99,0x61,0x66,0xc5,0x79,0xef,0xbd,0x8b,0x4d,0xc,0x5d,0xdf,0xd6,0x80,0xaa,0xec,0x3b,0x49,0xb3,0x65,0x0,0x33,0x43,0x12,0xe4,0xab,0x55,0x39,0x3e,0xaf,0x5,0xb0,0x0,0xfe,0x3,0xf0,0x5,0xd9,0x71,0x24,0x5d,0x58,0x1b,0x63,0x82,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
};
static const unsigned char toggle_off_png[]={
-0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0x40,0x0,0x0,0x0,0x20,0x8,0x6,0x0,0x0,0x0,0xa2,0x9d,0x7e,0x84,0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0x0,0x0,0x0,0x0,0x0,0xf9,0x43,0xbb,0x7f,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xdd,0x9,0x17,0x5,0xb,0x18,0x54,0xf9,0x2b,0x70,0x0,0x0,0x0,0x19,0x74,0x45,0x58,0x74,0x43,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x0,0x43,0x72,0x65,0x61,0x74,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x47,0x49,0x4d,0x50,0x57,0x81,0xe,0x17,0x0,0x0,0x6,0xd4,0x49,0x44,0x41,0x54,0x68,0xde,0xed,0x98,0x5d,0x8c,0x55,0x67,0x15,0x86,0x9f,0xf5,0xed,0xbd,0xcf,0xef,0x9c,0x33,0xce,0x3f,0xc3,0x88,0x14,0xa1,0x88,0x5a,0x63,0x8d,0xe5,0xce,0x26,0x6a,0x1a,0xef,0x1a,0xb5,0xa,0x5c,0x18,0xf4,0xc2,0x68,0x6c,0x2a,0xc4,0xc4,0x14,0xe4,0xaa,0x29,0x51,0xd3,0xb,0xb5,0x4d,0x40,0xaa,0x16,0x2f,0x8c,0x97,0xd4,0x68,0x62,0x62,0xac,0x26,0x46,0x6d,0xc7,0x26,0x25,0x1,0x2b,0x43,0xab,0x29,0xc8,0xcc,0x0,0x33,0x40,0x99,0x99,0xce,0xdf,0x39,0x67,0xe6,0xec,0x6f,0x2d,0x2f,0xf6,0x3e,0x87,0x19,0x60,0x60,0xfe,0xee,0x9c,0x95,0xec,0xe4,0x64,0xef,0x9c,0x6f,0x7f,0xfb,0x5d,0xef,0xfb,0xae,0xb5,0x3e,0xd8,0x88,0x8d,0xd8,0x88,0x8d,0xf8,0x3f,0xe,0x59,0xea,0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,0xd0,0xb0,0x91,0x28,0x8a,0x86,0x1e,0x78,0x60,0xeb,0x2f,0x3f,0xf3,0xd9,0x4f,0x1f,0x3f,0xfc,0xbd,0xc3,0x93,0x1b,0x47,0xc0,0x1b,0xb1,0x11,0x1b,0xb1,0x11,0x1b,0xb1,0x38,0xfe,0x7,0x2f,0xf4,0xda,0xd3,0xbb,0x47,0x75,0xc1,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
+0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0x40,0x0,0x0,0x0,0x20,0x8,0x6,0x0,0x0,0x0,0xa2,0x9d,0x7e,0x84,0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0x26,0x0,0x26,0x0,0x26,0x59,0xf,0xde,0x74,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xde,0x9,0x14,0x17,0x2,0x16,0xe9,0x0,0x17,0x60,0x0,0x0,0x0,0x19,0x74,0x45,0x58,0x74,0x43,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x0,0x43,0x72,0x65,0x61,0x74,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x47,0x49,0x4d,0x50,0x57,0x81,0xe,0x17,0x0,0x0,0x2,0x45,0x49,0x44,0x41,0x54,0x68,0x81,0xed,0x99,0x5f,0x4f,0xd3,0x50,0x18,0x87,0x9f,0xb3,0x96,0xb5,0xcc,0x3a,0xa6,0xac,0x6d,0xa,0x91,0x84,0x5b,0x8d,0x7e,0x21,0x60,0x2c,0x5c,0x1a,0x63,0xe2,0x27,0x31,0x31,0xc6,0x4b,0x32,0xa7,0x7e,0x20,0x84,0x6b,0x6f,0xc,0x90,0x6d,0x32,0xca,0x6c,0xb0,0x24,0x75,0xc7,0x8b,0xba,0xb9,0x35,0xdd,0x84,0xec,0xe0,0x26,0xed,0x73,0xd7,0xf7,0xed,0xce,0x7b,0x7e,0xbf,0xbe,0x67,0x7f,0xde,0x41,0x4e,0x4e,0xa6,0x11,0x89,0xeb,0x12,0x50,0x1,0x2c,0x40,0x4b,0xc9,0xff,0xaf,0x48,0xe0,0x27,0x10,0x0,0x3e,0x70,0x39,0x48,0xe8,0x89,0x1b,0x2b,0xc0,0x33,0xe0,0x11,0x60,0x72,0xb7,0xc,0x8,0x81,0xaf,0xc0,0x67,0xa6,0x18,0x60,0x1,0x1b,0x4f,0x1e,0x3f,0x7d,0x6d,0x57,0xed,0x65,0x40,0x48,0x64,0xfc,0x72,0x95,0x8,0x10,0x8,0x74,0x5d,0x67,0x69,0x49,0x47,0xd3,0x92,0xdb,0x50,0x4b,0x14,0x45,0xf2,0xf8,0xe4,0xf8,0xc7,0xe1,0xd1,0xc1,0x2b,0xe0,0xcb,0x68,0x2e,0x59,0x59,0x7,0xc,0xbb,0x6a,0x97,0xce,0xba,0x67,0x4,0x41,0x80,0xec,0xf7,0x91,0x8a,0x1d,0x10,0x8,0x44,0xa1,0x80,0x51,0x2c,0x52,0x2a,0xdd,0xa3,0x58,0x2c,0x2a,0x5d,0x3f,0x89,0x69,0x9a,0x62,0x7d,0x6d,0xbd,0x74,0x78,0x74,0x60,0x90,0xd0,0x9c,0x66,0xbd,0x0,0x8,0x82,0xef,0x54,0x2a,0xf,0x70,0x6c,0x7,0xa1,0xf8,0x24,0x48,0x24,0xed,0x4e,0x1b,0xdf,0x3f,0xc7,0x30,0x4c,0xa5,0x6b,0xa7,0x11,0x86,0x21,0x96,0x65,0x41,0xca,0x91,0x4e,0xed,0x3d,0x29,0x25,0xb2,0x2f,0x71,0x1d,0x97,0x30,0xc,0x39,0x6d,0x9d,0x2a,0xdd,0x90,0xe7,0x7a,0xb8,0x8e,0xcb,0x79,0xb7,0xab,0xbc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x9,0x69,0x6,0x48,0x0,0xcb,0xba,0x8f,0xef,0xfb,0xb7,0xf2,0x9b,0xfd,0xcf,0x44,0xc8,0x40,0xd3,0x34,0xa5,0x6b,0xa7,0x61,0x9a,0x26,0x51,0x14,0x41,0xca,0x70,0x2f,0x69,0x40,0x4,0x5c,0x75,0xbe,0x75,0x2e,0xed,0xaa,0xbd,0xbc,0xfa,0x70,0xf5,0x4e,0xcd,0x4,0x81,0x2b,0x62,0x8d,0xa3,0x5b,0x19,0x63,0x8d,0x6c,0x4c,0x85,0x4f,0x6,0x89,0xcc,0xff,0x2f,0x90,0x93,0x93,0x93,0x6d,0x7e,0x1,0x6b,0xe,0xc1,0xdb,0xd6,0xe0,0xc4,0xba,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
};
static const unsigned char toggle_on_png[]={
-0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0x40,0x0,0x0,0x0,0x20,0x8,0x6,0x0,0x0,0x0,0xa2,0x9d,0x7e,0x84,0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0x0,0x0,0x0,0x0,0x0,0xf9,0x43,0xbb,0x7f,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xdd,0x9,0x17,0x5,0xb,0x2,0xa9,0x9b,0xd2,0xa,0x0,0x0,0x0,0x19,0x74,0x45,0x58,0x74,0x43,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x0,0x43,0x72,0x65,0x61,0x74,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x47,0x49,0x4d,0x50,0x57,0x81,0xe,0x17,0x0,0x0,0x6,0xd6,0x49,0x44,0x41,0x54,0x68,0xde,0xed,0x98,0x5d,0x8c,0x5d,0x55,0x15,0xc7,0x7f,0x6b,0x9d,0x73,0x3f,0x66,0xe6,0xce,0x74,0x7a,0x67,0x86,0x34,0xb6,0xb5,0x2d,0x23,0x6d,0xd1,0xe8,0x60,0x6a,0xa9,0x50,0x3e,0xd4,0x18,0xe3,0xb,0x49,0x1f,0x68,0xc5,0x7,0xe3,0x77,0x20,0x1,0x63,0x1a,0x51,0xf1,0x85,0xc4,0x68,0x22,0x98,0x9a,0xbe,0x88,0xa,0x8d,0x40,0xf4,0xa1,0x32,0xb5,0x4a,0xa8,0x81,0x4,0xc4,0x92,0x34,0xb1,0x26,0x90,0x48,0xa1,0xcd,0x50,0x4b,0x9,0x76,0xda,0x32,0xd5,0x69,0x99,0x99,0x76,0xee,0xbd,0xe7,0x63,0xef,0xe5,0xc3,0x39,0x77,0xa6,0xa5,0x33,0x30,0x77,0x66,0xde,0x9c,0x95,0xec,0x87,0xc9,0xb9,0xe7,0xcc,0xde,0x6b,0xfd,0xff,0xff,0xf5,0x5f,0x1b,0x96,0x62,0x29,0x96,0x62,0x29,0xfe,0x8f,0x43,0x66,0x7b,0x70,0xed,0x9a,0xfe,0x32,0x22,0x5f,0x45,0xd8,0x9,0x7c,0x44,0x8c,0xc0,0x0,0x91,0xfc,0x15,0xb3,0x45,0xdd,0x81,0x77,0x1e,0xf5,0x55,0xba,0x8b,0xeb,0x50,0x3a,0x0,0xcb,0x1f,0xce,0xff,0xff,0x38,0x6a,0xee,0x52,0xed,0xc2,0x23,0x27,0x46,0x8e,0x3e,0x68,0x9c,0x1b,0x9f,0x73,0x2,0xd6,0x7d,0xb8,0xbf,0x4d,0x55,0x9e,0xd2,0x40,0xef,0x8,0x54,0x11,0x11,0x44,0x14,0x0,0x15,0x99,0xda,0xda,0x62,0x65,0xc0,0xb9,0x94,0x36,0xeb,0xe7,0x2b,0x5f,0x7a,0x80,0x9b,0x6f,0xda,0x4a,0x67,0xe7,0x82,0xce,0xd,0x92,0xd5,0x67,0x72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2,0x92,0xef,0x5d,0xe9,0x5e,0xd6,0x45,0xb9,0xdc,0x86,0x73,0x29,0xef,0x8e,0xbd,0x8b,0xf3,0x9e,0x72,0xb1,0x44,0xa9,0x54,0xe6,0xd2,0xc5,0x8b,0x78,0xef,0x59,0xbe,0x7c,0x39,0x8d,0x7a,0x9d,0x38,0x8d,0x91,0x8c,0x49,0xd3,0x8,0xf0,0x10,0xa8,0x91,0x9a,0x90,0x46,0xe0,0x12,0xc3,0x7,0x1e,0xb0,0x5,0x61,0xcb,0x2e,0x4f,0x40,0x6c,0xa4,0x11,0x98,0x89,0xcc,0x39,0x1,0x57,0xf0,0xdd,0x32,0x5,0x10,0x11,0x44,0x73,0x21,0x54,0x45,0x9,0x78,0xed,0xf5,0xa3,0x5c,0x18,0x1f,0x25,0x20,0x64,0x60,0x60,0x0,0x45,0x19,0x1d,0x3d,0xcf,0xf8,0xf8,0x18,0xab,0x57,0xad,0x21,0xc,0x4b,0x1c,0x3b,0x76,0x94,0xde,0xde,0x6b,0xe8,0x68,0xef,0x98,0xbd,0x9,0x18,0xb8,0x18,0x5c,0x6c,0xb8,0x20,0x43,0x90,0x79,0x9b,0x1f,0xc3,0x2c,0xef,0x54,0x59,0xcd,0xf0,0x89,0xc7,0x45,0xb3,0x77,0x2d,0x9d,0x5,0x3b,0x20,0x82,0xa0,0x48,0x4e,0x83,0xa6,0xe,0xa8,0x4,0x34,0xea,0x11,0xc5,0xb6,0x2,0x7f,0x3d,0xf8,0x3c,0x66,0x46,0x2d,0x9a,0xe4,0xba,0xf5,0xfd,0x24,0x49,0xc2,0xf6,0x1d,0xdb,0x39,0xf0,0xdc,0x1,0x96,0x75,0x77,0x31,0x31,0x3e,0xce,0xfe,0x3f,0xef,0xe7,0x96,0x5b,0xb6,0x92,0xa6,0x29,0x41,0x10,0x5c,0x45,0xa9,0x26,0x6d,0xe2,0x8,0x92,0xd8,0xe7,0xcb,0x8,0xca,0x9,0x41,0x21,0x21,0x28,0xb6,0xb8,0xca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0xc1,0xf4,0xdf,0x22,0x99,0x2a,0x9b,0x81,0xf7,0x1e,0x6f,0x9e,0x62,0xb1,0x84,0xf7,0x6e,0x8a,0xab,0xce,0xb9,0xcb,0xbe,0x61,0xc4,0x71,0xfc,0xbe,0x29,0x36,0x33,0xf0,0x99,0x8,0x92,0x1a,0x2a,0xd9,0xfb,0xce,0x26,0x17,0x60,0x81,0x9b,0x25,0xf3,0x58,0xea,0x71,0x8d,0xac,0xd5,0xce,0x3d,0x1,0x66,0x66,0x78,0x41,0x4,0x33,0x9d,0x72,0x65,0x5e,0xb3,0x4e,0x4b,0xd3,0xd7,0x1b,0x24,0xce,0xcd,0x7f,0x26,0xb2,0xbc,0x3,0x18,0x44,0x89,0xc7,0xc5,0x46,0x6c,0x96,0x2b,0xbf,0x2e,0x74,0x14,0x42,0xc8,0xac,0x70,0x23,0x6,0x6f,0x32,0xf7,0x59,0xc0,0x60,0xc4,0xbc,0xad,0x10,0x15,0xc,0x13,0xc3,0x63,0x28,0x6a,0x86,0x21,0x99,0xa0,0x88,0x65,0xad,0x6d,0xa6,0x3b,0x8b,0x19,0xcc,0xce,0x7b,0x9f,0x49,0x3e,0xb3,0x8b,0x1,0x41,0x4c,0x94,0x34,0xc0,0x84,0x24,0xb2,0xcb,0x66,0x86,0xf9,0xd,0x45,0x42,0x66,0x38,0x3c,0x1e,0xf3,0x42,0x9c,0x3a,0x6f,0x12,0xe9,0xdc,0x7d,0x80,0xc8,0xee,0xd4,0xb9,0x9f,0x17,0x54,0x2f,0x9a,0x59,0xc5,0x83,0x88,0x39,0x9c,0x29,0x88,0xe5,0xc3,0x91,0x7d,0xf0,0x1e,0x6d,0xf6,0x73,0x34,0x29,0xe6,0x52,0xf0,0xed,0x67,0x18,0x3a,0x75,0x88,0xb5,0xd7,0xdc,0xc6,0xe8,0x99,0x61,0x92,0x34,0x61,0x41,0xb7,0x2e,0xd9,0xd5,0x15,0x61,0x10,0xb0,0x62,0xd5,0xf5,0xf5,0x63,0xa7,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,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xde,0x9,0x14,0x17,0x2,0x12,0xee,0x6d,0xd3,0x79,0x0,0x0,0x0,0x19,0x74,0x45,0x58,0x74,0x43,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x0,0x43,0x72,0x65,0x61,0x74,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x47,0x49,0x4d,0x50,0x57,0x81,0xe,0x17,0x0,0x0,0x2,0xa7,0x49,0x44,0x41,0x54,0x68,0x81,0xed,0x99,0x4d,0x4f,0x13,0x51,0x14,0x86,0x9f,0x99,0x4e,0x6c,0x4b,0xc6,0x52,0xc5,0xb6,0x49,0x1b,0x5d,0xb1,0xf4,0x63,0x69,0x28,0x89,0xfc,0x7,0x63,0x42,0x8,0xff,0x40,0x11,0xc4,0x8d,0x51,0x2,0xb,0x5,0x56,0x86,0x8f,0xb8,0x51,0xff,0x0,0x69,0x20,0x24,0x6,0x24,0xfc,0x1,0x68,0x58,0x82,0x11,0x77,0x6e,0xc,0x24,0x2d,0x6,0x3a,0x49,0xad,0xd3,0x32,0xe5,0xba,0x18,0xdb,0x94,0x71,0x2,0xb1,0xb9,0x63,0x23,0x9d,0x67,0xd5,0xde,0x73,0xe6,0xcc,0x7b,0xde,0xe9,0x9d,0xcc,0x9c,0x82,0x8f,0x4f,0x5b,0xa3,0x38,0xbe,0x77,0x0,0x51,0x40,0x7,0x2,0x2e,0xf1,0xff,0x15,0x1,0x54,0x81,0x22,0x50,0x0,0x4a,0xb5,0x80,0xe6,0x48,0x8c,0x2,0xb7,0x81,0xeb,0x40,0x88,0x8b,0x65,0x80,0x9,0x7c,0x3,0x76,0x38,0xc3,0x0,0x1d,0xb8,0x71,0xeb,0xe6,0x9d,0xd9,0x54,0x32,0x15,0xd6,0x34,0xcd,0x53,0x3,0xaa,0x55,0x8b,0xe3,0x63,0xb,0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xa5,0x20,0x85,0x42,0xc1,0x7e,0x67,0xf7,0x6c,0x22,0x74,0xb9,0xb6,0xf4,0xc7,0x9,0x9c,0x6,0x58,0x40,0x79,0x6f,0x7f,0xaf,0x94,0x4a,0xa6,0xc2,0xba,0xae,0x5f,0xa8,0x99,0x20,0x50,0xc6,0xee,0xb1,0x31,0xe5,0x14,0x49,0xda,0x63,0x2a,0xbc,0x5f,0xb,0xb4,0xfd,0xff,0x2,0x3e,0x3e,0x3e,0xed,0xcd,0x2f,0xbd,0x80,0xe4,0x2f,0x1f,0x1c,0x6a,0x6c,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
};
@@ -385,12 +380,12 @@ static const unsigned char tool_button_pressed_png[]={
static const unsigned char tooltip_bg_png[]={
-0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0x20,0x0,0x0,0x0,0x20,0x8,0x6,0x0,0x0,0x0,0x73,0x7a,0x7a,0xf4,0x0,0x0,0x0,0x1,0x73,0x52,0x47,0x42,0x0,0xae,0xce,0x1c,0xe9,0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0xff,0x0,0xff,0x0,0xff,0xa0,0xbd,0xa7,0x93,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xda,0xc,0x3,0x2,0x34,0x35,0x46,0x29,0x34,0xbc,0x0,0x0,0x3,0xda,0x49,0x44,0x41,0x54,0x58,0xc3,0xc5,0x97,0x3d,0x8e,0x65,0x49,0x11,0x85,0xbf,0x73,0x22,0xdf,0xeb,0x1e,0x69,0x24,0xd8,0x5,0x5e,0x2f,0x60,0xc,0xec,0xf1,0x86,0x2d,0x20,0xd8,0x7,0x62,0x1f,0x20,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0x97,0xee,0x80,0xc6,0x9e,0x7b,0x7e,0xb2,0x6,0x6a,0xe3,0xcd,0xa5,0x59,0x89,0xd0,0xc4,0x4,0x10,0x2b,0xb5,0xa,0x1a,0xa2,0x22,0x96,0x28,0x63,0x16,0x97,0x88,0xc7,0x14,0xa4,0x33,0x1e,0xbf,0x7f,0x73,0x69,0x8e,0xba,0xd,0xe0,0x66,0xdb,0xdd,0xf3,0x1,0x7b,0x10,0xd3,0x28,0x31,0x37,0xc4,0x19,0x6d,0x89,0x96,0xda,0x19,0xf4,0x14,0x68,0xb6,0x54,0xce,0x68,0x66,0xb8,0xa6,0xf1,0x51,0xb3,0x8,0x0,0xf6,0x60,0xcf,0x3b,0xd2,0xb0,0x6b,0xe3,0x12,0xa2,0x25,0x9d,0xf5,0x33,0x46,0x11,0xa0,0x74,0x13,0x20,0x46,0x11,0xc8,0x8c,0x9a,0x8e,0x8c,0xc2,0xcc,0xef,0x19,0x33,0x3d,0x42,0xa2,0x81,0x4b,0x88,0xba,0x87,0x81,0x3c,0x36,0x62,0x18,0x11,0x84,0x5b,0xb8,0x15,0x6e,0x55,0x6,0x51,0x52,0x80,0x2a,0x23,0x2,0x8c,0x7b,0x28,0xc3,0x22,0x22,0x40,0xca,0x50,0xb8,0x11,0xa1,0xc7,0x7f,0xc7,0x9d,0x1a,0xd8,0x8e,0x83,0xcf,0x3e,0xf3,0xf4,0x94,0x10,0x25,0x1d,0x6e,0x29,0x30,0x83,0xae,0x63,0xb4,0x2f,0x8d,0xb0,0x54,0xea,0xbe,0xb4,0x54,0x52,0x11,0x41,0xe0,0xb0,0x5c,0x85,0xaa,0x86,0xc6,0x4a,0xc3,0xed,0x9e,0x3a,0x90,0xc7,0x86,0xe2,0xca,0xe1,0xd6,0x0,0xe1,0xf6,0x80,0x3e,0xa0,0x55,0x26,0xdc,0x1c,0x25,0x3d,0x40,0x47,0x9b,0x41,0x82,0x5b,0x47,0xc9,0x40,0x6c,0x65,0xf,0xf7,0xd9,0x8c,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1e,0xb8,0x1,0x5f,0xc0,0xa7,0xc,0xe6,0xd,0xb0,0x0,0xe2,0x7f,0x2,0x5a,0xe0,0x3,0x38,0xcb,0x70,0x79,0xb9,0x5e,0x6d,0xdf,0x9c,0x75,0x89,0x88,0x4,0x1,0xaa,0xda,0xfb,0xda,0x37,0x97,0xeb,0x69,0x7,0xbc,0xb,0x20,0xc0,0xcc,0x59,0x97,0xb6,0x6d,0xcb,0xfe,0x50,0x1d,0x43,0x80,0x22,0x2f,0x33,0x67,0x5d,0x7a,0xb9,0x9e,0x66,0x80,0x44,0xc3,0xdc,0x88,0xc8,0xa8,0x19,0x60,0x7f,0xa8,0x8e,0x22,0xc2,0xdf,0xab,0x51,0x78,0x7d,0x5c,0xf,0xc0,0x3d,0x1,0x7a,0x55,0xa5,0xc8,0xcb,0x6c,0xcc,0x50,0xe4,0x65,0xa6,0xaa,0xf0,0x1b,0x69,0x4,0x50,0xa0,0xf3,0xb5,0xff,0x76,0xd6,0x25,0xaf,0x2f,0xbb,0x20,0x24,0x8e,0xe3,0xde,0xd7,0xbe,0x1,0x3a,0x40,0xd,0x60,0x99,0x50,0x26,0xc3,0xc4,0x3a,0xff,0x0,0x26,0xe4,0x45,0xbd,0xbe,0xa2,0xc,0xd0,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
};
static const unsigned char tree_bg_png[]={
-0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0x10,0x0,0x0,0x0,0x10,0x8,0x6,0x0,0x0,0x0,0x1f,0xf3,0xff,0x61,0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0x30,0x0,0x27,0x0,0x35,0x33,0xd3,0x97,0xbf,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xdd,0x9,0x1b,0x11,0x4,0x30,0xb7,0x2d,0x2b,0x51,0x0,0x0,0x0,0x19,0x74,0x45,0x58,0x74,0x43,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x0,0x43,0x72,0x65,0x61,0x74,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x47,0x49,0x4d,0x50,0x57,0x81,0xe,0x17,0x0,0x0,0x0,0xc0,0x49,0x44,0x41,0x54,0x38,0xcb,0xed,0xd0,0x2d,0x8e,0x2,0x41,0x10,0x86,0xe1,0xb7,0x7f,0x66,0x4,0x20,0xd6,0xb0,0x21,0x60,0x20,0x70,0x1,0x34,0x8a,0x5b,0xac,0x26,0x5c,0x62,0x4f,0xc0,0x11,0x30,0x4,0xcd,0x29,0x40,0xa1,0xb9,0x0,0x9,0x6a,0x12,0x2,0x6,0x1,0x23,0x9a,0xa9,0x2e,0xcc,0x1e,0x60,0x3a,0xeb,0x8,0xaf,0xff,0x9e,0x4a,0xca,0xa8,0x2a,0x83,0xde,0x68,0x5,0xfc,0x0,0x4d,0xea,0xf5,0x0,0x36,0xa7,0xe2,0x38,0x37,0xfd,0xee,0x70,0xeb,0xbc,0x9f,0x7a,0xef,0x48,0xa9,0xaa,0x4,0xa9,0xaa,0x9d,0xe9,0x77,0x87,0xd2,0x68,0x36,0xac,0x73,0xe,0x6b,0xea,0x21,0x51,0x5,0x11,0xa1,0x7c,0x94,0xd1,0x3,0x36,0xf3,0x79,0xd2,0x75,0x6b,0x1c,0xd6,0x3b,0xa0,0xb4,0x96,0x7f,0xf6,0x1,0xde,0x6,0x28,0xa2,0x4a,0xf2,0xf0,0x6f,0x53,0x58,0x60,0x19,0x42,0x20,0x5,0x89,0x2a,0x84,0x10,0x0,0x96,0x46,0x55,0x99,0x8c,0xa7,0x8b,0xeb,0xed,0x3c,0x7b,0x86,0xe7,0x77,0x1d,0x20,0xcb,0xb3,0x4b,0xfb,0xab,0xb3,0xde,0x1f,0x76,0xbf,0x46,0x55,0x41,0xc9,0x81,0x56,0xc2,0x4f,0x22,0x70,0xc7,0x10,0x5e,0xb5,0x47,0x48,0x5e,0x61,0x62,0xef,0xf5,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
+0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0x10,0x0,0x0,0x0,0x10,0x8,0x6,0x0,0x0,0x0,0x1f,0xf3,0xff,0x61,0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0x4c,0x0,0x4a,0x0,0x4e,0x88,0x29,0x6a,0xb6,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xde,0x9,0x10,0x12,0xb,0xd,0x3b,0xe,0x30,0x79,0x0,0x0,0x0,0x19,0x74,0x45,0x58,0x74,0x43,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x0,0x43,0x72,0x65,0x61,0x74,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x47,0x49,0x4d,0x50,0x57,0x81,0xe,0x17,0x0,0x0,0x0,0xbd,0x49,0x44,0x41,0x54,0x38,0x8d,0xdd,0x93,0x41,0x6a,0xc3,0x30,0x14,0x44,0xdf,0xa8,0x8a,0x97,0x26,0x27,0x48,0x9a,0x3,0xb4,0x90,0x1b,0xf4,0x66,0xf5,0x91,0x4b,0x16,0x9,0xd8,0x5f,0x9e,0x2e,0xac,0xa4,0x34,0xb8,0xb,0x6b,0xd9,0x1,0xa1,0x41,0x62,0x3e,0x33,0x1f,0x46,0xef,0x6f,0xe7,0xcf,0xcb,0xe5,0x6b,0x48,0x12,0x92,0x0,0xb0,0xbd,0xca,0xef,0xb0,0xcd,0x6c,0xd3,0xf7,0xfb,0x41,0xaf,0xc7,0x93,0xbb,0xdd,0x8e,0x9c,0xbb,0xe5,0x57,0x2,0x7b,0x9d,0x2f,0x6a,0x0,0x22,0x46,0xc6,0x69,0x22,0x27,0x89,0x9c,0x3b,0x72,0xce,0x6c,0x45,0x44,0x90,0x9e,0xed,0x6d,0x81,0x24,0xd2,0x2f,0x7b,0xdb,0xd4,0x0,0x75,0x40,0xb,0x6c,0x6c,0xd7,0x1,0xf7,0x45,0x6d,0x36,0x21,0x92,0x1b,0xc5,0x8f,0x8,0x92,0xda,0x76,0xf0,0xf,0x22,0x54,0xb4,0x47,0xa8,0x9a,0xf6,0x8,0x2c,0xa5,0xca,0xb3,0x4d,0xc4,0xf8,0xf3,0xfa,0x54,0x9a,0xbf,0xca,0x15,0x31,0x32,0xdb,0xbc,0x1c,0xe,0x27,0xae,0xb7,0xeb,0x47,0x29,0x41,0x29,0x41,0x89,0x69,0x39,0x25,0x88,0x7a,0xaf,0xf1,0x28,0x85,0xbe,0xdf,0xf,0xdf,0x7a,0xec,0x7c,0x19,0x53,0x3a,0x70,0xa,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
};
@@ -410,42 +405,22 @@ static const unsigned char tree_cursor_unfocus_png[]={
static const unsigned char tree_title_png[]={
-0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0x10,0x0,0x0,0x0,0x10,0x8,0x6,0x0,0x0,0x0,0x1f,0xf3,0xff,0x61,0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0x4e,0x0,0x41,0x0,0x56,0xed,0xd0,0x4e,0x61,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xdd,0x9,0x1b,0x12,0x1e,0xf,0xb3,0x20,0x42,0xee,0x0,0x0,0x0,0x19,0x74,0x45,0x58,0x74,0x43,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x0,0x43,0x72,0x65,0x61,0x74,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x47,0x49,0x4d,0x50,0x57,0x81,0xe,0x17,0x0,0x0,0x1,0x77,0x49,0x44,0x41,0x54,0x38,0xcb,0xa5,0x92,0xbd,0x4e,0xdc,0x50,0x10,0x85,0xbf,0xd9,0xb5,0xb2,0x38,0x80,0x4,0x11,0xb0,0x26,0x74,0x14,0xa4,0x48,0x4,0x1d,0x55,0x2a,0x44,0xc1,0x63,0xa0,0x74,0x79,0x4,0x1a,0xa2,0x54,0x91,0xf2,0x2,0x74,0x11,0x8f,0x41,0x41,0x49,0x95,0x32,0x52,0x9a,0xf4,0x28,0xcb,0xff,0x22,0x7e,0xc,0x6b,0x7b,0x4e,0x8a,0x7b,0xbd,0xe,0xa4,0xc8,0x22,0x46,0xb2,0x8e,0x74,0x75,0xef,0x37,0x73,0xce,0xd8,0x24,0x91,0xcd,0xbd,0xde,0x4,0x3e,0x2,0xab,0x8c,0x56,0xdf,0x81,0x1d,0x59,0xb5,0x6b,0xdd,0xd9,0xf9,0xed,0xee,0x4c,0xf6,0xf9,0xed,0xd2,0x32,0xd3,0x53,0xaf,0x46,0x7a,0x7d,0xd1,0x3f,0xe7,0xe7,0xaf,0x1f,0x1c,0x9d,0xf6,0x3e,0x59,0x77,0x76,0xfe,0xf7,0xfa,0xfb,0x8d,0x2c,0xbf,0xbb,0x25,0xbf,0xcf,0x47,0x2,0xa4,0x9d,0x94,0x74,0xec,0x25,0xfb,0x7,0x7b,0xbd,0x4,0xc8,0xce,0x2f,0xcf,0x78,0x4a,0xe5,0xf7,0x79,0xdd,0x2c,0x4b,0x0,0xe4,0x8e,0x64,0x98,0x9,0xcc,0x40,0x8d,0xd6,0xe7,0x92,0x81,0x9,0x3,0x4,0x58,0x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0x0,0x0,0x0,0x10,0x0,0x0,0x0,0x10,0x8,0x6,0x0,0x0,0x0,0x1f,0xf3,0xff,0x61,0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0x4c,0x0,0x4a,0x0,0x4e,0x88,0x29,0x6a,0xb6,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xde,0x9,0x10,0x14,0x11,0x9,0x88,0xc3,0x72,0x9,0x0,0x0,0x0,0x19,0x74,0x45,0x58,0x74,0x43,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x0,0x43,0x72,0x65,0x61,0x74,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x47,0x49,0x4d,0x50,0x57,0x81,0xe,0x17,0x0,0x0,0x0,0x1d,0x49,0x44,0x41,0x54,0x38,0x8d,0x63,0x54,0x55,0x56,0xfd,0xcf,0x40,0x1,0x60,0xa2,0x44,0xf3,0xa8,0x1,0xa3,0x6,0x8c,0x1a,0x30,0x98,0xc,0x0,0x0,0x7,0x54,0x1,0x8c,0x3f,0xc3,0xfb,0x99,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
};
static const unsigned char tree_title_pressed_png[]={
-0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0x10,0x0,0x0,0x0,0x10,0x8,0x6,0x0,0x0,0x0,0x1f,0xf3,0xff,0x61,0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0x49,0x0,0x42,0x0,0x4e,0x4e,0xda,0xb4,0x7e,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0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0,0x10,0x8,0x6,0x0,0x0,0x0,0x1f,0xf3,0xff,0x61,0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0x4c,0x0,0x4a,0x0,0x4e,0x88,0x29,0x6a,0xb6,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xde,0x9,0x10,0x14,0x11,0x5,0x81,0x75,0x3e,0x22,0x0,0x0,0x0,0x19,0x74,0x45,0x58,0x74,0x43,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x0,0x43,0x72,0x65,0x61,0x74,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x47,0x49,0x4d,0x50,0x57,0x81,0xe,0x17,0x0,0x0,0x0,0x1d,0x49,0x44,0x41,0x54,0x38,0x8d,0x63,0x34,0x33,0x31,0xfb,0xcf,0x40,0x1,0x60,0xa2,0x44,0xf3,0xa8,0x1,0xa3,0x6,0x8c,0x1a,0x30,0x98,0xc,0x0,0x0,0xd6,0x1e,0x1,0xbf,0x4c,0xf9,0x63,0xb6,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
};
static const unsigned char unchecked_png[]={
-0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0x10,0x0,0x0,0x0,0x10,0x8,0x6,0x0,0x0,0x0,0x1f,0xf3,0xff,0x61,0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0x34,0x0,0x2e,0x0,0x39,0xc0,0x34,0x46,0xdb,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xdd,0x9,0x1b,0x12,0x7,0x34,0x99,0x2b,0x2,0xd2,0x0,0x0,0x0,0x19,0x74,0x45,0x58,0x74,0x43,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x0,0x43,0x72,0x65,0x61,0x74,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x47,0x49,0x4d,0x50,0x57,0x81,0xe,0x17,0x0,0x0,0x1,0x24,0x49,0x44,0x41,0x54,0x38,0xcb,0xa5,0x93,0x3b,0x4e,0x2,0x51,0x14,0x86,0xbf,0x61,0x26,0x23,0x8,0xc6,0xf8,0x62,0x6,0x8c,0x96,0x96,0x16,0x16,0x54,0x2e,0xc0,0xca,0x35,0x10,0x17,0x62,0xa2,0x9,0x6b,0xa0,0x73,0x11,0x56,0x2e,0xc0,0x86,0xc6,0xc2,0xd2,0xce,0x44,0x60,0x50,0x22,0xbe,0xc8,0xcc,0x5c,0xee,0xc3,0x6a,0x12,0x8,0x17,0x8c,0xcc,0x9f,0x9c,0xe6,0x26,0xe7,0xbb,0xe7,0xff,0x73,0x8e,0x63,0x8c,0x1,0x20,0x8,0x2,0x56,0x51,0x81,0x9c,0x9a,0x1,0xb8,0xc6,0x6f,0xba,0xc6,0xef,0xb8,0xc6,0x37,0xb,0xaa,0xe3,0x1a,0xbf,0x39,0xdd,0xe3,0x4d,0x35,0x5f,0x86,0xbb,0xf5,0xab,0xe3,0xa3,0x13,0xb6,0x37,0xf7,0xac,0xbf,0xbd,0x7f,0xbe,0x35,0x1e,0x9f,0x1e,0x1a,0xd1,0xb0,0x77,0xa8,0x1c,0x71,0xd,0xe0,0x64,0x19,0xd4,0xab,0x7,0xfd,0xb3,0xd3,0xf3,0x70,0x1c,0x8f,0x49,0xd2,0xd8,0xa,0x28,0xae,0x95,0x28,0x97,0xca,0xdc,0xdd,0xdf,0x46,0xca,0x11,0xb5,0x99,0x9,0x80,0xf0,0xe3,0x7b,0x84,0x52,0x6a,0xa1,0xdf,0x24,0x8d,0x99,0x48,0x1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,0x43,0x72,0x65,0x61,0x74,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x47,0x49,0x4d,0x50,0x57,0x81,0xe,0x17,0x0,0x0,0x0,0xf2,0x49,0x44,0x41,0x54,0x38,0x8d,0xed,0x93,0xb1,0x4a,0xc4,0x50,0x10,0x45,0xcf,0x4b,0x26,0x71,0x2a,0xb7,0x58,0xc1,0xca,0x6f,0xb0,0xb4,0x74,0x75,0x59,0x11,0xbf,0xc1,0x1f,0xf0,0xaf,0xac,0xfc,0x1,0x61,0x11,0x45,0x85,0x5d,0xb6,0xb0,0xf4,0x1b,0xb4,0x10,0xd1,0x42,0xc1,0x65,0x30,0xb3,0x59,0x8b,0x24,0x10,0x10,0xf2,0x82,0xb5,0xb7,0x99,0xea,0xdc,0x79,0xf3,0xb8,0x37,0x50,0x29,0x0,0x9,0x20,0xf5,0xec,0x52,0x9,0x78,0x3d,0xd7,0xa1,0x86,0x33,0x60,0x8,0xec,0x0,0x9b,0x1d,0x26,0x25,0xf0,0x9,0x3c,0x1,0xef,0x40,0xd1,0x6c,0x1c,0x4a,0x2a,0xa3,0xf1,0xe1,0xe4,0x22,0xcb,0xb2,0xce,0xf5,0x45,0x51,0x70,0x7b,0x7f,0x73,0xea,0xee,0x77,0xc0,0x6b,0x0,0x36,0x80,0xdd,0xe3,0xa3,0x93,0x7,0x33,0xc3,0xcc,0x3a,0xd,0x54,0x15,0x55,0xe5,0xea,0x7a,0xba,0x7,0x3c,0x26,0xf5,0xb,0x6,0x22,0x12,0x85,0x1,0xcc,0xc,0x11,0x1,0x18,0x0,0x49,0x73,0x6b,0x88,0x92,0xbf,0x95,0x0,0x21,0xf6,0xe3,0xbd,0x5c,0xfe,0xd,0x2a,0xad,0xff,0xc0,0x96,0x8d,0x41,0x9,0x7c,0xb8,0x3b,0xaa,0x1a,0xa5,0x54,0x15,0x77,0x87,0x2a,0xd2,0xab,0x0,0xa4,0xc0,0x76,0x9e,0xe7,0x93,0x83,0xfd,0xf1,0x79,0x9f,0x28,0xcf,0x17,0xb3,0xb3,0xe5,0xf2,0xeb,0x12,0x78,0x69,0x97,0x69,0x8b,0xfe,0x65,0x7a,0x6,0xde,0x80,0xef,0x26,0x81,0xed,0x3a,0xa7,0x91,0x2b,0x56,0xb4,0xea,0xfc,0x3,0x6e,0x28,0x47,0x29,0x38,0xc5,0x49,0x7f,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
};
static const unsigned char updown_png[]={
-0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0x8,0x0,0x0,0x0,0x10,0x8,0x6,0x0,0x0,0x0,0x2b,0x8a,0x3e,0x7d,0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0x73,0x0,0x29,0x0,0x7c,0x29,0x1e,0x61,0x18,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xdd,0x9,0x19,0x1,0x16,0x3a,0x99,0x23,0xd9,0x67,0x0,0x0,0x1,0x1,0x49,0x44,0x41,0x54,0x28,0xcf,0x85,0x91,0x3b,0x4e,0xc3,0x40,0x14,0x45,0x8f,0xc7,0x8e,0xad,0x28,0x2,0x45,0x4a,0x8a,0x20,0x50,0x24,0x36,0x40,0x83,0x44,0x8b,0x68,0xd8,0x4,0x9f,0x2e,0x9b,0x61,0x15,0xc8,0xde,0x45,0xa,0xa8,0x91,0xa8,0xd8,0x0,0x22,0x45,0x62,0x25,0x63,0x33,0xf6,0xc8,0x31,0x3f,0xcf,0xd0,0x38,0x28,0x38,0xa,0xdc,0xf2,0x9d,0x5b,0xbc,0xf3,0x1e,0xac,0x45,0x25,0x9a,0x66,0x44,0x3,0xa,0x19,0xab,0xcd,0x42,0xd,0x7d,0x63,0xec,0x1,0x30,0x5a,0x2f,0x79,0x2b,0x68,0xad,0xed,0x69,0x55,0xbc,0x0,0x74,0x76,0xda,0x6f,0x32,0x56,0x51,0x7f,0xd0,0xc5,0x51,0x89,0xf6,0xad,0xb5,0xbd,0xfc,0xb5,0x98,0x2,0x15,0xe0,0xd6,0xa5,0x6b,0x1c,0x22,0x61,0x8d,0xdd,0xaf,0xe1,0x97,0x1f,0xb4,0xee,0x3a,0xbb,0xed,0xb,0x80,0x42,0x97,0x21,0x70,0xe9,0x19,0x6b,0xf,0x1,0xfc,0xa0,0x75,0xbf,0x37,0xec,0x9f,0x3,0xc8,0x58,0xb9,0x85,0x2e,0x43,0x53,0x99,0x23,0x54,0xa2,0xdd,0x74,0x91,0x1d,0x37,0xf5,0xd2,0x79,0x76,0xf2,0x4b,0x73,0x5b,0x44,0x55,0x99,0x53,0xad,0x96,0x8f,0xb3,0x89,0x1c,0xaf,0x86,0x32,0x56,0x57,0x3a,0x5b,0x3e,0xcc,0xa7,0xe9,0x8d,0x27,0x1c,0xe7,0x19,0xe0,0xe3,0xfd,0xf3,0x6c,0x36,0x91,0xe3,0x56,0xe0,0xdd,0x16,0x79,0x19,0x2,0x8,0x57,0x3c,0xfd,0xa9,0xd9,0x1f,0x74,0x23,0xa7,0xbe,0xe4,0x7a,0xe9,0x7,0xd2,0x78,0x94,0x9f,0x2e,0xf2,0xa1,0x8c,0xd5,0x68,0xeb,0xc6,0x2a,0xd1,0xff,0x5a,0x6d,0xe4,0x1b,0x83,0x27,0x93,0x7,0x1d,0x11,0x34,0xe5,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
-};
-
-
-static const unsigned char vscroll_bg_png[]={
-0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0x8,0x0,0x0,0x0,0x8,0x8,0x6,0x0,0x0,0x0,0xc4,0xf,0xbe,0x8b,0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0x49,0x0,0x42,0x0,0x4e,0x4e,0xda,0xb4,0x7e,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xdd,0x9,0x1b,0x12,0x24,0x11,0x6c,0x86,0xa1,0xf4,0x0,0x0,0x0,0x19,0x74,0x45,0x58,0x74,0x43,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x0,0x43,0x72,0x65,0x61,0x74,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x47,0x49,0x4d,0x50,0x57,0x81,0xe,0x17,0x0,0x0,0x0,0x51,0x49,0x44,0x41,0x54,0x18,0xd3,0x63,0x94,0x14,0x95,0x99,0xc6,0xc0,0xc0,0x90,0xc9,0x80,0x9,0xa6,0x33,0x30,0x30,0x64,0x31,0x4a,0x8a,0xca,0xfc,0x67,0x63,0x61,0x63,0xe0,0x60,0xe7,0x64,0x60,0x66,0x66,0x66,0x60,0x62,0x62,0x62,0x60,0x63,0x65,0x67,0x78,0xfe,0xfa,0x29,0xc3,0xd3,0x17,0x8f,0x44,0x99,0x18,0x8,0x80,0xc1,0xa0,0x80,0x85,0x81,0x81,0x61,0xfa,0xaf,0x3f,0xbf,0x32,0x7f,0xfd,0xf9,0x85,0xcd,0x9b,0x6f,0x0,0xae,0x38,0x11,0xcb,0x70,0x15,0x64,0xf2,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
-};
-
-
-static const unsigned char vscroll_bg_focus_png[]={
-0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0x8,0x0,0x0,0x0,0x8,0x8,0x6,0x0,0x0,0x0,0xc4,0xf,0xbe,0x8b,0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0x49,0x0,0x42,0x0,0x4e,0x4e,0xda,0xb4,0x7e,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xdd,0x9,0x1b,0x12,0x24,0x1e,0xfc,0x39,0xbc,0x65,0x0,0x0,0x0,0x19,0x74,0x45,0x58,0x74,0x43,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x0,0x43,0x72,0x65,0x61,0x74,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x47,0x49,0x4d,0x50,0x57,0x81,0xe,0x17,0x0,0x0,0x0,0x51,0x49,0x44,0x41,0x54,0x18,0xd3,0x63,0x94,0x14,0x95,0x99,0xc6,0xc0,0xc0,0x90,0xc9,0x80,0x9,0xa6,0x33,0x30,0x30,0x64,0x31,0x4a,0x8a,0xca,0xfc,0x67,0x63,0x61,0x63,0xe0,0x60,0xe7,0x64,0x60,0x66,0x66,0x66,0x60,0x62,0x62,0x62,0x60,0x63,0x65,0x67,0x78,0xfe,0xfa,0x29,0xc3,0xd3,0x17,0x8f,0x44,0x99,0x18,0x8,0x80,0xc1,0xa0,0x80,0x85,0x81,0x81,0x61,0xfa,0xaf,0x3f,0xbf,0x32,0x7f,0xfd,0xf9,0x85,0xcd,0x9b,0x6f,0x0,0xae,0x38,0x11,0xcb,0x70,0x15,0x64,0xf2,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
-};
-
-
-static const unsigned char vscroll_grabber_png[]={
-0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0x8,0x0,0x0,0x0,0x8,0x8,0x6,0x0,0x0,0x0,0xc4,0xf,0xbe,0x8b,0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0x49,0x0,0x42,0x0,0x4e,0x4e,0xda,0xb4,0x7e,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xdd,0x9,0x1b,0x12,0x27,0x14,0x37,0xc1,0x6,0xb8,0x0,0x0,0x0,0x19,0x74,0x45,0x58,0x74,0x43,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x0,0x43,0x72,0x65,0x61,0x74,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x47,0x49,0x4d,0x50,0x57,0x81,0xe,0x17,0x0,0x0,0x0,0x9c,0x49,0x44,0x41,0x54,0x18,0xd3,0x7d,0x8f,0x3d,0xb,0x82,0x40,0x0,0x40,0x9f,0xe7,0x75,0x67,0x4,0x41,0x86,0xa1,0x20,0xcd,0x4d,0xd1,0x10,0xb4,0xf4,0xf3,0x5b,0x5a,0x83,0x86,0xa6,0x8,0xa2,0xec,0x73,0xca,0xf2,0x2e,0xb5,0x26,0xf,0x5a,0x7a,0xe3,0xe3,0x2d,0xcf,0x4b,0xa2,0xf4,0xd3,0xeb,0x86,0xe4,0xcf,0x7,0xb6,0xb4,0x48,0x29,0x1,0x28,0xcb,0x12,0xc0,0x93,0x0,0xf6,0x6d,0x18,0xf4,0x13,0xd2,0x78,0x88,0x56,0x1,0x9b,0xed,0x9a,0xec,0x7a,0x60,0x32,0x9a,0x22,0x0,0xa2,0x30,0x46,0xab,0x0,0x63,0xb,0x8c,0x2d,0x98,0x8d,0xe7,0x34,0x8,0x0,0x21,0x84,0x13,0x55,0x55,0xd1,0xd6,0x9d,0xdf,0xe0,0x1f,0x2,0xa0,0xae,0x6b,0x27,0x7c,0xdf,0xe7,0x65,0xf2,0xdf,0xe0,0x72,0xcf,0x30,0xb6,0x40,0xab,0x0,0xad,0x2,0x96,0xab,0x85,0xb,0x24,0x80,0x6a,0x69,0xce,0xb7,0x23,0xfb,0xd3,0xce,0x6d,0x36,0x7c,0x1,0xa3,0x8f,0x31,0x52,0x6,0xb1,0x57,0x8b,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
-};
-
-
-static const unsigned char vscroll_grabber_hl_png[]={
-0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0x8,0x0,0x0,0x0,0x8,0x8,0x6,0x0,0x0,0x0,0xc4,0xf,0xbe,0x8b,0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0x49,0x0,0x42,0x0,0x4e,0x4e,0xda,0xb4,0x7e,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xdd,0x9,0x1b,0x12,0x27,0x25,0x66,0x1f,0x6,0x82,0x0,0x0,0x0,0x19,0x74,0x45,0x58,0x74,0x43,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x0,0x43,0x72,0x65,0x61,0x74,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x47,0x49,0x4d,0x50,0x57,0x81,0xe,0x17,0x0,0x0,0x0,0xa2,0x49,0x44,0x41,0x54,0x18,0xd3,0x7d,0x8f,0x3b,0xf,0xc1,0x50,0x0,0x46,0x8f,0xdb,0x56,0xef,0x65,0x32,0x78,0x4,0xd,0x91,0xe,0x46,0x83,0xc1,0x6a,0xf0,0xab,0xd,0x56,0x8b,0xc1,0x24,0x91,0x48,0xbc,0xe2,0x31,0x12,0xf4,0x5e,0x57,0xcb,0xa4,0xd2,0xc5,0x19,0x4f,0xce,0x37,0x7c,0xb9,0x76,0x23,0x7c,0x97,0x4b,0x15,0xae,0xb7,0xb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1e,0x3f,0x3b,0xb0,0x99,0x1,0x70,0x56,0xb8,0xf7,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
};
@@ -455,32 +430,32 @@ static const unsigned char vseparator_png[]={
static const unsigned char vslider_bg_png[]={
-0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0x10,0x0,0x0,0x0,0x10,0x8,0x6,0x0,0x0,0x0,0x1f,0xf3,0xff,0x61,0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0x4b,0x0,0x3f,0x0,0x52,0x7c,0x32,0x40,0x52,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xdd,0x9,0x1b,0x16,0x2b,0x31,0xd7,0x79,0x35,0x2f,0x0,0x0,0x0,0x19,0x74,0x45,0x58,0x74,0x43,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x0,0x43,0x72,0x65,0x61,0x74,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x47,0x49,0x4d,0x50,0x57,0x81,0xe,0x17,0x0,0x0,0x0,0xba,0x49,0x44,0x41,0x54,0x38,0xcb,0xed,0x93,0x31,0x6a,0x2,0x51,0x14,0x45,0xcf,0x7f,0xff,0x39,0xa2,0x19,0x3,0x21,0x28,0xa,0xae,0x23,0xeb,0x9,0x76,0xb3,0x89,0x58,0x9,0xd9,0xc1,0x74,0x71,0x3f,0xb1,0xb1,0x73,0x3,0x8a,0xa0,0x84,0x14,0x13,0x23,0x84,0xef,0xfb,0xe9,0x44,0xe4,0x8b,0x4e,0xef,0x2d,0x2f,0xe7,0x9e,0xee,0x3a,0x12,0x19,0x74,0x87,0x6f,0x40,0x1,0xf4,0x81,0x15,0x50,0xae,0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,0x74,0x0,0x43,0x72,0x65,0x61,0x74,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x47,0x49,0x4d,0x50,0x57,0x81,0xe,0x17,0x0,0x0,0x0,0x4d,0x49,0x44,0x41,0x54,0x38,0x8d,0x63,0x60,0x18,0x68,0xc0,0x88,0x4d,0x50,0x42,0x42,0x62,0x1a,0x3,0x3,0x43,0x26,0x9a,0xf0,0xf4,0x17,0x2f,0x5e,0x64,0x11,0x6b,0xc0,0x7f,0x76,0x76,0x4e,0x14,0xb1,0x9f,0x3f,0xbf,0x33,0xbc,0x78,0xf1,0x2,0x43,0x3d,0x13,0xd1,0x6e,0xc5,0x1,0x46,0xd,0x18,0x35,0x0,0x9f,0x1,0xd3,0x7f,0xfe,0xfc,0xce,0x80,0x8c,0x19,0x18,0x18,0xa6,0x53,0x6a,0x19,0x6d,0x0,0x0,0x59,0x9c,0x18,0xe9,0x50,0xa4,0x59,0x7a,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
};
static const unsigned char vslider_grabber_png[]={
-0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0x10,0x0,0x0,0x0,0x10,0x8,0x6,0x0,0x0,0x0,0x1f,0xf3,0xff,0x61,0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0x4b,0x0,0x3f,0x0,0x52,0x7c,0x32,0x40,0x52,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xdd,0x9,0x1b,0x16,0x2a,0xf,0xf,0x3,0x19,0xc5,0x0,0x0,0x0,0x19,0x74,0x45,0x58,0x74,0x43,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x0,0x43,0x72,0x65,0x61,0x74,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x47,0x49,0x4d,0x50,0x57,0x81,0xe,0x17,0x0,0x0,0x1,0xa7,0x49,0x44,0x41,0x54,0x38,0xcb,0xc5,0x93,0x3d,0x4c,0x14,0x41,0x18,0x86,0x9f,0x6f,0x66,0x5d,0xd8,0x2c,0x97,0x3b,0xee,0x64,0x4e,0x2e,0x78,0x86,0xd8,0x99,0xd8,0x5e,0x6c,0x24,0x26,0x56,0x36,0x26,0x26,0x5a,0x51,0x59,0xda,0x6a,0x3,0xad,0xd,0x34,0x5a,0x99,0xd0,0x58,0xd8,0x9f,0x15,0x8d,0x95,0x21,0xa1,0x32,0x86,0x10,0xa3,0x89,0x31,0x24,0xc4,0xe3,0xef,0xc0,0xe5,0x27,0x22,0x5e,0x56,0xf6,0x6e,0xf9,0x2c,0xe4,0x4e,0x90,0x43,0x4a,0xbe,0x62,0x32,0x33,0xc9,0xfb,0xce,0x3b,0xcf,0x37,0x3,0xe7,0x5d,0x52,0xa9,0x54,0x0,0xa8,0xd5,0x6a,0x9d,0xcd,0x7b,0xb7,0x46,0x6f,0x4e,0xcf,0x54,0x67,0xff,0xa3,0xdb,0x0,0xa6,0x52,0x49,0x9e,0xca,0xed,0x1b,0x77,0x0,0x78,0xfb,0xee,0xd,0xce,0x39,0xac,0xfa,0xf7,0xad,0xb5,0x55,0x97,0xbf,0xc4,0xc5,0x9c,0x43,0x44,0x10,0x31,0x88,0x11,0x8c,0x80,0x7f,0xa1,0x97,0x5c,0xa6,0x9f,0xf,0x5f,0xe6,0xd8,0xd8,0xaa,0x3f,0xb4,0x3,0xa5,0x3c,0x89,0xc6,0x34,0x9b,0x4d,0xac,0xfa,0x8f,0x3d,0xcf,0x7b,0x39,0x54,0xbc,0x42,0xb6,0xaf,0xff,0x50,0x2c,0x88,0x1,0x3,0x88,0x18,0x40,0x50,0x55,0x86,0x8a,0x65,0x16,0x57,0x16,0x4a,0xa6,0x9d,0xc9,0xaa,0x3f,0x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x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
+0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0x10,0x0,0x0,0x0,0x10,0x8,0x6,0x0,0x0,0x0,0x1f,0xf3,0xff,0x61,0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0x92,0x0,0x92,0x0,0x99,0x25,0xc1,0x88,0x71,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xde,0x9,0x12,0x0,0x2,0x1f,0xac,0xde,0x45,0xed,0x0,0x0,0x0,0x19,0x74,0x45,0x58,0x74,0x43,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x0,0x43,0x72,0x65,0x61,0x74,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x47,0x49,0x4d,0x50,0x57,0x81,0xe,0x17,0x0,0x0,0x1,0xa4,0x49,0x44,0x41,0x54,0x38,0x8d,0x9d,0x93,0xb1,0x6e,0x1a,0x41,0x14,0x45,0xcf,0xcc,0xce,0x9a,0x85,0x25,0x44,0x58,0x8a,0x15,0xc5,0x49,0x93,0x2,0xb2,0x2,0x51,0xf2,0x7,0x2e,0x68,0xf2,0x15,0xae,0x22,0xc1,0x77,0xa4,0xe,0x65,0x5c,0xe4,0x2f,0xf8,0xb,0x47,0xb6,0x2c,0x21,0xb0,0x44,0xb7,0x22,0x52,0x9a,0x0,0x82,0x9d,0xd9,0x1d,0x76,0xd3,0xec,0x22,0x40,0xb1,0x8d,0x72,0xa5,0x29,0xe6,0xcd,0xbd,0xf7,0xbd,0x79,0x33,0x4f,0x70,0x84,0x66,0xb3,0x79,0x1c,0x3a,0xc0,0x64,0x32,0x39,0xd8,0xcb,0x7f,0x88,0x2f,0x81,0xaf,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0x3d,0xf2,0x9c,0x89,0x31,0x9a,0xd9,0xec,0x11,0x60,0xe0,0x38,0x4e,0xb8,0xdd,0x6e,0x71,0xde,0xbc,0x3b,0xc7,0xf3,0x3c,0x8c,0x31,0xb7,0x5a,0x47,0xe1,0x7c,0x1e,0x5e,0x55,0xab,0xaf,0x5c,0x29,0x25,0x52,0x4a,0xb2,0x2c,0x23,0x8e,0xd,0xab,0xd5,0x82,0xfb,0xfb,0x9f,0x91,0xd6,0xd1,0x17,0x6b,0xed,0xcd,0x72,0xb9,0x24,0x4d,0x53,0xc4,0x7e,0x86,0xbd,0x61,0xea,0x3,0x3d,0xa0,0x91,0x1f,0x4d,0x81,0x11,0x30,0x4,0xc2,0xfd,0x89,0x3c,0x30,0xd8,0x33,0x79,0x12,0xc7,0xe3,0xfc,0x17,0x9c,0xcc,0xa8,0xb2,0xd4,0xe8,0x7,0x23,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
};
static const unsigned char vslider_grabber_hl_png[]={
-0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0x10,0x0,0x0,0x0,0x10,0x8,0x6,0x0,0x0,0x0,0x1f,0xf3,0xff,0x61,0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0x4b,0x0,0x3f,0x0,0x52,0x7c,0x32,0x40,0x52,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xdd,0x9,0x1b,0x16,0x2b,0x3,0x1f,0xae,0x64,0xaf,0x0,0x0,0x0,0x19,0x74,0x45,0x58,0x74,0x43,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x0,0x43,0x72,0x65,0x61,0x74,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x47,0x49,0x4d,0x50,0x57,0x81,0xe,0x17,0x0,0x0,0x1,0xac,0x49,0x44,0x41,0x54,0x38,0xcb,0xc5,0x93,0xb1,0x6f,0xd3,0x40,0x14,0x87,0xbf,0x77,0x8e,0x5d,0x9c,0xc4,0x55,0xe3,0x10,0x43,0x4c,0xa1,0x44,0xa8,0x42,0xe2,0xf,0x88,0xba,0xc0,0x82,0x18,0x60,0x86,0xad,0xb,0x4b,0x25,0x56,0x58,0xda,0x95,0xa5,0x5d,0x60,0x42,0xea,0xc2,0x80,0xd4,0xad,0x65,0xcf,0xd4,0xa5,0x53,0x55,0x21,0x26,0x14,0x89,0x4a,0x55,0x1c,0x28,0x25,0xd,0x4,0x2a,0x92,0xd6,0xc4,0x86,0x1c,0x4b,0x13,0x1a,0x62,0x60,0xec,0x1b,0x9e,0xee,0x7e,0xa7,0xf7,0xf4,0xdd,0xef,0xdd,0xc1,0x69,0x87,0x94,0xcb,0x65,0x0,0x82,0x20,0x18,0x88,0xb3,0x77,0xe6,0xae,0xaf,0x56,0x56,0x36,0xfe,0x51,0xd7,0x0,0x96,0x23,0x1d,0x3e,0x96,0x9b,0x33,0xb7,0x1,0x58,0xdf,0xac,0xe0,0x79,0x1e,0x96,0xd8,0x77,0x8d,0x54,0x6a,0xad,0x78,0xf6,0x2,0x9e,0x7b,0x1e,0x11,0x41,0x44,0xa1,0xc,0x41,0x9,0x58,0xa6,0x4d,0x6e,0xdc,0xe5,0xd5,0x9b,0x4d,0x3e,0xec,0xbf,0xbb,0x6f,0x14,0x7c,0x97,0x48,0x87,0xc4,0x71,0x8c,0x25,0xf6,0x43,0xd3,0x34,0x9f,0x4f,0xf9,0x57,0xc8,0x39,0xee,0x71,0xb1,0x20,0xa,0x94,0x6,0x51,0xa,0x10,0xb4,0xd6,0x5c,0x2a,0x5e,0x66,0x3b,0xa8,0xfa,0xaa,0xcf,0x64,0x89,0xbd,0x98,0x3e,0x93,0x79,0x52,0x9a,0x9c,0x26,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0x4e,0x44,0xae,0x42,0x60,0x82
+0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0x10,0x0,0x0,0x0,0x10,0x8,0x6,0x0,0x0,0x0,0x1f,0xf3,0xff,0x61,0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0x92,0x0,0x92,0x0,0x99,0x25,0xc1,0x88,0x71,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xde,0x9,0x12,0x0,0x2,0x21,0x6d,0xbf,0x58,0x46,0x0,0x0,0x0,0x19,0x74,0x45,0x58,0x74,0x43,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x0,0x43,0x72,0x65,0x61,0x74,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x47,0x49,0x4d,0x50,0x57,0x81,0xe,0x17,0x0,0x0,0x1,0x30,0x49,0x44,0x41,0x54,0x38,0x8d,0xa5,0x93,0xb1,0x6a,0xc2,0x50,0x14,0x86,0xbf,0x63,0xe2,0x90,0xd0,0x2e,0xc1,0xad,0x8b,0xad,0x60,0x9e,0xc0,0xbe,0x41,0x7,0x33,0x38,0x7,0x1d,0xba,0x74,0x2a,0xe8,0xc3,0xe8,0x68,0xc1,0x49,0xc8,0xec,0x10,0x9f,0xa1,0x8,0xee,0x71,0xcf,0x52,0x4d,0x70,0x73,0x8a,0xb7,0x83,0x37,0x72,0x11,0xb4,0xa1,0xfe,0xe3,0xe5,0x7c,0xdf,0xbd,0x1c,0xfe,0xb,0x77,0x46,0x2e,0xf,0x7c,0xdf,0x7f,0x2,0x86,0x40,0x17,0x68,0xeb,0xe3,0xd,0xb0,0x4,0x26,0x49,0x92,0xa4,0x57,0x5,0xbe,0xef,0x7f,0x0,0xe3,0x30,0x1c,0x38,0x9e,0xd7,0x40,0xa4,0x6,0x80,0x52,0x47,0xf2,0x7c,0x47,0x14,0xcd,0xf,0xc0,0x28,0x49,0x92,0xaf,0x92,0xb1,0x4c,0xb8,0xd9,0x7c,0x9e,0xf6,0xfb,0xef,0x75,0xd7,0x7d,0xd4,0xb0,0x0,0x82,0x48,0xd,0xd7,0x7d,0xa0,0xd3,0x79,0xad,0x6f,0xb7,0x3f,0x3d,0xdb,0xb6,0xd2,0x2c,0xcb,0xd6,0x0,0x35,0xe3,0xd9,0xe3,0x20,0xe8,0x21,0x62,0x71,0x2d,0x22,0x16,0x41,0xd0,0x3,0x18,0x6b,0xe6,0x24,0x0,0x86,0x61,0x38,0x70,0x6e,0xc1,0xa6,0x24,0xc,0x7,0x8e,0xde,0xd3,0x59,0xd0,0xf5,0xbc,0xc6,0x9f,0x70,0x19,0x3d,0xdb,0x35,0x5,0xed,0x72,0x61,0x55,0xa2,0x67,0xdb,0xa6,0xe0,0xdf,0x29,0x5,0x1b,0xa5,0x8e,0x95,0x21,0x3d,0xbb,0x31,0x5,0xcb,0x3c,0xdf,0x55,0x16,0xe8,0xd9,0xa5,0x29,0x98,0x44,0xd1,0xfc,0xa0,0x54,0x51,0xe1,0xf6,0xa2,0x2c,0xd4,0xe4,0x2c,0xd0,0xf5,0x1c,0xc5,0xf1,0x82,0x5b,0x12,0xa5,0xa,0xe2,0x78,0x1,0xa7,0x36,0xa6,0x60,0x34,0x31,0xcb,0xb2,0xb5,0x6d,0x5b,0xe9,0x6a,0xf5,0xfd,0xd6,0x6a,0xbd,0xd4,0x1d,0xc7,0x41,0x44,0x34,0x78,0x24,0xcf,0xb7,0xcc,0x66,0xd3,0xc3,0x7e,0xbf,0xff,0x34,0xab,0x7c,0xf7,0x67,0xba,0x3b,0xbf,0x4d,0x78,0x75,0x34,0x1f,0x21,0x5d,0xa6,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
};
static const unsigned char vslider_tick_png[]={
-0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0x10,0x0,0x0,0x0,0x4,0x8,0x6,0x0,0x0,0x0,0x87,0xb4,0xbf,0xec,0x0,0x0,0x0,0x1,0x73,0x52,0x47,0x42,0x0,0xae,0xce,0x1c,0xe9,0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0xff,0x0,0xff,0x0,0xff,0xa0,0xbd,0xa7,0x93,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xdb,0xb,0x4,0x17,0x21,0x6,0x30,0xa,0xe5,0x29,0x0,0x0,0x0,0x46,0x49,0x44,0x41,0x54,0x18,0xd3,0x63,0x60,0xa0,0x10,0x30,0xb6,0xd7,0xd6,0x56,0x72,0x73,0x73,0x33,0x70,0x73,0x73,0x33,0x3c,0xe1,0x97,0x6a,0xe7,0xe6,0xe2,0x66,0x28,0x9,0xf1,0xc0,0xaa,0xd8,0x22,0x34,0x9e,0x41,0xfa,0xcb,0x6b,0x43,0x13,0x13,0x63,0xf,0x98,0x1e,0x96,0x33,0x67,0xce,0xee,0x80,0x29,0x78,0xca,0x23,0x4a,0x8c,0xa5,0xaf,0x91,0xf5,0x50,0xc,0x0,0x35,0x9a,0x11,0x6d,0xa1,0xf1,0x5c,0x24,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
+0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0x10,0x0,0x0,0x0,0x4,0x8,0x6,0x0,0x0,0x0,0x87,0xb4,0xbf,0xec,0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0xff,0x0,0xff,0x0,0xff,0xa0,0xbd,0xa7,0x93,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xde,0x9,0xf,0x14,0x28,0x1f,0x7a,0xe9,0xd,0x2b,0x0,0x0,0x0,0x46,0x49,0x44,0x41,0x54,0x18,0x95,0x63,0x60,0xa0,0x10,0x30,0x36,0x35,0x35,0x55,0x72,0x73,0x73,0x33,0x70,0x73,0x73,0x33,0xbc,0xe4,0x12,0x6d,0xe7,0xe6,0xe2,0x66,0x28,0x9,0xf1,0xc0,0xaa,0xd8,0x22,0x34,0x9e,0x41,0xec,0xe7,0x7b,0x43,0x13,0x13,0x13,0xf,0x98,0x1e,0x96,0x33,0x67,0xce,0xec,0x80,0x29,0x78,0xc5,0x2e,0x48,0x8c,0xa5,0xaf,0x91,0xf5,0x50,0xc,0x0,0x36,0xc,0x11,0x6c,0x6d,0xa6,0x47,0xcd,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
};
static const unsigned char vsplit_bg_png[]={
-0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0x8,0x0,0x0,0x0,0x8,0x8,0x6,0x0,0x0,0x0,0xc4,0xf,0xbe,0x8b,0x0,0x0,0x0,0x1,0x73,0x52,0x47,0x42,0x0,0xae,0xce,0x1c,0xe9,0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0x3b,0x0,0x36,0x0,0x38,0x27,0x56,0x13,0x54,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xdb,0xc,0x1b,0x3,0x20,0x0,0x61,0x7,0xe1,0x28,0x0,0x0,0x0,0x19,0x74,0x45,0x58,0x74,0x43,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x0,0x43,0x72,0x65,0x61,0x74,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x47,0x49,0x4d,0x50,0x57,0x81,0xe,0x17,0x0,0x0,0x0,0x7b,0x49,0x44,0x41,0x54,0x18,0xd3,0x4d,0x8c,0xc1,0xe,0xc2,0x30,0x14,0xc3,0x1c,0xe8,0x6f,0x22,0x2e,0xfc,0xbf,0x34,0xa4,0x6d,0x54,0xcd,0x6b,0x38,0x6c,0x82,0xf9,0x92,0x83,0x23,0xeb,0xf5,0x78,0xa6,0x7f,0x3a,0x21,0x48,0xe2,0x20,0x80,0x58,0xd7,0x95,0xb6,0x2c,0x6f,0x5c,0x86,0x5c,0xe,0x87,0x67,0xdb,0x76,0x9a,0x4,0x55,0x86,0x8,0x94,0xff,0x22,0x1c,0xd3,0x5c,0x13,0xbb,0xce,0xb4,0x90,0x72,0x4,0x2,0x35,0x43,0xb3,0x7,0x55,0x75,0xea,0x5f,0x9d,0x0,0x99,0xa1,0x55,0x15,0xbe,0x1c,0xae,0x4c,0x9b,0xe6,0x2a,0x66,0x99,0x20,0x8,0xe8,0x18,0x0,0x86,0x4d,0xeb,0xfd,0xc3,0xbe,0x77,0x44,0xb8,0xdd,0xee,0xff,0x3e,0x61,0x8c,0xc1,0x17,0xf5,0xc0,0x57,0xfd,0xb2,0x2f,0x89,0xfc,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
+0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0x8,0x0,0x0,0x0,0x8,0x8,0x6,0x0,0x0,0x0,0xc4,0xf,0xbe,0x8b,0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0xff,0x0,0xff,0x0,0xff,0xa0,0xbd,0xa7,0x93,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xde,0x9,0x14,0xd,0x13,0x1b,0xd5,0xd9,0x6e,0x6b,0x0,0x0,0x0,0x19,0x74,0x45,0x58,0x74,0x43,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x0,0x43,0x72,0x65,0x61,0x74,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x47,0x49,0x4d,0x50,0x57,0x81,0xe,0x17,0x0,0x0,0x0,0x15,0x49,0x44,0x41,0x54,0x18,0x95,0x63,0x54,0x57,0xd7,0xfc,0xcf,0x80,0x7,0x30,0xe1,0x93,0x1c,0x3e,0xa,0x0,0x86,0x1b,0x1,0x86,0x56,0xb4,0xba,0xe,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
};
static const unsigned char vsplitter_png[]={
-0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0x40,0x0,0x0,0x0,0x8,0x8,0x6,0x0,0x0,0x0,0x49,0x62,0xf9,0xdf,0x0,0x0,0x0,0x1,0x73,0x52,0x47,0x42,0x0,0xae,0xce,0x1c,0xe9,0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0xff,0x0,0xff,0x0,0xff,0xa0,0xbd,0xa7,0x93,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xdb,0xc,0x18,0xf,0x2c,0x3,0x4f,0x14,0xa9,0x14,0x0,0x0,0x0,0x19,0x74,0x45,0x58,0x74,0x43,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x0,0x43,0x72,0x65,0x61,0x74,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x47,0x49,0x4d,0x50,0x57,0x81,0xe,0x17,0x0,0x0,0x0,0x36,0x49,0x44,0x41,0x54,0x48,0xc7,0x63,0x60,0x18,0x5,0xc,0xc,0xcb,0x66,0xcd,0xf9,0x9f,0x1d,0x9f,0xf4,0x7f,0x24,0xf2,0x99,0x18,0x18,0x18,0x18,0x8e,0x1e,0x3d,0xc6,0x70,0xf9,0xe6,0x75,0x78,0x80,0x8c,0x34,0xfe,0x28,0x18,0x2d,0x3,0x46,0xcb,0x80,0xd1,0x32,0x60,0xc4,0x2,0x0,0x41,0x33,0x3b,0x34,0xfe,0xbe,0xf2,0x77,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
+0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0x40,0x0,0x0,0x0,0x8,0x8,0x6,0x0,0x0,0x0,0x49,0x62,0xf9,0xdf,0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0xff,0x0,0xff,0x0,0xff,0xa0,0xbd,0xa7,0x93,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xde,0x9,0xf,0x14,0x27,0x31,0x21,0xa7,0x1c,0x2b,0x0,0x0,0x0,0x19,0x74,0x45,0x58,0x74,0x43,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x0,0x43,0x72,0x65,0x61,0x74,0x65,0x64,0x20,0x77,0x69,0x74,0x68,0x20,0x47,0x49,0x4d,0x50,0x57,0x81,0xe,0x17,0x0,0x0,0x0,0x38,0x49,0x44,0x41,0x54,0x48,0x89,0x63,0x60,0x18,0x5,0xc,0xc,0xb,0x16,0x2c,0xf8,0x9f,0x9a,0x9a,0xfa,0x7f,0x24,0xf2,0x99,0x18,0x18,0x18,0x18,0x8e,0x1e,0x3d,0xca,0x70,0xed,0xda,0x35,0x78,0x80,0x8c,0x34,0xfe,0x28,0x18,0xf1,0x60,0x30,0xe5,0x49,0x7a,0xf3,0x47,0xcb,0x80,0x91,0xe,0x0,0x53,0x40,0x3b,0xd4,0x11,0xa7,0x10,0x39,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
};
diff --git a/scene/resources/default_theme/toggle_off.png b/scene/resources/default_theme/toggle_off.png
index d5809cd72b..3e92aa0ece 100644
--- a/scene/resources/default_theme/toggle_off.png
+++ b/scene/resources/default_theme/toggle_off.png
Binary files differ
diff --git a/scene/resources/default_theme/toggle_on.png b/scene/resources/default_theme/toggle_on.png
index 692e03b01d..a49c234f51 100644
--- a/scene/resources/default_theme/toggle_on.png
+++ b/scene/resources/default_theme/toggle_on.png
Binary files differ
diff --git a/scene/resources/default_theme/tooltip_bg.png b/scene/resources/default_theme/tooltip_bg.png
index c61169f7fc..c5eb502ace 100644
--- a/scene/resources/default_theme/tooltip_bg.png
+++ b/scene/resources/default_theme/tooltip_bg.png
Binary files differ
diff --git a/scene/resources/default_theme/tree_bg.png b/scene/resources/default_theme/tree_bg.png
index e16317d348..6b9c9b4f8d 100644
--- a/scene/resources/default_theme/tree_bg.png
+++ b/scene/resources/default_theme/tree_bg.png
Binary files differ
diff --git a/scene/resources/default_theme/tree_title.png b/scene/resources/default_theme/tree_title.png
index 7104085467..e7a158b961 100644
--- a/scene/resources/default_theme/tree_title.png
+++ b/scene/resources/default_theme/tree_title.png
Binary files differ
diff --git a/scene/resources/default_theme/tree_title_pressed.png b/scene/resources/default_theme/tree_title_pressed.png
index ffba8e8fb1..82b49cdd2f 100644
--- a/scene/resources/default_theme/tree_title_pressed.png
+++ b/scene/resources/default_theme/tree_title_pressed.png
Binary files differ
diff --git a/scene/resources/default_theme/unchecked.png b/scene/resources/default_theme/unchecked.png
index 65b9ba4d23..39a70e6003 100644
--- a/scene/resources/default_theme/unchecked.png
+++ b/scene/resources/default_theme/unchecked.png
Binary files differ
diff --git a/scene/resources/default_theme/updown.png b/scene/resources/default_theme/updown.png
index 8d4189cf1c..a5ca1212e0 100644
--- a/scene/resources/default_theme/updown.png
+++ b/scene/resources/default_theme/updown.png
Binary files differ
diff --git a/scene/resources/default_theme/vscroll_bg.png b/scene/resources/default_theme/vscroll_bg.png
deleted file mode 100644
index 18b79553b7..0000000000
--- a/scene/resources/default_theme/vscroll_bg.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/vscroll_bg_focus.png b/scene/resources/default_theme/vscroll_bg_focus.png
deleted file mode 100644
index 30abdd0c98..0000000000
--- a/scene/resources/default_theme/vscroll_bg_focus.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/vscroll_grabber.png b/scene/resources/default_theme/vscroll_grabber.png
deleted file mode 100644
index 81c9c58064..0000000000
--- a/scene/resources/default_theme/vscroll_grabber.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/vscroll_grabber_hl.png b/scene/resources/default_theme/vscroll_grabber_hl.png
deleted file mode 100644
index a0cfa37ae1..0000000000
--- a/scene/resources/default_theme/vscroll_grabber_hl.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/vslider_bg.png b/scene/resources/default_theme/vslider_bg.png
index d184e87aa4..5472bb366f 100644
--- a/scene/resources/default_theme/vslider_bg.png
+++ b/scene/resources/default_theme/vslider_bg.png
Binary files differ
diff --git a/scene/resources/default_theme/vslider_grabber.png b/scene/resources/default_theme/vslider_grabber.png
index dfb9578d5e..988c25d9dd 100644
--- a/scene/resources/default_theme/vslider_grabber.png
+++ b/scene/resources/default_theme/vslider_grabber.png
Binary files differ
diff --git a/scene/resources/default_theme/vslider_grabber_hl.png b/scene/resources/default_theme/vslider_grabber_hl.png
index 2c8e414b6f..f319df3319 100644
--- a/scene/resources/default_theme/vslider_grabber_hl.png
+++ b/scene/resources/default_theme/vslider_grabber_hl.png
Binary files differ
diff --git a/scene/resources/default_theme/vslider_tick.png b/scene/resources/default_theme/vslider_tick.png
index 17980a858c..76c5870dbc 100644
--- a/scene/resources/default_theme/vslider_tick.png
+++ b/scene/resources/default_theme/vslider_tick.png
Binary files differ
diff --git a/scene/resources/default_theme/vsplit_bg.png b/scene/resources/default_theme/vsplit_bg.png
index 353ff8960c..f4e1715447 100644
--- a/scene/resources/default_theme/vsplit_bg.png
+++ b/scene/resources/default_theme/vsplit_bg.png
Binary files differ
diff --git a/scene/resources/default_theme/vsplitter.png b/scene/resources/default_theme/vsplitter.png
index 255995fdb4..4a9904a3ec 100644
--- a/scene/resources/default_theme/vsplitter.png
+++ b/scene/resources/default_theme/vsplitter.png
Binary files differ
diff --git a/scene/resources/environment.cpp b/scene/resources/environment.cpp
index df18e4f0f5..3c4bc3ac75 100644
--- a/scene/resources/environment.cpp
+++ b/scene/resources/environment.cpp
@@ -111,7 +111,7 @@ void Environment::_bind_methods() {
ADD_PROPERTY( PropertyInfo(Variant::INT,"background/mode",PROPERTY_HINT_ENUM,"Keep,Default Color,Color,Texture,Cubemap,Texture RGBE,Cubemap RGBE"),_SCS("set_background"),_SCS("get_background"));
ADD_PROPERTYI( PropertyInfo(Variant::COLOR,"background/color"),_SCS("set_background_param"),_SCS("get_background_param"), BG_PARAM_COLOR);
ADD_PROPERTYI( PropertyInfo(Variant::OBJECT,"background/texture",PROPERTY_HINT_RESOURCE_TYPE,"Texture"),_SCS("set_background_param"),_SCS("get_background_param"), BG_PARAM_TEXTURE);
- ADD_PROPERTYI( PropertyInfo(Variant::OBJECT,"background/cubemap",PROPERTY_HINT_RESOURCE_TYPE,"Texture"),_SCS("set_background_param"),_SCS("get_background_param"), BG_PARAM_CUBEMAP);
+ ADD_PROPERTYI( PropertyInfo(Variant::OBJECT,"background/cubemap",PROPERTY_HINT_RESOURCE_TYPE,"CubeMap"),_SCS("set_background_param"),_SCS("get_background_param"), BG_PARAM_CUBEMAP);
ADD_PROPERTYI( PropertyInfo(Variant::REAL,"background/energy",PROPERTY_HINT_RANGE,"0,128,0.01"),_SCS("set_background_param"),_SCS("get_background_param"), BG_PARAM_ENERGY);
ADD_PROPERTYI( PropertyInfo(Variant::REAL,"background/scale",PROPERTY_HINT_RANGE,"0.001,16,0.001"),_SCS("set_background_param"),_SCS("get_background_param"), BG_PARAM_SCALE);
ADD_PROPERTYI( PropertyInfo(Variant::REAL,"background/glow",PROPERTY_HINT_RANGE,"0.00,8,0.01"),_SCS("set_background_param"),_SCS("get_background_param"), BG_PARAM_GLOW);
diff --git a/scene/resources/material.cpp b/scene/resources/material.cpp
index faba339fe1..08c752cff9 100644
--- a/scene/resources/material.cpp
+++ b/scene/resources/material.cpp
@@ -467,10 +467,20 @@ bool ShaderMaterial::_set(const StringName& p_name, const Variant& p_value) {
return true;
} else {
- String n = p_name;
- if (n.begins_with("param/")) {
- VisualServer::get_singleton()->material_set_param(material,String(n.ptr()+6),p_value);
- return true;
+ if (shader.is_valid()) {
+
+
+ StringName pr = shader->remap_param(p_name);
+ if (!pr) {
+ String n = p_name;
+ if (n.find("param/")==0) { //backwards compatibility
+ pr = n.substr(6,n.length());
+ }
+ }
+ if (pr) {
+ VisualServer::get_singleton()->material_set_param(material,pr,p_value);
+ return true;
+ }
}
}
@@ -486,10 +496,13 @@ bool ShaderMaterial::_get(const StringName& p_name,Variant &r_ret) const {
return true;
} else {
- String n = p_name;
- if (n.begins_with("param/")) {
- r_ret=VisualServer::get_singleton()->material_get_param(material,String(n.ptr()+6));
- return true;
+ if (shader.is_valid()) {
+
+ StringName pr = shader->remap_param(p_name);
+ if (pr) {
+ r_ret=VisualServer::get_singleton()->material_get_param(material,pr);
+ return true;
+ }
}
}
@@ -569,7 +582,7 @@ void ShaderMaterial::get_argument_options(const StringName& p_function,int p_idx
List<PropertyInfo> pl;
shader->get_param_list(&pl);
for (List<PropertyInfo>::Element *E=pl.front();E;E=E->next()) {
- r_options->push_back(E->get().name);
+ r_options->push_back("\""+E->get().name.replace("shader_param/","")+"\"");
}
}
}
@@ -583,115 +596,3 @@ ShaderMaterial::ShaderMaterial() :Material(VisualServer::get_singleton()->materi
/////////////////////////////////
-
-void ParticleSystemMaterial::_bind_methods() {
-
- ObjectTypeDB::bind_method(_MD("set_texture","texture"),&ParticleSystemMaterial::set_texture);
- ObjectTypeDB::bind_method(_MD("get_texture:Texture"),&ParticleSystemMaterial::get_texture);
-
- ADD_PROPERTY( PropertyInfo( Variant::OBJECT, "texture", PROPERTY_HINT_RESOURCE_TYPE,"Texture" ), _SCS("set_texture"), _SCS("get_texture"));
-
-}
-
-void ParticleSystemMaterial::set_texture(const Ref<Texture>& p_texture) {
- texture=p_texture;
- RID rid;
- if (texture.is_valid())
- rid=texture->get_rid();
-
- VS::get_singleton()->fixed_material_set_texture(material,VS::FIXED_MATERIAL_PARAM_DIFFUSE,rid);
-}
-
-Ref<Texture> ParticleSystemMaterial::get_texture() const {
-
- return texture;
-}
-
-
-ParticleSystemMaterial::ParticleSystemMaterial() :Material(VisualServer::get_singleton()->fixed_material_create()){
-
- set_flag(FLAG_DOUBLE_SIDED,true);
- set_flag(FLAG_UNSHADED,true);
- set_depth_draw_mode(DEPTH_DRAW_NEVER);
- VisualServer::get_singleton()->fixed_material_set_flag(material,VS::FIXED_MATERIAL_FLAG_USE_ALPHA,true);
- VisualServer::get_singleton()->fixed_material_set_flag(material,VS::FIXED_MATERIAL_FLAG_USE_COLOR_ARRAY,true);
- set_flag(FLAG_COLOR_ARRAY_SRGB,true);
-
-}
-
-ParticleSystemMaterial::~ParticleSystemMaterial() {
-
-
-}
-
-//////////////////////////////
-
-
-
-void UnshadedMaterial::_bind_methods() {
-
- ObjectTypeDB::bind_method(_MD("set_texture","texture"),&UnshadedMaterial::set_texture);
- ObjectTypeDB::bind_method(_MD("get_texture:Texture"),&UnshadedMaterial::get_texture);
-
- ObjectTypeDB::bind_method(_MD("set_use_alpha","enable"),&UnshadedMaterial::set_use_alpha);
- ObjectTypeDB::bind_method(_MD("is_using_alpha"),&UnshadedMaterial::is_using_alpha);
-
- ObjectTypeDB::bind_method(_MD("set_use_color_array","enable"),&UnshadedMaterial::set_use_color_array);
- ObjectTypeDB::bind_method(_MD("is_using_color_array"),&UnshadedMaterial::is_using_color_array);
-
- ADD_PROPERTY( PropertyInfo( Variant::OBJECT, "texture", PROPERTY_HINT_RESOURCE_TYPE,"Texture" ), _SCS("set_texture"), _SCS("get_texture"));
- ADD_PROPERTY( PropertyInfo( Variant::BOOL, "alpha" ), _SCS("set_use_alpha"), _SCS("is_using_alpha"));
- ADD_PROPERTY( PropertyInfo( Variant::BOOL, "color_array" ), _SCS("set_use_color_array"), _SCS("is_using_color_array"));
-
-}
-
-void UnshadedMaterial::set_texture(const Ref<Texture>& p_texture) {
- RID rid;
- if (texture.is_valid())
- rid=texture->get_rid();
-
- VS::get_singleton()->fixed_material_set_texture(material,VS::FIXED_MATERIAL_PARAM_DIFFUSE,rid);
-}
-Ref<Texture> UnshadedMaterial::get_texture() const {
-
- return texture;
-}
-
-void UnshadedMaterial::set_use_alpha(bool p_use_alpha) {
-
- alpha=p_use_alpha;
- VS::get_singleton()->fixed_material_set_flag(material,VS::FIXED_MATERIAL_FLAG_USE_ALPHA,p_use_alpha);
- //set_depth_draw_mode();
- //set_hint(HINT,p_use_alpha);
-
-}
-
-bool UnshadedMaterial::is_using_alpha() const{
-
- return alpha;
-}
-
-void UnshadedMaterial::set_use_color_array(bool p_use_color_array){
-
- color_array=p_use_color_array;
- VS::get_singleton()->fixed_material_set_flag(material,VS::FIXED_MATERIAL_FLAG_USE_COLOR_ARRAY,p_use_color_array);
-
-}
-
-bool UnshadedMaterial::is_using_color_array() const{
-
- return color_array;
-}
-
-UnshadedMaterial::UnshadedMaterial() :Material(VisualServer::get_singleton()->fixed_material_create()){
-
- set_flag(FLAG_UNSHADED,true);
- set_use_alpha(true);
- set_flag(FLAG_COLOR_ARRAY_SRGB,true);
-
-}
-
-UnshadedMaterial::~UnshadedMaterial() {
-
-
-}
diff --git a/scene/resources/material.h b/scene/resources/material.h
index 2b10078e16..73d1a4e188 100644
--- a/scene/resources/material.h
+++ b/scene/resources/material.h
@@ -253,68 +253,6 @@ public:
-class ParticleSystemMaterial : public Material {
-
- OBJ_TYPE( ParticleSystemMaterial, Material );
- REVERSE_GET_PROPERTY_LIST
-
-private:
-
-
-
- Ref<Texture> texture;
-
-protected:
-
-
- static void _bind_methods();
-
-public:
-
- void set_texture(const Ref<Texture>& p_texture);
- Ref<Texture> get_texture() const;
-
-
- ParticleSystemMaterial();
- ~ParticleSystemMaterial();
-
-};
-
-///////////////////////////////////////////
-
-
-class UnshadedMaterial : public Material {
-
- OBJ_TYPE( UnshadedMaterial, Material );
- REVERSE_GET_PROPERTY_LIST
-
-private:
-
-
- bool alpha;
- bool color_array;
- Ref<Texture> texture;
-
-protected:
-
-
- static void _bind_methods();
-
-public:
-
- void set_texture(const Ref<Texture>& p_texture);
- Ref<Texture> get_texture() const;
-
- void set_use_alpha(bool p_use_alpha);
- bool is_using_alpha() const;
-
- void set_use_color_array(bool p_use_color_array);
- bool is_using_color_array() const;
-
- UnshadedMaterial();
- ~UnshadedMaterial();
-
-};
#endif
diff --git a/scene/resources/shader.cpp b/scene/resources/shader.cpp
index e47b2432f2..42251124bd 100644
--- a/scene/resources/shader.cpp
+++ b/scene/resources/shader.cpp
@@ -84,7 +84,7 @@ void Shader::get_param_list(List<PropertyInfo> *p_params) const {
for(List<PropertyInfo>::Element *E=local.front();E;E=E->next()) {
PropertyInfo pi=E->get();
- pi.name="param/"+pi.name;
+ pi.name="shader_param/"+pi.name;
params_cache[pi.name]=E->get().name;
if (p_params) {
@@ -144,10 +144,13 @@ void Shader::_set_code(const Dictionary& p_string) {
void Shader::set_default_texture_param(const StringName& p_param,const Ref<Texture>& p_texture) {
- if (p_texture.is_valid())
+ if (p_texture.is_valid()) {
default_textures[p_param]=p_texture;
- else
+ VS::get_singleton()->shader_set_default_texture_param(shader,p_param,p_texture->get_rid());
+ } else {
default_textures.erase(p_param);
+ VS::get_singleton()->shader_set_default_texture_param(shader,p_param,RID());
+ }
}
Ref<Texture> Shader::get_default_texture_param(const StringName& p_param) const{
diff --git a/scene/resources/shader.h b/scene/resources/shader.h
index 8c15ca43d4..4a380d455b 100644
--- a/scene/resources/shader.h
+++ b/scene/resources/shader.h
@@ -80,6 +80,16 @@ public:
Ref<Texture> get_default_texture_param(const StringName& p_param) const;
void get_default_texture_param_list(List<StringName>* r_textures) const;
+ _FORCE_INLINE_ StringName remap_param(const StringName& p_param) const {
+ if (params_cache_dirty)
+ get_param_list(NULL);
+
+ const Map<StringName,StringName>::Element *E=params_cache.find(p_param);
+ if (E)
+ return E->get();
+ return StringName();
+ }
+
virtual RID get_rid() const;
Shader(Mode p_mode);
@@ -98,6 +108,15 @@ public:
MaterialShader() : Shader(MODE_MATERIAL) {};
};
+class CanvasItemShader : public Shader {
+
+ OBJ_TYPE(CanvasItemShader,Shader);
+
+public:
+
+ CanvasItemShader() : Shader(MODE_CANVAS_ITEM) {};
+};
+
class ResourceFormatLoaderShader : public ResourceFormatLoader {
diff --git a/scene/resources/shader_graph.cpp b/scene/resources/shader_graph.cpp
index a06a70be9f..b0d9ceee0e 100644
--- a/scene/resources/shader_graph.cpp
+++ b/scene/resources/shader_graph.cpp
@@ -27,8 +27,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#include "shader_graph.h"
-
-
+#include "scene/scene_string_names.h"
Array ShaderGraph::_get_node_list(ShaderType p_type) const {
@@ -57,6 +56,91 @@ Array ShaderGraph::_get_connections(ShaderType p_type) const {
return arr;
}
+void ShaderGraph::_set_data(const Dictionary &p_data) {
+
+ Dictionary d=p_data;
+ ERR_FAIL_COND(!d.has("shaders"));
+ Array sh=d["shaders"];
+ ERR_FAIL_COND(sh.size()!=3);
+
+ for(int t=0;t<3;t++) {
+ Array data=sh[t];
+ ERR_FAIL_COND((data.size()%6)!=0);
+ shader[t].node_map.clear();
+ for(int i=0;i<data.size();i+=6) {
+
+ Node n;
+ n.id=data[i+0];
+ n.type=NodeType(int(data[i+1]));
+ n.pos=data[i+2];
+ n.param1=data[i+3];
+ n.param2=data[i+4];
+
+ Array conns=data[i+5];
+ ERR_FAIL_COND((conns.size()%3)!=0);
+
+ for(int j=0;j<conns.size();j+=3) {
+
+ SourceSlot ss;
+ int ls=conns[j+0];
+ ss.id=conns[j+1];
+ ss.slot=conns[j+2];
+ n.connections[ls]=ss;
+ }
+ shader[t].node_map[n.id]=n;
+
+ }
+ }
+
+ _update_shader();
+
+}
+
+Dictionary ShaderGraph::_get_data() const {
+
+ Array sh;
+ for(int i=0;i<3;i++) {
+ Array data;
+ int ec = shader[i].node_map.size();
+ data.resize(ec*6);
+ int idx=0;
+ for (Map<int,Node>::Element*E=shader[i].node_map.front();E;E=E->next()) {
+
+ data[idx+0]=E->key();
+ data[idx+1]=E->get().type;
+ data[idx+2]=E->get().pos;
+ data[idx+3]=E->get().param1;
+ data[idx+4]=E->get().param2;
+
+ Array conns;
+ conns.resize(E->get().connections.size()*3);
+ int idx2=0;
+ for(Map<int,SourceSlot>::Element*F=E->get().connections.front();F;F=F->next()) {
+
+ conns[idx2+0]=F->key();
+ conns[idx2+1]=F->get().id;
+ conns[idx2+2]=F->get().slot;
+ idx2+=3;
+ }
+ data[idx+5]=conns;
+ idx+=6;
+ }
+ sh.push_back(data);
+ }
+
+ Dictionary data;
+ data["shaders"]=sh;
+ return data;
+}
+
+
+
+ShaderGraph::GraphError ShaderGraph::get_graph_error(ShaderType p_type) const {
+
+ ERR_FAIL_INDEX_V(p_type,3,GRAPH_OK);
+ return shader[p_type].error;
+}
+
void ShaderGraph::_bind_methods() {
ObjectTypeDB::bind_method(_MD("_update_shader"),&ShaderGraph::_update_shader);
@@ -100,9 +184,9 @@ void ShaderGraph::_bind_methods() {
ObjectTypeDB::bind_method(_MD("vec_scalar_op_node_set_op","shader_type","id","op"),&ShaderGraph::vec_scalar_op_node_set_op);
ObjectTypeDB::bind_method(_MD("vec_scalar_op_node_get_op","shader_type","id"),&ShaderGraph::vec_scalar_op_node_get_op);
- ObjectTypeDB::bind_method(_MD("rgb_op_node_set_op","shader_type","id","op","c"),&ShaderGraph::rgb_op_node_set_op);
+ ObjectTypeDB::bind_method(_MD("rgb_op_node_set_op","shader_type","id","op"),&ShaderGraph::rgb_op_node_set_op);
ObjectTypeDB::bind_method(_MD("rgb_op_node_get_op","shader_type","id"),&ShaderGraph::rgb_op_node_get_op);
- ObjectTypeDB::bind_method(_MD("rgb_op_node_get_c","shader_type","id"),&ShaderGraph::rgb_op_node_get_c);
+
ObjectTypeDB::bind_method(_MD("xform_vec_mult_node_set_no_translation","shader_type","id","disable"),&ShaderGraph::xform_vec_mult_node_set_no_translation);
ObjectTypeDB::bind_method(_MD("xform_vec_mult_node_get_no_translation","shader_type","id"),&ShaderGraph::xform_vec_mult_node_get_no_translation);
@@ -137,6 +221,13 @@ void ShaderGraph::_bind_methods() {
ObjectTypeDB::bind_method(_MD("comment_node_set_text","shader_type","id","text"),&ShaderGraph::comment_node_set_text);
ObjectTypeDB::bind_method(_MD("comment_node_get_text","shader_type","id"),&ShaderGraph::comment_node_get_text);
+ ObjectTypeDB::bind_method(_MD("color_ramp_node_set_ramp","shader_type","id","colors","offsets"),&ShaderGraph::color_ramp_node_set_ramp);
+ ObjectTypeDB::bind_method(_MD("color_ramp_node_get_colors","shader_type","id"),&ShaderGraph::color_ramp_node_get_colors);
+ ObjectTypeDB::bind_method(_MD("color_ramp_node_get_offsets","shader_type","id"),&ShaderGraph::color_ramp_node_get_offsets);
+
+ ObjectTypeDB::bind_method(_MD("curve_map_node_set_points","shader_type","id","points"),&ShaderGraph::curve_map_node_set_points);
+ ObjectTypeDB::bind_method(_MD("curve_map_node_get_points","shader_type","id"),&ShaderGraph::curve_map_node_get_points);
+
ObjectTypeDB::bind_method(_MD("connect_node:Error","shader_type","src_id","src_slot","dst_id","dst_slot"),&ShaderGraph::connect_node);
ObjectTypeDB::bind_method(_MD("is_node_connected","shader_type","src_id","src_slot","dst_id","dst_slot"),&ShaderGraph::is_node_connected);
ObjectTypeDB::bind_method(_MD("disconnect_node","shader_type","src_id","src_slot","dst_id","dst_slot"),&ShaderGraph::disconnect_node);
@@ -147,6 +238,11 @@ void ShaderGraph::_bind_methods() {
ObjectTypeDB::bind_method(_MD("node_set_state","shader_type","id","state"),&ShaderGraph::node_set_state);
ObjectTypeDB::bind_method(_MD("node_get_state:var","shader_type","id"),&ShaderGraph::node_get_state);
+ ObjectTypeDB::bind_method(_MD("_set_data"),&ShaderGraph::_set_data);
+ ObjectTypeDB::bind_method(_MD("_get_data"),&ShaderGraph::_get_data);
+
+ ADD_PROPERTY( PropertyInfo(Variant::DICTIONARY,"_data",PROPERTY_HINT_NONE,"",PROPERTY_USAGE_NOEDITOR), _SCS("_set_data"),_SCS("_get_data"));
+
//void get_connections(ShaderType p_which,List<Connection> *p_connections) const;
@@ -174,12 +270,15 @@ void ShaderGraph::_bind_methods() {
BIND_CONSTANT( NODE_XFORM_TO_VEC ); // 3 vec input ); 1 xform output
BIND_CONSTANT( NODE_SCALAR_INTERP ); // scalar interpolation (with optional curve)
BIND_CONSTANT( NODE_VEC_INTERP ); // vec3 interpolation (with optional curve)
+ BIND_CONSTANT( NODE_COLOR_RAMP );
+ BIND_CONSTANT( NODE_CURVE_MAP );
BIND_CONSTANT( NODE_SCALAR_INPUT ); // scalar uniform (assignable in material)
BIND_CONSTANT( NODE_VEC_INPUT ); // vec3 uniform (assignable in material)
BIND_CONSTANT( NODE_RGB_INPUT ); // color uniform (assignable in material)
BIND_CONSTANT( NODE_XFORM_INPUT ); // mat4 uniform (assignable in material)
BIND_CONSTANT( NODE_TEXTURE_INPUT ); // texture input (assignable in material)
BIND_CONSTANT( NODE_CUBEMAP_INPUT ); // cubemap input (assignable in material)
+ BIND_CONSTANT( NODE_DEFAULT_TEXTURE );
BIND_CONSTANT( NODE_OUTPUT ); // output (shader type dependent)
BIND_CONSTANT( NODE_COMMENT ); // comment
BIND_CONSTANT( NODE_TYPE_MAX );
@@ -271,6 +370,8 @@ void ShaderGraph::_bind_methods() {
BIND_CONSTANT( VEC_FUNC_HSV2RGB );
BIND_CONSTANT( VEC_MAX_FUNC );
+ ADD_SIGNAL(MethodInfo("updated"));
+
#if 0
ObjectTypeDB::bind_method(_MD("node_add"),&ShaderGraph::node_add );
@@ -347,7 +448,7 @@ void ShaderGraph::_bind_methods() {
}
-String ShaderGraph::_find_unique_name(ShaderType p_which, const String& p_base) {
+String ShaderGraph::_find_unique_name(const String& p_base) {
@@ -358,15 +459,19 @@ String ShaderGraph::_find_unique_name(ShaderType p_which, const String& p_base)
tocmp+="_"+itos(idx);
}
bool valid=true;
- for (Map<int,Node>::Element *E=shader[p_which].node_map.front();E;E=E->next()) {
- if (E->get().type!=NODE_SCALAR_INPUT && E->get().type!=NODE_VEC_INPUT && E->get().type==NODE_RGB_INPUT && E->get().type==NODE_XFORM_INPUT && E->get().type==NODE_TEXTURE_INPUT && E->get().type==NODE_CUBEMAP_INPUT)
- continue;
- String name = E->get().param1;
- if (name==tocmp) {
- valid=false;
+ for(int i=0;i<3;i++) {
+ if (!valid)
break;
- }
+ for (Map<int,Node>::Element *E=shader[i].node_map.front();E;E=E->next()) {
+ if (E->get().type!=NODE_SCALAR_INPUT && E->get().type!=NODE_VEC_INPUT && E->get().type==NODE_RGB_INPUT && E->get().type==NODE_XFORM_INPUT && E->get().type==NODE_TEXTURE_INPUT && E->get().type==NODE_CUBEMAP_INPUT)
+ continue;
+ String name = E->get().param1;
+ if (name==tocmp) {
+ valid=false;
+ break;
+ }
+ }
}
if (!valid) {
@@ -424,12 +529,15 @@ void ShaderGraph::node_add(ShaderType p_type, NodeType p_node_type,int p_id) {
case NODE_XFORM_TO_VEC: {} break; // 3 scalar input: {} break; 1 vec3 output
case NODE_SCALAR_INTERP: {} break; // scalar interpolation (with optional curve)
case NODE_VEC_INTERP: {} break; // vec3 interpolation (with optional curve)
- case NODE_SCALAR_INPUT: {node.param1=_find_unique_name(p_type,"Scalar"); node.param2=0;} break; // scalar uniform (assignable in material)
- case NODE_VEC_INPUT: {node.param1=_find_unique_name(p_type,"Vec3");node.param2=Vector3();} break; // vec3 uniform (assignable in material)
- case NODE_RGB_INPUT: {node.param1=_find_unique_name(p_type,"Color");node.param2=Color();} break; // color uniform (assignable in material)
- case NODE_XFORM_INPUT: {node.param1=_find_unique_name(p_type,"XForm"); node.param2=Transform();} break; // mat4 uniform (assignable in material)
- case NODE_TEXTURE_INPUT: {node.param1=_find_unique_name(p_type,"Tex"); } break; // texture input (assignable in material)
- case NODE_CUBEMAP_INPUT: {node.param1=_find_unique_name(p_type,"Cube"); } break; // cubemap input (assignable in material)
+ case NODE_COLOR_RAMP: { node.param1=DVector<Color>(); node.param2=DVector<real_t>();} break; // vec3 interpolation (with optional curve)
+ case NODE_CURVE_MAP: { node.param1=DVector<Vector2>();} break; // vec3 interpolation (with optional curve)
+ case NODE_SCALAR_INPUT: {node.param1=_find_unique_name("Scalar"); node.param2=0;} break; // scalar uniform (assignable in material)
+ case NODE_VEC_INPUT: {node.param1=_find_unique_name("Vec3");node.param2=Vector3();} break; // vec3 uniform (assignable in material)
+ case NODE_RGB_INPUT: {node.param1=_find_unique_name("Color");node.param2=Color();} break; // color uniform (assignable in material)
+ case NODE_XFORM_INPUT: {node.param1=_find_unique_name("XForm"); node.param2=Transform();} break; // mat4 uniform (assignable in material)
+ case NODE_TEXTURE_INPUT: {node.param1=_find_unique_name("Tex"); } break; // texture input (assignable in material)
+ case NODE_CUBEMAP_INPUT: {node.param1=_find_unique_name("Cube"); } break; // cubemap input (assignable in material)
+ case NODE_DEFAULT_TEXTURE: {}; break;
case NODE_OUTPUT: {} break; // output (shader type dependent)
case NODE_COMMENT: {} break; // comment
case NODE_TYPE_MAX: {};
@@ -479,7 +587,7 @@ void ShaderGraph::node_remove(ShaderType p_type,int p_id) {
}
shader[p_type].node_map.erase(p_id);
- print_line("erased node, amount left: "+itos(shader[p_type].node_map.size()));
+
_request_update();
}
@@ -545,7 +653,6 @@ bool ShaderGraph::is_node_connected(ShaderType p_type,int p_src_id,int p_src_slo
void ShaderGraph::disconnect_node(ShaderType p_type,int p_src_id,int p_src_slot, int p_dst_id,int p_dst_slot) {
ERR_FAIL_INDEX(p_type,3);
- print_line("** dsisconnect");
SourceSlot ts;
ts.id=p_src_id;
ts.slot=p_src_slot;
@@ -782,14 +889,14 @@ ShaderGraph::VecScalarOp ShaderGraph::vec_scalar_op_node_get_op(ShaderType p_typ
}
-void ShaderGraph::rgb_op_node_set_op(ShaderType p_type,float p_id,RGBOp p_op,float p_c){
+void ShaderGraph::rgb_op_node_set_op(ShaderType p_type,float p_id,RGBOp p_op){
ERR_FAIL_INDEX(p_type,3);
ERR_FAIL_COND(!shader[p_type].node_map.has(p_id));
Node& n = shader[p_type].node_map[p_id];
ERR_FAIL_COND(n.type!=NODE_RGB_OP);
n.param1=p_op;
- n.param2=p_c;
+
_request_update();
}
@@ -803,15 +910,7 @@ ShaderGraph::RGBOp ShaderGraph::rgb_op_node_get_op(ShaderType p_type,float p_id)
return RGBOp(op);
}
-float ShaderGraph::rgb_op_node_get_c(ShaderType p_type,float p_id) const{
- ERR_FAIL_INDEX_V(p_type,3,0);
- ERR_FAIL_COND_V(!shader[p_type].node_map.has(p_id),0);
- const Node& n = shader[p_type].node_map[p_id];
- ERR_FAIL_COND_V(n.type!=NODE_RGB_OP,0);
- return n.param2;
-
-}
void ShaderGraph::xform_vec_mult_node_set_no_translation(ShaderType p_type,int p_id,bool p_no_translation){
@@ -839,7 +938,9 @@ void ShaderGraph::scalar_func_node_set_function(ShaderType p_type,int p_id,Scala
ERR_FAIL_COND(!shader[p_type].node_map.has(p_id));
Node& n = shader[p_type].node_map[p_id];
ERR_FAIL_COND(n.type!=NODE_SCALAR_FUNC);
- n.param1=p_func;
+ int func = p_func;
+ ERR_FAIL_INDEX(func,SCALAR_MAX_FUNC);
+ n.param1=func;
_request_update();
}
@@ -859,7 +960,9 @@ void ShaderGraph::vec_func_node_set_function(ShaderType p_type,int p_id,VecFunc
ERR_FAIL_COND(!shader[p_type].node_map.has(p_id));
Node& n = shader[p_type].node_map[p_id];
ERR_FAIL_COND(n.type!=NODE_VEC_FUNC);
- n.param1=p_func;
+ int func = p_func;
+ ERR_FAIL_INDEX(func,VEC_MAX_FUNC);
+ n.param1=func;
_request_update();
@@ -874,6 +977,59 @@ ShaderGraph::VecFunc ShaderGraph::vec_func_node_get_function(ShaderType p_type,
return VecFunc(func);
}
+void ShaderGraph::color_ramp_node_set_ramp(ShaderType p_type,int p_id,const DVector<Color>& p_colors, const DVector<real_t>& p_offsets){
+
+ ERR_FAIL_INDEX(p_type,3);
+ ERR_FAIL_COND(!shader[p_type].node_map.has(p_id));
+ ERR_FAIL_COND(p_colors.size()!=p_offsets.size());
+ Node& n = shader[p_type].node_map[p_id];
+ n.param1=p_colors;
+ n.param2=p_offsets;
+ _request_update();
+
+}
+
+DVector<Color> ShaderGraph::color_ramp_node_get_colors(ShaderType p_type,int p_id) const{
+
+ ERR_FAIL_INDEX_V(p_type,3,DVector<Color>());
+ ERR_FAIL_COND_V(!shader[p_type].node_map.has(p_id),DVector<Color>());
+ const Node& n = shader[p_type].node_map[p_id];
+ return n.param1;
+
+
+}
+
+DVector<real_t> ShaderGraph::color_ramp_node_get_offsets(ShaderType p_type,int p_id) const{
+
+ ERR_FAIL_INDEX_V(p_type,3,DVector<real_t>());
+ ERR_FAIL_COND_V(!shader[p_type].node_map.has(p_id),DVector<real_t>());
+ const Node& n = shader[p_type].node_map[p_id];
+ return n.param2;
+
+}
+
+
+void ShaderGraph::curve_map_node_set_points(ShaderType p_type,int p_id,const DVector<Vector2>& p_points) {
+
+ ERR_FAIL_INDEX(p_type,3);
+ ERR_FAIL_COND(!shader[p_type].node_map.has(p_id));
+ Node& n = shader[p_type].node_map[p_id];
+ n.param1=p_points;
+ _request_update();
+
+}
+
+DVector<Vector2> ShaderGraph::curve_map_node_get_points(ShaderType p_type,int p_id) const{
+
+ ERR_FAIL_INDEX_V(p_type,3,DVector<Vector2>());
+ ERR_FAIL_COND_V(!shader[p_type].node_map.has(p_id),DVector<Vector2>());
+ const Node& n = shader[p_type].node_map[p_id];
+ return n.param1;
+
+}
+
+
+
void ShaderGraph::input_node_set_name(ShaderType p_type,int p_id,const String& p_name){
ERR_FAIL_INDEX(p_type,3);
@@ -881,8 +1037,9 @@ void ShaderGraph::input_node_set_name(ShaderType p_type,int p_id,const String& p
ERR_FAIL_COND(!p_name.is_valid_identifier());
Node& n = shader[p_type].node_map[p_id];
ERR_FAIL_COND(n.type!=NODE_SCALAR_INPUT && n.type!=NODE_VEC_INPUT && n.type==NODE_RGB_INPUT && n.type==NODE_XFORM_INPUT && n.type==NODE_TEXTURE_INPUT && n.type==NODE_CUBEMAP_INPUT);
+
n.param1="";
- n.param1=_find_unique_name(p_type,p_name);
+ n.param1=_find_unique_name(p_name);
_request_update();
}
@@ -1097,59 +1254,111 @@ ShaderGraph::~ShaderGraph() {
const ShaderGraph::InOutParamInfo ShaderGraph::inout_param_info[]={
//material vertex in
- {MODE_MATERIAL,SHADER_TYPE_VERTEX,"Vertex","SRC_VERTEX",SLOT_TYPE_VEC,SLOT_IN},
- {MODE_MATERIAL,SHADER_TYPE_VERTEX,"Normal","SRC_NORMAL",SLOT_TYPE_VEC,SLOT_IN},
- {MODE_MATERIAL,SHADER_TYPE_VERTEX,"Tangent","SRC_TANGENT",SLOT_TYPE_VEC,SLOT_IN},
- {MODE_MATERIAL,SHADER_TYPE_VERTEX,"BinormalF","SRC_BINORMALF",SLOT_TYPE_SCALAR,SLOT_IN},
- {MODE_MATERIAL,SHADER_TYPE_VERTEX,"WorldMatrix","WORLD_MATRIX",SLOT_TYPE_XFORM,SLOT_IN},
- {MODE_MATERIAL,SHADER_TYPE_VERTEX,"InvCameraMatrix","INV_CAMERA_MATRIX",SLOT_TYPE_XFORM,SLOT_IN},
- {MODE_MATERIAL,SHADER_TYPE_VERTEX,"ProjectionMatrix","PROJECTION_MATRIX",SLOT_TYPE_XFORM,SLOT_IN},
- {MODE_MATERIAL,SHADER_TYPE_VERTEX,"ModelviewMatrix","MODELVIEW_MATRIX",SLOT_TYPE_XFORM,SLOT_IN},
- {MODE_MATERIAL,SHADER_TYPE_VERTEX,"InstanceID","INSTANCE_ID",SLOT_TYPE_SCALAR,SLOT_IN},
- {MODE_MATERIAL,SHADER_TYPE_VERTEX,"Time","TIME",SLOT_TYPE_SCALAR,SLOT_IN},
+ {MODE_MATERIAL,SHADER_TYPE_VERTEX,"Vertex","SRC_VERTEX","",SLOT_TYPE_VEC,SLOT_IN},
+ {MODE_MATERIAL,SHADER_TYPE_VERTEX,"Normal","SRC_NORMAL","",SLOT_TYPE_VEC,SLOT_IN},
+ {MODE_MATERIAL,SHADER_TYPE_VERTEX,"Tangent","SRC_TANGENT","",SLOT_TYPE_VEC,SLOT_IN},
+ {MODE_MATERIAL,SHADER_TYPE_VERTEX,"BinormalF","SRC_BINORMALF","",SLOT_TYPE_SCALAR,SLOT_IN},
+ {MODE_MATERIAL,SHADER_TYPE_VERTEX,"Color","SRC_COLOR","",SLOT_TYPE_VEC,SLOT_IN},
+ {MODE_MATERIAL,SHADER_TYPE_VERTEX,"Alpha","SRC_ALPHA","",SLOT_TYPE_SCALAR,SLOT_IN},
+ {MODE_MATERIAL,SHADER_TYPE_VERTEX,"UV","SRC_UV","",SLOT_TYPE_VEC,SLOT_IN},
+ {MODE_MATERIAL,SHADER_TYPE_VERTEX,"UV2","SRC_UV2","",SLOT_TYPE_VEC,SLOT_IN},
+ {MODE_MATERIAL,SHADER_TYPE_VERTEX,"WorldMatrix","WORLD_MATRIX","",SLOT_TYPE_XFORM,SLOT_IN},
+ {MODE_MATERIAL,SHADER_TYPE_VERTEX,"InvCameraMatrix","INV_CAMERA_MATRIX","",SLOT_TYPE_XFORM,SLOT_IN},
+ {MODE_MATERIAL,SHADER_TYPE_VERTEX,"ProjectionMatrix","PROJECTION_MATRIX","",SLOT_TYPE_XFORM,SLOT_IN},
+ {MODE_MATERIAL,SHADER_TYPE_VERTEX,"ModelviewMatrix","MODELVIEW_MATRIX","",SLOT_TYPE_XFORM,SLOT_IN},
+ {MODE_MATERIAL,SHADER_TYPE_VERTEX,"InstanceID","INSTANCE_ID","",SLOT_TYPE_SCALAR,SLOT_IN},
+
//material vertex out
- {MODE_MATERIAL,SHADER_TYPE_VERTEX,"Vertex","VERTEX",SLOT_TYPE_VEC,SLOT_OUT},
- {MODE_MATERIAL,SHADER_TYPE_VERTEX,"Normal","NORMAL",SLOT_TYPE_VEC,SLOT_OUT},
- {MODE_MATERIAL,SHADER_TYPE_VERTEX,"Tangent","TANGENT",SLOT_TYPE_VEC,SLOT_OUT},
- {MODE_MATERIAL,SHADER_TYPE_VERTEX,"Binormal","BINORMAL",SLOT_TYPE_VEC,SLOT_OUT},
- {MODE_MATERIAL,SHADER_TYPE_VERTEX,"UV","UV",SLOT_TYPE_VEC,SLOT_OUT},
- {MODE_MATERIAL,SHADER_TYPE_VERTEX,"UV2","UV2",SLOT_TYPE_VEC,SLOT_OUT},
- {MODE_MATERIAL,SHADER_TYPE_VERTEX,"Color","COLOR.rgb",SLOT_TYPE_VEC,SLOT_OUT},
- {MODE_MATERIAL,SHADER_TYPE_VERTEX,"Alpha","COLOR.a",SLOT_TYPE_SCALAR,SLOT_OUT},
- {MODE_MATERIAL,SHADER_TYPE_VERTEX,"Var1","VAR1.rgb",SLOT_TYPE_VEC,SLOT_OUT},
- {MODE_MATERIAL,SHADER_TYPE_VERTEX,"Var2","VAR2.rgb",SLOT_TYPE_VEC,SLOT_OUT},
- {MODE_MATERIAL,SHADER_TYPE_VERTEX,"SpecExp","SPEC_EXP",SLOT_TYPE_SCALAR,SLOT_OUT},
- {MODE_MATERIAL,SHADER_TYPE_VERTEX,"PointSize","POINT_SIZE",SLOT_TYPE_SCALAR,SLOT_OUT},
+ {MODE_MATERIAL,SHADER_TYPE_VERTEX,"Vertex","VERTEX","",SLOT_TYPE_VEC,SLOT_OUT},
+ {MODE_MATERIAL,SHADER_TYPE_VERTEX,"Normal","NORMAL","",SLOT_TYPE_VEC,SLOT_OUT},
+ {MODE_MATERIAL,SHADER_TYPE_VERTEX,"Tangent","TANGENT","",SLOT_TYPE_VEC,SLOT_OUT},
+ {MODE_MATERIAL,SHADER_TYPE_VERTEX,"Binormal","BINORMAL","",SLOT_TYPE_VEC,SLOT_OUT},
+ {MODE_MATERIAL,SHADER_TYPE_VERTEX,"UV","UV",".xy",SLOT_TYPE_VEC,SLOT_OUT},
+ {MODE_MATERIAL,SHADER_TYPE_VERTEX,"UV2","UV2",".xy",SLOT_TYPE_VEC,SLOT_OUT},
+ {MODE_MATERIAL,SHADER_TYPE_VERTEX,"Color","COLOR.rgb","",SLOT_TYPE_VEC,SLOT_OUT},
+ {MODE_MATERIAL,SHADER_TYPE_VERTEX,"Alpha","COLOR.a","",SLOT_TYPE_SCALAR,SLOT_OUT},
+ {MODE_MATERIAL,SHADER_TYPE_VERTEX,"Var1","VAR1.rgb","",SLOT_TYPE_VEC,SLOT_OUT},
+ {MODE_MATERIAL,SHADER_TYPE_VERTEX,"Var2","VAR2.rgb","",SLOT_TYPE_VEC,SLOT_OUT},
+ {MODE_MATERIAL,SHADER_TYPE_VERTEX,"SpecExp","SPEC_EXP","",SLOT_TYPE_SCALAR,SLOT_OUT},
+ {MODE_MATERIAL,SHADER_TYPE_VERTEX,"PointSize","POINT_SIZE","",SLOT_TYPE_SCALAR,SLOT_OUT},
//pixel vertex in
- {MODE_MATERIAL,SHADER_TYPE_FRAGMENT,"Vertex","VERTEX",SLOT_TYPE_VEC,SLOT_IN},
- {MODE_MATERIAL,SHADER_TYPE_FRAGMENT,"Position","POSITION",SLOT_TYPE_VEC,SLOT_IN},
- {MODE_MATERIAL,SHADER_TYPE_FRAGMENT,"Normal","IN_NORMAL",SLOT_TYPE_VEC,SLOT_IN},
- {MODE_MATERIAL,SHADER_TYPE_FRAGMENT,"Tangent","TANGENT",SLOT_TYPE_VEC,SLOT_IN},
- {MODE_MATERIAL,SHADER_TYPE_FRAGMENT,"Binormal","BINORMAL",SLOT_TYPE_VEC,SLOT_IN},
- {MODE_MATERIAL,SHADER_TYPE_FRAGMENT,"UV","UV",SLOT_TYPE_VEC,SLOT_IN},
- {MODE_MATERIAL,SHADER_TYPE_FRAGMENT,"UV2","UV2",SLOT_TYPE_VEC,SLOT_IN},
- {MODE_MATERIAL,SHADER_TYPE_FRAGMENT,"UVScreen","SCREEN_UV",SLOT_TYPE_VEC,SLOT_IN},
- {MODE_MATERIAL,SHADER_TYPE_FRAGMENT,"PointCoord","POINT_COORD",SLOT_TYPE_VEC,SLOT_IN},
- {MODE_MATERIAL,SHADER_TYPE_FRAGMENT,"Color","COLOR.rgb",SLOT_TYPE_VEC,SLOT_IN},
- {MODE_MATERIAL,SHADER_TYPE_FRAGMENT,"Alpha","COLOR.a",SLOT_TYPE_SCALAR,SLOT_IN},
- {MODE_MATERIAL,SHADER_TYPE_FRAGMENT,"InvCameraMatrix","INV_CAMERA_MATRIX",SLOT_TYPE_XFORM,SLOT_IN},
- {MODE_MATERIAL,SHADER_TYPE_FRAGMENT,"Time","TIME",SLOT_TYPE_SCALAR,SLOT_IN},
- {MODE_MATERIAL,SHADER_TYPE_FRAGMENT,"Var1","VAR1.rgb",SLOT_TYPE_VEC,SLOT_IN},
- {MODE_MATERIAL,SHADER_TYPE_FRAGMENT,"Var2","VAR2.rgb",SLOT_TYPE_VEC,SLOT_IN},
+ {MODE_MATERIAL,SHADER_TYPE_FRAGMENT,"Vertex","VERTEX","",SLOT_TYPE_VEC,SLOT_IN},
+ {MODE_MATERIAL,SHADER_TYPE_FRAGMENT,"Position","POSITION.xyz","",SLOT_TYPE_VEC,SLOT_IN},
+ {MODE_MATERIAL,SHADER_TYPE_FRAGMENT,"Normal","IN_NORMAL","",SLOT_TYPE_VEC,SLOT_IN},
+ {MODE_MATERIAL,SHADER_TYPE_FRAGMENT,"Tangent","TANGENT","",SLOT_TYPE_VEC,SLOT_IN},
+ {MODE_MATERIAL,SHADER_TYPE_FRAGMENT,"Binormal","BINORMAL","",SLOT_TYPE_VEC,SLOT_IN},
+ {MODE_MATERIAL,SHADER_TYPE_FRAGMENT,"UV","vec3(UV,0);","",SLOT_TYPE_VEC,SLOT_IN},
+ {MODE_MATERIAL,SHADER_TYPE_FRAGMENT,"UV2","UV2","",SLOT_TYPE_VEC,SLOT_IN},
+ {MODE_MATERIAL,SHADER_TYPE_FRAGMENT,"UVScreen","vec3(SCREEN_UV,0)","",SLOT_TYPE_VEC,SLOT_IN},
+ {MODE_MATERIAL,SHADER_TYPE_FRAGMENT,"PointCoord","POINT_COORD","",SLOT_TYPE_VEC,SLOT_IN},
+ {MODE_MATERIAL,SHADER_TYPE_FRAGMENT,"Color","COLOR.rgb","",SLOT_TYPE_VEC,SLOT_IN},
+ {MODE_MATERIAL,SHADER_TYPE_FRAGMENT,"Alpha","COLOR.a","",SLOT_TYPE_SCALAR,SLOT_IN},
+ {MODE_MATERIAL,SHADER_TYPE_FRAGMENT,"InvCameraMatrix","INV_CAMERA_MATRIX","",SLOT_TYPE_XFORM,SLOT_IN},
+ {MODE_MATERIAL,SHADER_TYPE_FRAGMENT,"Var1","VAR1.rgb","",SLOT_TYPE_VEC,SLOT_IN},
+ {MODE_MATERIAL,SHADER_TYPE_FRAGMENT,"Var2","VAR2.rgb","",SLOT_TYPE_VEC,SLOT_IN},
//pixel vertex out
- {MODE_MATERIAL,SHADER_TYPE_FRAGMENT,"Diffuse","DIFFUSE_OUT",SLOT_TYPE_VEC,SLOT_OUT},
- {MODE_MATERIAL,SHADER_TYPE_FRAGMENT,"DiffuseAlpha","ALPHA_OUT",SLOT_TYPE_SCALAR,SLOT_OUT},
- {MODE_MATERIAL,SHADER_TYPE_FRAGMENT,"Specular","SPECULAR",SLOT_TYPE_VEC,SLOT_OUT},
- {MODE_MATERIAL,SHADER_TYPE_FRAGMENT,"SpecularExp","SPECULAR",SLOT_TYPE_SCALAR,SLOT_OUT},
- {MODE_MATERIAL,SHADER_TYPE_FRAGMENT,"Emission","EMISSION",SLOT_TYPE_VEC,SLOT_OUT},
- {MODE_MATERIAL,SHADER_TYPE_FRAGMENT,"Glow","GLOW",SLOT_TYPE_SCALAR,SLOT_OUT},
- {MODE_MATERIAL,SHADER_TYPE_FRAGMENT,"ShadeParam","SHADE_PARAM",SLOT_TYPE_SCALAR,SLOT_OUT},
- {MODE_MATERIAL,SHADER_TYPE_FRAGMENT,"Normal","NORMAL",SLOT_TYPE_VEC,SLOT_OUT},
- {MODE_MATERIAL,SHADER_TYPE_FRAGMENT,"NormalMap","NORMALMAP",SLOT_TYPE_VEC,SLOT_OUT},
- {MODE_MATERIAL,SHADER_TYPE_FRAGMENT,"NormalMapDepth","NORMALMAP_DEPTH",SLOT_TYPE_SCALAR,SLOT_OUT},
- {MODE_MATERIAL,SHADER_TYPE_FRAGMENT,"Discard","DISCARD",SLOT_TYPE_SCALAR,SLOT_OUT},
+ {MODE_MATERIAL,SHADER_TYPE_FRAGMENT,"Diffuse","DIFFUSE_OUT","",SLOT_TYPE_VEC,SLOT_OUT},
+ {MODE_MATERIAL,SHADER_TYPE_FRAGMENT,"DiffuseAlpha","ALPHA_OUT","",SLOT_TYPE_SCALAR,SLOT_OUT},
+ {MODE_MATERIAL,SHADER_TYPE_FRAGMENT,"Specular","SPECULAR","",SLOT_TYPE_VEC,SLOT_OUT},
+ {MODE_MATERIAL,SHADER_TYPE_FRAGMENT,"SpecularExp","SPECULAR","",SLOT_TYPE_SCALAR,SLOT_OUT},
+ {MODE_MATERIAL,SHADER_TYPE_FRAGMENT,"Emission","EMISSION","",SLOT_TYPE_VEC,SLOT_OUT},
+ {MODE_MATERIAL,SHADER_TYPE_FRAGMENT,"Glow","GLOW","",SLOT_TYPE_SCALAR,SLOT_OUT},
+ {MODE_MATERIAL,SHADER_TYPE_FRAGMENT,"ShadeParam","SHADE_PARAM","",SLOT_TYPE_SCALAR,SLOT_OUT},
+ {MODE_MATERIAL,SHADER_TYPE_FRAGMENT,"Normal","NORMAL","",SLOT_TYPE_VEC,SLOT_OUT},
+ {MODE_MATERIAL,SHADER_TYPE_FRAGMENT,"NormalMap","NORMALMAP","",SLOT_TYPE_VEC,SLOT_OUT},
+ {MODE_MATERIAL,SHADER_TYPE_FRAGMENT,"NormalMapDepth","NORMALMAP_DEPTH","",SLOT_TYPE_SCALAR,SLOT_OUT},
+ {MODE_MATERIAL,SHADER_TYPE_FRAGMENT,"Discard","DISCARD",">0.5",SLOT_TYPE_SCALAR,SLOT_OUT},
+ //light in
+ {MODE_MATERIAL,SHADER_TYPE_LIGHT,"Normal","NORMAL","",SLOT_TYPE_VEC,SLOT_IN},
+ {MODE_MATERIAL,SHADER_TYPE_LIGHT,"LightDir","LIGHT_DIR","",SLOT_TYPE_VEC,SLOT_IN},
+ {MODE_MATERIAL,SHADER_TYPE_LIGHT,"LightDiffuse","LIGHT_DIFFUSE","",SLOT_TYPE_VEC,SLOT_IN},
+ {MODE_MATERIAL,SHADER_TYPE_LIGHT,"LightSpecular","LIGHT_SPECULAR","",SLOT_TYPE_VEC,SLOT_IN},
+ {MODE_MATERIAL,SHADER_TYPE_LIGHT,"EyeVec","EYE_VEC","",SLOT_TYPE_VEC,SLOT_IN},
+ {MODE_MATERIAL,SHADER_TYPE_LIGHT,"Diffuse","DIFFUSE","",SLOT_TYPE_VEC,SLOT_IN},
+ {MODE_MATERIAL,SHADER_TYPE_LIGHT,"Specular","SPECULAR","",SLOT_TYPE_VEC,SLOT_IN},
+ {MODE_MATERIAL,SHADER_TYPE_LIGHT,"SpecExp","SPECULAR_EXP","",SLOT_TYPE_SCALAR,SLOT_IN},
+ {MODE_MATERIAL,SHADER_TYPE_LIGHT,"ShadeParam","SHADE_PARAM","",SLOT_TYPE_SCALAR,SLOT_IN},
+ //light out
+ {MODE_MATERIAL,SHADER_TYPE_LIGHT,"Light","LIGHT","",SLOT_TYPE_VEC,SLOT_OUT},
+ //canvas item vertex in
+ {MODE_CANVAS_ITEM,SHADER_TYPE_VERTEX,"Vertex","vec3(SRC_VERTEX,0)","",SLOT_TYPE_VEC,SLOT_IN},
+ {MODE_CANVAS_ITEM,SHADER_TYPE_VERTEX,"UV","SRC_UV","",SLOT_TYPE_VEC,SLOT_IN},
+ {MODE_CANVAS_ITEM,SHADER_TYPE_VERTEX,"Color","SRC_COLOR.rgb","",SLOT_TYPE_VEC,SLOT_IN},
+ {MODE_CANVAS_ITEM,SHADER_TYPE_VERTEX,"Alpha","SRC_COLOR.a","",SLOT_TYPE_SCALAR,SLOT_IN},
+ {MODE_CANVAS_ITEM,SHADER_TYPE_VERTEX,"WorldMatrix","WORLD_MATRIX","",SLOT_TYPE_XFORM,SLOT_IN},
+ {MODE_CANVAS_ITEM,SHADER_TYPE_VERTEX,"ExtraMatrix","EXTRA_MATRIX","",SLOT_TYPE_XFORM,SLOT_IN},
+ {MODE_CANVAS_ITEM,SHADER_TYPE_VERTEX,"ProjectionMatrix","PROJECTION_MATRIX","",SLOT_TYPE_XFORM,SLOT_IN},
+ //canvas item vertex out
+ {MODE_CANVAS_ITEM,SHADER_TYPE_VERTEX,"Vertex","VERTEX",".xy",SLOT_TYPE_VEC,SLOT_OUT},
+ {MODE_CANVAS_ITEM,SHADER_TYPE_VERTEX,"UV","UV",".xy",SLOT_TYPE_VEC,SLOT_OUT},
+ {MODE_CANVAS_ITEM,SHADER_TYPE_VERTEX,"Color","COLOR.rgb","",SLOT_TYPE_VEC,SLOT_OUT},
+ {MODE_CANVAS_ITEM,SHADER_TYPE_VERTEX,"Alpha","COLOR.a","",SLOT_TYPE_SCALAR,SLOT_OUT},
+ {MODE_CANVAS_ITEM,SHADER_TYPE_VERTEX,"Var1","VAR1.rgb","",SLOT_TYPE_VEC,SLOT_OUT},
+ {MODE_CANVAS_ITEM,SHADER_TYPE_VERTEX,"Var2","VAR2.rgb","",SLOT_TYPE_VEC,SLOT_OUT},
+ {MODE_CANVAS_ITEM,SHADER_TYPE_VERTEX,"PointSize","POINT_SIZE","",SLOT_TYPE_SCALAR,SLOT_OUT},
+ //canvas item fragment in
+ {MODE_CANVAS_ITEM,SHADER_TYPE_FRAGMENT,"Color","SRC_COLOR.rgb","",SLOT_TYPE_VEC,SLOT_IN},
+ {MODE_CANVAS_ITEM,SHADER_TYPE_FRAGMENT,"Alpha","SRC_COLOR.a","",SLOT_TYPE_SCALAR,SLOT_IN},
+ {MODE_CANVAS_ITEM,SHADER_TYPE_FRAGMENT,"UV","vec3(UV,0)","",SLOT_TYPE_VEC,SLOT_IN},
+ {MODE_CANVAS_ITEM,SHADER_TYPE_FRAGMENT,"UVScreen","vec3(SCREEN_UV,0)","",SLOT_TYPE_VEC,SLOT_IN},
+ {MODE_CANVAS_ITEM,SHADER_TYPE_FRAGMENT,"TexPixelSize","vec3(TEXTURE_PIXEL_SIZE,0)","",SLOT_TYPE_VEC,SLOT_IN},
+ {MODE_CANVAS_ITEM,SHADER_TYPE_FRAGMENT,"Var1","VAR1.rgb","",SLOT_TYPE_VEC,SLOT_IN},
+ {MODE_CANVAS_ITEM,SHADER_TYPE_FRAGMENT,"Var2","VAR2.rgb","",SLOT_TYPE_VEC,SLOT_IN},
+ {MODE_CANVAS_ITEM,SHADER_TYPE_FRAGMENT,"PointCoord","POINT_COORD","",SLOT_TYPE_VEC,SLOT_IN},
+ //canvas item fragment out
+ {MODE_CANVAS_ITEM,SHADER_TYPE_FRAGMENT,"Color","COLOR.rgb","",SLOT_TYPE_VEC,SLOT_OUT},
+ {MODE_CANVAS_ITEM,SHADER_TYPE_FRAGMENT,"Alpha","COLOR.a","",SLOT_TYPE_SCALAR,SLOT_OUT},
+ {MODE_CANVAS_ITEM,SHADER_TYPE_FRAGMENT,"Normal","NORMAL","",SLOT_TYPE_VEC,SLOT_OUT},
+ //canvas item light in
+ {MODE_CANVAS_ITEM,SHADER_TYPE_LIGHT,"Color","COLOR.rgb","",SLOT_TYPE_VEC,SLOT_IN},
+ {MODE_CANVAS_ITEM,SHADER_TYPE_LIGHT,"Normal","NORMAL","",SLOT_TYPE_VEC,SLOT_IN},
+ {MODE_CANVAS_ITEM,SHADER_TYPE_LIGHT,"LightDist","LIGHT_DISTANCE","",SLOT_TYPE_SCALAR,SLOT_IN},
+ {MODE_CANVAS_ITEM,SHADER_TYPE_LIGHT,"LightDir","vec3(LIGHT_DIR,0)","",SLOT_TYPE_VEC,SLOT_IN},
+ {MODE_CANVAS_ITEM,SHADER_TYPE_LIGHT,"PointCoord","POINT_COORD","",SLOT_TYPE_VEC,SLOT_IN},
+ //canvas item light out
+ {MODE_CANVAS_ITEM,SHADER_TYPE_LIGHT,"Light","LIGHT","",SLOT_TYPE_VEC,SLOT_OUT},
//end
- {MODE_MATERIAL,SHADER_TYPE_FRAGMENT,NULL,NULL,SLOT_TYPE_SCALAR,SLOT_OUT},
+ {MODE_MATERIAL,SHADER_TYPE_FRAGMENT,NULL,NULL,NULL,SLOT_TYPE_SCALAR,SLOT_OUT},
};
@@ -1174,17 +1383,17 @@ const ShaderGraph::NodeSlotInfo ShaderGraph::node_slot_info[]= {
{NODE_SCALAR_CONST,{SLOT_MAX},{SLOT_TYPE_SCALAR,SLOT_MAX}}, //scalar constant
{NODE_VEC_CONST,{SLOT_MAX},{SLOT_TYPE_VEC,SLOT_MAX}}, //vec3 constant
- {NODE_RGB_CONST,{SLOT_MAX},{SLOT_TYPE_VEC,SLOT_MAX}}, //rgb constant (shows a color picker instead)
+ {NODE_RGB_CONST,{SLOT_MAX},{SLOT_TYPE_VEC,SLOT_TYPE_SCALAR,SLOT_MAX}}, //rgb constant (shows a color picker instead)
{NODE_XFORM_CONST,{SLOT_MAX},{SLOT_TYPE_XFORM,SLOT_MAX}}, // 4x4 matrix constant
{NODE_TIME,{SLOT_MAX},{SLOT_TYPE_SCALAR,SLOT_MAX}}, // time in seconds
{NODE_SCREEN_TEX,{SLOT_TYPE_VEC,SLOT_MAX},{SLOT_TYPE_VEC,SLOT_MAX}}, // screen texture sampler (takes UV) (only usable in fragment shader)
{NODE_SCALAR_OP,{SLOT_TYPE_SCALAR,SLOT_TYPE_SCALAR,SLOT_MAX},{SLOT_TYPE_SCALAR,SLOT_MAX}}, // scalar vs scalar op (mul,{SLOT_MAX},{SLOT_MAX}}, add,{SLOT_MAX},{SLOT_MAX}}, div,{SLOT_MAX},{SLOT_MAX}}, etc)
{NODE_VEC_OP,{SLOT_TYPE_VEC,SLOT_TYPE_VEC,SLOT_MAX},{SLOT_TYPE_VEC,SLOT_MAX}}, // scalar vs scalar op (mul,{SLOT_MAX},{SLOT_MAX}}, add,{SLOT_MAX},{SLOT_MAX}}, div,{SLOT_MAX},{SLOT_MAX}}, etc)
{NODE_VEC_SCALAR_OP,{SLOT_TYPE_VEC,SLOT_TYPE_SCALAR,SLOT_MAX},{SLOT_TYPE_VEC,SLOT_MAX}}, // vec3 vs scalar op (mul,{SLOT_MAX},{SLOT_MAX}}, add,{SLOT_MAX},{SLOT_MAX}}, div,{SLOT_MAX},{SLOT_MAX}}, etc)
- {NODE_RGB_OP,{SLOT_TYPE_VEC,SLOT_TYPE_VEC,SLOT_TYPE_SCALAR},{SLOT_TYPE_VEC,SLOT_MAX}}, // vec3 vs scalar op (mul,{SLOT_MAX},{SLOT_MAX}}, add,{SLOT_MAX},{SLOT_MAX}}, div,{SLOT_MAX},{SLOT_MAX}}, etc)
+ {NODE_RGB_OP,{SLOT_TYPE_VEC,SLOT_TYPE_VEC,SLOT_MAX},{SLOT_TYPE_VEC,SLOT_MAX}}, // vec3 vs scalar op (mul,{SLOT_MAX},{SLOT_MAX}}, add,{SLOT_MAX},{SLOT_MAX}}, div,{SLOT_MAX},{SLOT_MAX}}, etc)
{NODE_XFORM_MULT,{SLOT_TYPE_XFORM,SLOT_TYPE_XFORM,SLOT_MAX},{SLOT_TYPE_XFORM,SLOT_MAX}}, // mat4 x mat4
{NODE_XFORM_VEC_MULT,{SLOT_TYPE_XFORM,SLOT_TYPE_VEC,SLOT_MAX},{SLOT_TYPE_VEC,SLOT_MAX}}, // mat4 x vec3 mult (with no-translation option)
- {NODE_XFORM_VEC_INV_MULT,{SLOT_TYPE_XFORM,SLOT_TYPE_VEC,SLOT_MAX},{SLOT_TYPE_VEC,SLOT_MAX}}, // mat4 x vec3 inverse mult (with no-translation option)
+ {NODE_XFORM_VEC_INV_MULT,{SLOT_TYPE_VEC,SLOT_TYPE_XFORM,SLOT_MAX},{SLOT_TYPE_VEC,SLOT_MAX}}, // mat4 x vec3 inverse mult (with no-translation option)
{NODE_SCALAR_FUNC,{SLOT_TYPE_SCALAR,SLOT_MAX},{SLOT_TYPE_SCALAR,SLOT_MAX}}, // scalar function (sin,{SLOT_MAX},{SLOT_MAX}}, cos,{SLOT_MAX},{SLOT_MAX}}, etc)
{NODE_VEC_FUNC,{SLOT_TYPE_VEC,SLOT_MAX},{SLOT_TYPE_VEC,SLOT_MAX}}, // vector function (normalize,{SLOT_MAX},{SLOT_MAX}}, negate,{SLOT_MAX},{SLOT_MAX}}, reciprocal,{SLOT_MAX},{SLOT_MAX}}, rgb2hsv,{SLOT_MAX},{SLOT_MAX}}, hsv2rgb,{SLOT_MAX},{SLOT_MAX}}, etc,{SLOT_MAX},{SLOT_MAX}}, etc)
{NODE_VEC_LEN,{SLOT_TYPE_VEC,SLOT_MAX},{SLOT_TYPE_SCALAR,SLOT_MAX}}, // vec3 length
@@ -1193,12 +1402,15 @@ const ShaderGraph::NodeSlotInfo ShaderGraph::node_slot_info[]= {
{NODE_SCALAR_TO_VEC,{SLOT_TYPE_SCALAR,SLOT_TYPE_SCALAR,SLOT_TYPE_SCALAR},{SLOT_TYPE_VEC,SLOT_MAX}}, // 3 scalar input,{SLOT_MAX},{SLOT_MAX}}, 1 vec3 output
{NODE_SCALAR_INTERP,{SLOT_TYPE_SCALAR,SLOT_TYPE_SCALAR,SLOT_TYPE_SCALAR},{SLOT_TYPE_SCALAR,SLOT_MAX}}, // scalar interpolation (with optional curve)
{NODE_VEC_INTERP,{SLOT_TYPE_VEC,SLOT_TYPE_VEC,SLOT_TYPE_SCALAR},{SLOT_TYPE_VEC,SLOT_MAX}}, // vec3 interpolation (with optional curve)
+ {NODE_COLOR_RAMP,{SLOT_TYPE_SCALAR,SLOT_MAX},{SLOT_TYPE_VEC,SLOT_TYPE_SCALAR,SLOT_MAX}}, // vec3 interpolation (with optional curve)
+ {NODE_CURVE_MAP,{SLOT_TYPE_SCALAR,SLOT_MAX},{SLOT_TYPE_SCALAR,SLOT_MAX}}, // vec3 interpolation (with optional curve)
{NODE_SCALAR_INPUT,{SLOT_MAX},{SLOT_TYPE_SCALAR,SLOT_MAX}}, // scalar uniform (assignable in material)
{NODE_VEC_INPUT,{SLOT_MAX},{SLOT_TYPE_VEC,SLOT_MAX}}, // vec3 uniform (assignable in material)
{NODE_RGB_INPUT,{SLOT_MAX},{SLOT_TYPE_VEC,SLOT_MAX}}, // color uniform (assignable in material)
{NODE_XFORM_INPUT,{SLOT_MAX},{SLOT_TYPE_XFORM,SLOT_MAX}}, // mat4 uniform (assignable in material)
{NODE_TEXTURE_INPUT,{SLOT_TYPE_VEC,SLOT_MAX},{SLOT_TYPE_VEC,SLOT_TYPE_SCALAR,SLOT_MAX}}, // texture input (assignable in material)
{NODE_CUBEMAP_INPUT,{SLOT_TYPE_VEC,SLOT_MAX},{SLOT_TYPE_VEC,SLOT_TYPE_SCALAR,SLOT_MAX}}, // cubemap input (assignable in material)
+ {NODE_DEFAULT_TEXTURE,{SLOT_TYPE_VEC,SLOT_MAX},{SLOT_TYPE_VEC,SLOT_TYPE_SCALAR,SLOT_MAX}}, // cubemap input (assignable in material)
{NODE_COMMENT,{SLOT_MAX},{SLOT_MAX}}, // comment
{NODE_TYPE_MAX,{SLOT_MAX},{SLOT_MAX}}
};
@@ -1315,6 +1527,7 @@ ShaderGraph::SlotType ShaderGraph::get_node_input_slot_type(Mode p_mode, ShaderT
if (nsi->type==p_type) {
for(int i=0;i<NodeSlotInfo::MAX_INS;i++) {
+
if (nsi->ins[i]==SLOT_MAX)
break;
if (i==p_idx)
@@ -1381,6 +1594,14 @@ void ShaderGraph::_update_shader() {
String code[3];
+ List<StringName> names;
+ get_default_texture_param_list(&names);
+
+ for (List<StringName>::Element *E=names.front();E;E=E->next()) {
+ set_default_texture_param(E->get(),Ref<Texture>());
+ }
+
+
for(int i=0;i<3;i++) {
int idx=0;
@@ -1437,11 +1658,13 @@ void ShaderGraph::_update_shader() {
bool failed=false;
if (i==SHADER_TYPE_FRAGMENT && get_mode()==MODE_MATERIAL) {
- code[i]+="vec3 DIFFUSE_OUT=vec3(0,0,0);";
- code[i]+="float ALPHA_OUT=0;";
+ code[i]+="vec3 DIFFUSE_OUT=vec3(0,0,0);\n";
+ code[i]+="float ALPHA_OUT=0;\n";
}
+
Map<String,String> inputs_xlate;
+ Map<String,String> input_names_xlate;
Set<String> inputs_used;
for(int j=0;j<order.size();j++) {
@@ -1458,6 +1681,7 @@ void ShaderGraph::_update_shader() {
String vname=("nd"+itos(n->id)+"sl"+itos(idx));
inputs_xlate[vname]=String(typestr[iop->slot_type])+" "+vname+"="+iop->variable+";\n";
+ input_names_xlate[vname]=iop->variable;
idx++;
}
iop++;
@@ -1476,7 +1700,7 @@ void ShaderGraph::_update_shader() {
String iname=("nd"+itos(n->connections[idx].id)+"sl"+itos(n->connections[idx].slot));
if (node_get_type(ShaderType(i),n->connections[idx].id)==NODE_INPUT)
inputs_used.insert(iname);
- code[i]+=String(iop->variable)+"="+iname+";\n";
+ code[i]+=String(iop->variable)+"="+iname+String(iop->postfix)+";\n";
if (i==SHADER_TYPE_FRAGMENT && get_mode()==MODE_MATERIAL && String(iop->name)=="DiffuseAlpha")
use_alpha=true;
}
@@ -1488,8 +1712,7 @@ void ShaderGraph::_update_shader() {
if (i==SHADER_TYPE_FRAGMENT && get_mode()==MODE_MATERIAL) {
if (use_alpha) {
- code[i]+="DIFFUSE_ALPHA.rgb=DIFFUSE_OUT;\n";
- code[i]+="DIFFUSE_ALPHA.a=ALPHA_OUT;\n";
+ code[i]+="DIFFUSE_ALPHA=vec4(DIFFUSE_OUT,ALPHA_OUT);\n";
} else {
code[i]+="DIFFUSE=DIFFUSE_OUT;\n";
}
@@ -1506,13 +1729,19 @@ void ShaderGraph::_update_shader() {
}
String iname="nd"+itos(n->connections[k].id)+"sl"+itos(n->connections[k].slot);
inputs.push_back(iname);
- if (node_get_type(ShaderType(i),n->connections[k].id)==NODE_INPUT)
+ if (node_get_type(ShaderType(i),n->connections[k].id)==NODE_INPUT) {
inputs_used.insert(iname);
+ }
}
if (failed)
break;
+
+ if (n->type==NODE_TEXTURE_INPUT || n->type==NODE_CUBEMAP_INPUT) {
+
+ set_default_texture_param(n->param1,n->param2);
+ }
_add_node_code(ShaderType(i),n,inputs,code[i]);
}
@@ -1521,13 +1750,38 @@ void ShaderGraph::_update_shader() {
if (failed)
continue;
+
for(Set<String>::Element *E=inputs_used.front();E;E=E->next()) {
ERR_CONTINUE( !inputs_xlate.has(E->get()));
code[i]=inputs_xlate[E->get()]+code[i];
+ String name=input_names_xlate[E->get()];
+
+ if (i==SHADER_TYPE_VERTEX && get_mode()==MODE_MATERIAL) {
+ if (name==("SRC_COLOR"))
+ code[i]="vec3 SRC_COLOR=COLOR.rgb;\n"+code[i];
+ if (name==("SRC_ALPHA"))
+ code[i]="float SRC_ALPHA=COLOR.a;\n"+code[i];
+ if (name==("SRC_UV"))
+ code[i]="vec3 SRC_UV=vec3(UV,0);\n"+code[i];
+ if (name==("SRC_UV2"))
+ code[i]="float SRC_UV2=vec3(UV2,0);\n"+code[i];
+ } else if (i==SHADER_TYPE_FRAGMENT && get_mode()==MODE_MATERIAL) {
+ if (name==("IN_NORMAL"))
+ code[i]="vec3 IN_NORMAL=NORMAL;\n"+code[i];
+ } else if (i==SHADER_TYPE_VERTEX && get_mode()==MODE_CANVAS_ITEM) {
+ if (name==("SRC_COLOR"))
+ code[i]="vec3 SRC_COLOR=COLOR.rgb;\n"+code[i];
+ if (name==("SRC_UV"))
+ code[i]="vec3 SRC_UV=vec3(UV,0);\n"+code[i];
+ }
+
}
+
+
+
shader[i].error=GRAPH_OK;
- print_line("ShADER: "+code[i]);
+
}
bool all_ok=true;
@@ -1536,19 +1790,153 @@ void ShaderGraph::_update_shader() {
all_ok=false;
}
+ /*print_line("VERTEX: \n"+code[0]);
+ print_line("FRAGMENT: \n"+code[1]);
+ print_line("LIGHT: \n"+code[2]);*/
+
if (all_ok) {
set_code(code[0],code[1],code[2]);
}
//do shader here
- print_line("UPDATING SHADER");
+
_pending_update_shader=false;
+ emit_signal(SceneStringNames::get_singleton()->updated);
+}
+
+void ShaderGraph::_plot_curve(const Vector2& p_a,const Vector2& p_b,const Vector2& p_c,const Vector2& p_d,uint8_t* p_heights,bool *p_useds) {
+
+ float geometry[4][4];
+ float tmp1[4][4];
+ float tmp2[4][4];
+ float deltas[4][4];
+ double x, dx, dx2, dx3;
+ double y, dy, dy2, dy3;
+ double d, d2, d3;
+ int lastx, lasty;
+ int newx, newy;
+ int ntimes;
+ int i,j;
+
+ int xmax=255;
+ int ymax=255;
+
+ /* construct the geometry matrix from the segment */
+ for (i = 0; i < 4; i++) {
+ geometry[i][2] = 0;
+ geometry[i][3] = 0;
+ }
+
+ geometry[0][0] = (p_a[0] * xmax);
+ geometry[1][0] = (p_b[0] * xmax);
+ geometry[2][0] = (p_c[0] * xmax);
+ geometry[3][0] = (p_d[0] * xmax);
+
+ geometry[0][1] = (p_a[1] * ymax);
+ geometry[1][1] = (p_b[1] * ymax);
+ geometry[2][1] = (p_c[1] * ymax);
+ geometry[3][1] = (p_d[1] * ymax);
+
+ /* subdivide the curve ntimes (1000) times */
+ ntimes = 4 * xmax;
+ /* ntimes can be adjusted to give a finer or coarser curve */
+ d = 1.0 / ntimes;
+ d2 = d * d;
+ d3 = d * d * d;
+
+ /* construct a temporary matrix for determining the forward differencing deltas */
+ tmp2[0][0] = 0; tmp2[0][1] = 0; tmp2[0][2] = 0; tmp2[0][3] = 1;
+ tmp2[1][0] = d3; tmp2[1][1] = d2; tmp2[1][2] = d; tmp2[1][3] = 0;
+ tmp2[2][0] = 6*d3; tmp2[2][1] = 2*d2; tmp2[2][2] = 0; tmp2[2][3] = 0;
+ tmp2[3][0] = 6*d3; tmp2[3][1] = 0; tmp2[3][2] = 0; tmp2[3][3] = 0;
+
+ /* compose the basis and geometry matrices */
+
+ static const float CR_basis[4][4] =
+ {
+ { -0.5, 1.5, -1.5, 0.5 },
+ { 1.0, -2.5, 2.0, -0.5 },
+ { -0.5, 0.0, 0.5, 0.0 },
+ { 0.0, 1.0, 0.0, 0.0 },
+ };
+
+ for (i = 0; i < 4; i++)
+ {
+ for (j = 0; j < 4; j++)
+ {
+ tmp1[i][j] = (CR_basis[i][0] * geometry[0][j] +
+ CR_basis[i][1] * geometry[1][j] +
+ CR_basis[i][2] * geometry[2][j] +
+ CR_basis[i][3] * geometry[3][j]);
+ }
+ }
+ /* compose the above results to get the deltas matrix */
+
+ for (i = 0; i < 4; i++)
+ {
+ for (j = 0; j < 4; j++)
+ {
+ deltas[i][j] = (tmp2[i][0] * tmp1[0][j] +
+ tmp2[i][1] * tmp1[1][j] +
+ tmp2[i][2] * tmp1[2][j] +
+ tmp2[i][3] * tmp1[3][j]);
+ }
+ }
+
+
+ /* extract the x deltas */
+ x = deltas[0][0];
+ dx = deltas[1][0];
+ dx2 = deltas[2][0];
+ dx3 = deltas[3][0];
+
+ /* extract the y deltas */
+ y = deltas[0][1];
+ dy = deltas[1][1];
+ dy2 = deltas[2][1];
+ dy3 = deltas[3][1];
+
+
+ lastx = CLAMP (x, 0, xmax);
+ lasty = CLAMP (y, 0, ymax);
+
+ p_heights[lastx] = lasty;
+ p_useds[lastx] = true;
+
+ /* loop over the curve */
+ for (i = 0; i < ntimes; i++)
+ {
+ /* increment the x values */
+ x += dx;
+ dx += dx2;
+ dx2 += dx3;
+
+ /* increment the y values */
+ y += dy;
+ dy += dy2;
+ dy2 += dy3;
+
+ newx = CLAMP ((Math::round (x)), 0, xmax);
+ newy = CLAMP ((Math::round (y)), 0, ymax);
+
+ /* if this point is different than the last one...then draw it */
+ if ((lastx != newx) || (lasty != newy))
+ {
+ p_useds[newx]=true;
+ p_heights[newx]=newy;
+ }
+
+ lastx = newx;
+ lasty = newy;
+ }
}
+
void ShaderGraph::_add_node_code(ShaderType p_type,Node *p_node,const Vector<String>& p_inputs,String& code) {
const char *typestr[4]={"float","vec3","mat4","texture"};
#define OUTNAME(id,slot) (String(typestr[get_node_output_slot_type(get_mode(),p_type,p_node->type,slot)])+" "+("nd"+itos(id)+"sl"+itos(slot)))
+#define OUTVAR(id,slot) ("nd"+itos(id)+"sl"+itos(slot))
switch(p_node->type) {
@@ -1568,6 +1956,7 @@ void ShaderGraph::_add_node_code(ShaderType p_type,Node *p_node,const Vector<Str
case NODE_RGB_CONST: {
Color col = p_node->param1;
code+=OUTNAME(p_node->id,0)+"=vec3("+rtos(col.r)+","+rtos(col.g)+","+rtos(col.b)+");\n";
+ code+=OUTNAME(p_node->id,1)+"="+rtos(col.a)+";\n";
}break;
case NODE_XFORM_CONST: {
@@ -1584,7 +1973,7 @@ void ShaderGraph::_add_node_code(ShaderType p_type,Node *p_node,const Vector<Str
code+=OUTNAME(p_node->id,0)+"=TIME;\n";
}break;
case NODE_SCREEN_TEX: {
- code+=OUTNAME(p_node->id,0)+"=texscreen("+p_inputs[0]+");\n";
+ code+=OUTNAME(p_node->id,0)+"=texscreen("+p_inputs[0]+".xy);\n";
}break;
case NODE_SCALAR_OP: {
int op = p_node->param1;
@@ -1626,16 +2015,94 @@ void ShaderGraph::_add_node_code(ShaderType p_type,Node *p_node,const Vector<Str
int op = p_node->param1;
String optxt;
switch(op) {
- case VEC_OP_MUL: optxt = p_inputs[0]+"*"+p_inputs[1]+";"; break;
- case VEC_OP_DIV: optxt = p_inputs[0]+"/"+p_inputs[1]+";"; break;
- case VEC_OP_POW: optxt = "pow("+p_inputs[0]+","+p_inputs[1]+");"; break;
+ case VEC_SCALAR_OP_MUL: optxt = p_inputs[0]+"*"+p_inputs[1]+";"; break;
+ case VEC_SCALAR_OP_DIV: optxt = p_inputs[0]+"/"+p_inputs[1]+";"; break;
+ case VEC_SCALAR_OP_POW: optxt = "pow("+p_inputs[0]+","+p_inputs[1]+");"; break;
}
code+=OUTNAME(p_node->id,0)+"="+optxt+"\n";
}break;
case NODE_RGB_OP: {
+ int op = p_node->param1;
+ static const char*axisn[3]={"x","y","z"};
+ switch(op) {
+ case RGB_OP_SCREEN: {
+
+ code += OUTNAME(p_node->id,0)+"=vec3(1.0)-(vec3(1.0)-"+p_inputs[0]+")*(vec3(1.0)-"+p_inputs[1]+");\n";
+ } break;
+ case RGB_OP_DIFFERENCE: {
+
+ code += OUTNAME(p_node->id,0)+"=abs("+p_inputs[0]+"-"+p_inputs[1]+");\n";
+
+ } break;
+ case RGB_OP_DARKEN: {
+ code += OUTNAME(p_node->id,0)+"=min("+p_inputs[0]+","+p_inputs[1]+");\n";
+ } break;
+ case RGB_OP_LIGHTEN: {
+
+ code += OUTNAME(p_node->id,0)+"=max("+p_inputs[0]+","+p_inputs[1]+");\n";
+
+ } break;
+ case RGB_OP_OVERLAY: {
+
+ code += OUTNAME(p_node->id,0)+";\n";
+ for(int i=0;i<3;i++) {
+ code += "{\n";
+ code += "\tfloat base="+p_inputs[0]+"."+axisn[i]+";\n";
+ code += "\tfloat blend="+p_inputs[1]+"."+axisn[i]+";\n";
+ code += "\tif (base < 0.5) {\n";
+ code += "\t\t"+OUTVAR(p_node->id,0)+"."+axisn[i]+" = 2.0 * base * blend;\n";
+ code += "\t} else {\n";
+ code += "\t\t"+OUTVAR(p_node->id,0)+"."+axisn[i]+" = 1.0 - 2.0 * (1.0 - blend) * (1.0 - base);\n";
+ code += "\t}\n";
+ code += "}\n";
+ }
+
+ } break;
+ case RGB_OP_DODGE: {
+
+ code += OUTNAME(p_node->id,0)+"=("+p_inputs[0]+")/(vec3(1.0)-"+p_inputs[1]+");\n";
+
+ } break;
+ case RGB_OP_BURN: {
+
+ code += OUTNAME(p_node->id,0)+"=vec3(1.0)-(vec3(1.0)-"+p_inputs[0]+")/("+p_inputs[1]+");\n";
+ } break;
+ case RGB_OP_SOFT_LIGHT: {
+
+ code += OUTNAME(p_node->id,0)+";\n";
+ for(int i=0;i<3;i++) {
+ code += "{\n";
+ code += "\tfloat base="+p_inputs[0]+"."+axisn[i]+";\n";
+ code += "\tfloat blend="+p_inputs[1]+"."+axisn[i]+";\n";
+ code += "\tif (base < 0.5) {\n";
+ code += "\t\t"+OUTVAR(p_node->id,0)+"."+axisn[i]+" = (base * (blend+0.5));\n";
+ code += "\t} else {\n";
+ code += "\t\t"+OUTVAR(p_node->id,0)+"."+axisn[i]+" = (1 - (1-base) * (1-(blend-0.5)));\n";
+ code += "\t}\n";
+ code += "}\n";
+ }
+
+ } break;
+ case RGB_OP_HARD_LIGHT: {
+
+ code += OUTNAME(p_node->id,0)+";\n";
+ for(int i=0;i<3;i++) {
+ code += "{\n";
+ code += "\tfloat base="+p_inputs[0]+"."+axisn[i]+";\n";
+ code += "\tfloat blend="+p_inputs[1]+"."+axisn[i]+";\n";
+ code += "\tif (base < 0.5) {\n";
+ code += "\t\t"+OUTVAR(p_node->id,0)+"."+axisn[i]+" = (base * (2*blend));\n";
+ code += "\t} else {\n";
+ code += "\t\t"+OUTVAR(p_node->id,0)+"."+axisn[i]+" = (1 - (1-base) * (1-2*(blend-0.5)));\n";
+ code += "\t}\n";
+ code += "}\n";
+ }
+
+ } break;
+ }
}break;
case NODE_XFORM_MULT: {
@@ -1646,26 +2113,85 @@ void ShaderGraph::_add_node_code(ShaderType p_type,Node *p_node,const Vector<Str
bool no_translation = p_node->param1;
if (no_translation) {
- code += OUTNAME(p_node->id,0)+"="+p_inputs[0]+"*vec4("+p_inputs[1]+",0);\n";
+ code += OUTNAME(p_node->id,0)+"=("+p_inputs[0]+"*vec4("+p_inputs[1]+",0)).xyz;\n";
} else {
- code += OUTNAME(p_node->id,0)+"="+p_inputs[0]+"*vec4("+p_inputs[1]+",1);\n";
+ code += OUTNAME(p_node->id,0)+"=("+p_inputs[0]+"*vec4("+p_inputs[1]+",1)).xyz;\n";
}
}break;
case NODE_XFORM_VEC_INV_MULT: {
bool no_translation = p_node->param1;
if (no_translation) {
- code += OUTNAME(p_node->id,0)+"="+p_inputs[1]+"*vec4("+p_inputs[0]+",0);\n";
+ code += OUTNAME(p_node->id,0)+"=("+p_inputs[1]+"*vec4("+p_inputs[0]+",0)).xyz;\n";
} else {
- code += OUTNAME(p_node->id,0)+"="+p_inputs[1]+"*vec4("+p_inputs[0]+",1);\n";
+ code += OUTNAME(p_node->id,0)+"=("+p_inputs[1]+"*vec4("+p_inputs[0]+",1)).xyz;\n";
}
}break;
case NODE_SCALAR_FUNC: {
-
-
- }break;
+ static const char*scalar_func_id[SCALAR_MAX_FUNC]={
+ "sin($)",
+ "cos($)",
+ "tan($)",
+ "asin($)",
+ "acos($)",
+ "atan($)",
+ "sinh($)",
+ "cosh($)",
+ "tanh($)",
+ "log($)",
+ "exp($)",
+ "sqrt($)",
+ "abs($)",
+ "sign($)",
+ "floor($)",
+ "round($)",
+ "ceil($)",
+ "frac($)",
+ "min(max($,0),1)",
+ "-($)",
+ };
+
+ int func = p_node->param1;
+ ERR_FAIL_INDEX(func,SCALAR_MAX_FUNC);
+ code += OUTNAME(p_node->id,0)+"="+String(scalar_func_id[func]).replace("$",p_inputs[0])+";\n";
+
+ } break;
case NODE_VEC_FUNC: {
+ static const char*vec_func_id[VEC_MAX_FUNC]={
+ "normalize($)",
+ "max(min($,vec3(1,1,1)),vec3(0,0,0))",
+ "-($)",
+ "1.0/($)",
+ "",
+ "",
+ };
+
+
+ int func = p_node->param1;
+ ERR_FAIL_INDEX(func,VEC_MAX_FUNC);
+ if (func==VEC_FUNC_RGB2HSV) {
+ code += OUTNAME(p_node->id,0)+";\n";
+ code+="{\n";
+ code+="\tvec3 c = "+p_inputs[0]+";\n";
+ code+="\tvec4 K = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0);\n";
+ code+="\tvec4 p = mix(vec4(c.bg, K.wz), vec4(c.gb, K.xy), step(c.b, c.g));\n";
+ code+="\tvec4 q = mix(vec4(p.xyw, c.r), vec4(c.r, p.yzx), step(p.x, c.r));\n";
+ code+="\tfloat d = q.x - min(q.w, q.y);\n";
+ code+="\tfloat e = 1.0e-10;\n";
+ code+="\t"+OUTVAR(p_node->id,0)+"=vec3(abs(q.z + (q.w - q.y) / (6.0 * d + e)), d / (q.x + e), q.x);\n";
+ code+="}\n";
+ } else if (func==VEC_FUNC_HSV2RGB) {
+ code += OUTNAME(p_node->id,0)+";\n";;
+ code+="{\n";
+ code+="\tvec3 c = "+p_inputs[0]+";\n";
+ code+="\tvec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\n";
+ code+="\tvec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);\n";
+ code+="\t"+OUTVAR(p_node->id,0)+"=c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);\n";
+ code+="}\n";
+ } else {
+ code += OUTNAME(p_node->id,0)+"="+String(vec_func_id[func]).replace("$",p_inputs[0])+";\n";
+ }
}break;
case NODE_VEC_LEN: {
@@ -1705,6 +2231,129 @@ void ShaderGraph::_add_node_code(ShaderType p_type,Node *p_node,const Vector<Str
code += OUTNAME(p_node->id,0)+"=mix("+p_inputs[0]+","+p_inputs[1]+","+p_inputs[2]+");\n";
}break;
+ case NODE_COLOR_RAMP: {
+
+ static const int color_ramp_len=512;
+ DVector<uint8_t> cramp;
+ cramp.resize(color_ramp_len*4);
+ {
+
+ DVector<Color> colors=p_node->param1;
+ DVector<real_t> offsets=p_node->param2;
+ int cc =colors.size();
+ DVector<uint8_t>::Write crw = cramp.write();
+ DVector<Color>::Read cr = colors.read();
+ DVector<real_t>::Read ofr = offsets.read();
+
+ int at=0;
+ Color color_at(0,0,0,1);
+ for(int i=0;i<=cc;i++) {
+
+ int pos;
+ Color to;
+ if (i==cc) {
+ if (at==color_ramp_len)
+ break;
+ pos=color_ramp_len;
+ to=Color(1,1,1,1);
+ } else {
+ to=cr[i];
+ pos= MIN(ofr[i]*color_ramp_len,color_ramp_len);
+ }
+ for(int j=at;j<pos;j++) {
+ float t = (j-at)/float(pos-at);
+ Color c = color_at.linear_interpolate(to,t);
+ crw[j*4+0]=Math::fast_ftoi( CLAMP(c.r*255.0,0,255) );
+ crw[j*4+1]=Math::fast_ftoi( CLAMP(c.g*255.0,0,255) );
+ crw[j*4+2]=Math::fast_ftoi( CLAMP(c.b*255.0,0,255) );
+ crw[j*4+3]=Math::fast_ftoi( CLAMP(c.a*255.0,0,255) );
+ }
+
+ at=pos;
+ color_at=to;
+ }
+ }
+
+ Image gradient(color_ramp_len,1,0,Image::FORMAT_RGBA,cramp);
+ Ref<ImageTexture> it = memnew( ImageTexture );
+ it->create_from_image(gradient,Texture::FLAG_FILTER|Texture::FLAG_MIPMAPS);
+
+ String crampname= "cramp_"+itos(p_node->id);
+ set_default_texture_param(crampname,it);
+
+ code +="uniform texture "+crampname+";\n";
+ code +="vec4 "+crampname+"_r=tex("+crampname+",vec2("+p_inputs[0]+",0));\n";
+ code += OUTNAME(p_node->id,0)+"="+crampname+"_r.rgb;\n";
+ code += OUTNAME(p_node->id,1)+"="+crampname+"_r.a;\n";
+
+ }break;
+ case NODE_CURVE_MAP: {
+ static const int curve_map_len=256;
+ bool mapped[256];
+ zeromem(mapped,sizeof(mapped));
+ DVector<uint8_t> cmap;
+ cmap.resize(curve_map_len);
+ {
+
+ DVector<Point2> points=p_node->param1;
+ int pc =points.size();
+ DVector<uint8_t>::Write cmw = cmap.write();
+ DVector<Point2>::Read pr = points.read();
+
+ Vector2 prev=Vector2(0,0);
+ Vector2 prev2=Vector2(0,0);
+
+ for(int i=-1;i<pc;i++) {
+
+ Vector2 next;
+ Vector2 next2;
+ if (i+1>=pc) {
+ next=Vector2(1,1);
+ } else {
+ next=Vector2(pr[i+1].x,pr[i+1].y);
+ }
+
+ if (i+2>=pc) {
+ next2=Vector2(1,1);
+ } else {
+ next2=Vector2(pr[i+2].x,pr[i+2].y);
+ }
+
+ /*if (i==-1 && prev.offset==next.offset) {
+ prev=next;
+ continue;
+ }*/
+
+ _plot_curve(prev2,prev,next,next2,cmw.ptr(),mapped);
+
+ prev2=prev;
+ prev=next;
+ }
+
+ uint8_t pp=0;
+ for(int i=0;i<curve_map_len;i++) {
+
+ if (!mapped[i]) {
+ cmw[i]=pp;
+ } else {
+ pp=cmw[i];
+ }
+ }
+ }
+
+
+
+ Image gradient(curve_map_len,1,0,Image::FORMAT_GRAYSCALE,cmap);
+ Ref<ImageTexture> it = memnew( ImageTexture );
+ it->create_from_image(gradient,Texture::FLAG_FILTER|Texture::FLAG_MIPMAPS);
+
+ String cmapname= "cmap_"+itos(p_node->id);
+ set_default_texture_param(cmapname,it);
+
+ code +="uniform texture "+cmapname+";\n";
+ code += OUTNAME(p_node->id,0)+"=tex("+cmapname+",vec2("+p_inputs[0]+",0)).r;\n";
+
+ }break;
case NODE_SCALAR_INPUT: {
String name = p_node->param1;
float dv=p_node->param2;
@@ -1744,7 +2393,7 @@ void ShaderGraph::_add_node_code(ShaderType p_type,Node *p_node,const Vector<Str
}break;
case NODE_TEXTURE_INPUT: {
String name = p_node->param1;
- String rname="_read_tex"+itos(p_node->id);
+ String rname="rt_read_tex"+itos(p_node->id);
code +="uniform texture "+name+";";
code +="vec4 "+rname+"=tex("+name+","+p_inputs[0]+".xy);\n";
code += OUTNAME(p_node->id,0)+"="+rname+".rgb;\n";
@@ -1755,11 +2404,27 @@ void ShaderGraph::_add_node_code(ShaderType p_type,Node *p_node,const Vector<Str
String name = p_node->param1;
code +="uniform cubemap "+name+";";
- String rname="_read_tex"+itos(p_node->id);
+ String rname="rt_read_tex"+itos(p_node->id);
code +="vec4 "+rname+"=texcube("+name+","+p_inputs[0]+".xy);\n";
code += OUTNAME(p_node->id,0)+"="+rname+".rgb;\n";
code += OUTNAME(p_node->id,1)+"="+rname+".a;\n";
}break;
+ case NODE_DEFAULT_TEXTURE: {
+
+ if (get_mode()==MODE_CANVAS_ITEM && p_type==SHADER_TYPE_FRAGMENT) {
+
+ String rname="rt_default_tex"+itos(p_node->id);
+ code +="vec4 "+rname+"=tex(TEXTURE,"+p_inputs[0]+".xy);\n";
+ code += OUTNAME(p_node->id,0)+"="+rname+".rgb;\n";
+ code += OUTNAME(p_node->id,1)+"="+rname+".a;\n";
+
+ } else {
+ //not supported
+ code += OUTNAME(p_node->id,0)+"=vec3(0,0,0);\n";
+ code += OUTNAME(p_node->id,1)+"=1.0;\n";
+
+ }
+ } break;
case NODE_OUTPUT: {
diff --git a/scene/resources/shader_graph.h b/scene/resources/shader_graph.h
index c73895db8a..5c34bedadd 100644
--- a/scene/resources/shader_graph.h
+++ b/scene/resources/shader_graph.h
@@ -66,12 +66,15 @@ public:
NODE_VEC_TO_XFORM, // 3 vec input, 1 xform output
NODE_SCALAR_INTERP, // scalar interpolation (with optional curve)
NODE_VEC_INTERP, // vec3 interpolation (with optional curve)
- NODE_SCALAR_INPUT, // scalar uniform (assignable in material)
+ NODE_COLOR_RAMP, //take scalar, output vec3
+ NODE_CURVE_MAP, //take scalar, otput scalar
+ NODE_SCALAR_INPUT, // scalar uniform (assignable in material)
NODE_VEC_INPUT, // vec3 uniform (assignable in material)
NODE_RGB_INPUT, // color uniform (assignable in material)
NODE_XFORM_INPUT, // mat4 uniform (assignable in material)
NODE_TEXTURE_INPUT, // texture input (assignable in material)
NODE_CUBEMAP_INPUT, // cubemap input (assignable in material)
+ NODE_DEFAULT_TEXTURE,
NODE_OUTPUT, // output (shader type dependent)
NODE_COMMENT, // comment
NODE_TYPE_MAX
@@ -115,7 +118,7 @@ public:
private:
- String _find_unique_name(ShaderType p_which, const String& p_base);
+ String _find_unique_name(const String& p_base);
struct SourceSlot {
@@ -151,6 +154,7 @@ private:
ShaderType shader_type;
const char *name;
const char *variable;
+ const char *postfix;
SlotType slot_type;
SlotDir dir;
};
@@ -171,10 +175,14 @@ private:
void _update_shader();
void _request_update();
+ void _plot_curve(const Vector2& p_a,const Vector2& p_b,const Vector2& p_c,const Vector2& p_d,uint8_t* p_heights,bool *p_useds);
void _add_node_code(ShaderType p_type,Node *p_node,const Vector<String>& p_inputs,String& code);
Array _get_node_list(ShaderType p_type) const;
Array _get_connections(ShaderType p_type) const;
+
+ void _set_data(const Dictionary& p_data);
+ Dictionary _get_data() const;
protected:
static void _bind_methods();
@@ -263,9 +271,8 @@ public:
RGB_MAX_OP
};
- void rgb_op_node_set_op(ShaderType p_which,float p_id,RGBOp p_op,float p_c);
+ void rgb_op_node_set_op(ShaderType p_which,float p_id,RGBOp p_op);
RGBOp rgb_op_node_get_op(ShaderType p_which,float p_id) const;
- float rgb_op_node_get_c(ShaderType p_which,float p_id) const;
void xform_vec_mult_node_set_no_translation(ShaderType p_which,int p_id,bool p_no_translation);
bool xform_vec_mult_node_get_no_translation(ShaderType p_which,int p_id) const;
@@ -310,6 +317,13 @@ public:
void vec_func_node_set_function(ShaderType p_which,int p_id,VecFunc p_func);
VecFunc vec_func_node_get_function(ShaderType p_which,int p_id) const;
+ void color_ramp_node_set_ramp(ShaderType p_which,int p_id,const DVector<Color>& p_colors, const DVector<real_t>& p_offsets);
+ DVector<Color> color_ramp_node_get_colors(ShaderType p_which,int p_id) const;
+ DVector<real_t> color_ramp_node_get_offsets(ShaderType p_which,int p_id) const;
+
+ void curve_map_node_set_points(ShaderType p_which, int p_id, const DVector<Vector2>& p_points);
+ DVector<Vector2> curve_map_node_get_points(ShaderType p_which,int p_id) const;
+
void input_node_set_name(ShaderType p_which,int p_id,const String& p_name);
String input_node_get_name(ShaderType p_which,int p_id);
@@ -345,6 +359,8 @@ public:
Variant node_get_state(ShaderType p_type, int p_node) const;
void node_set_state(ShaderType p_type, int p_id, const Variant& p_state);
+ GraphError get_graph_error(ShaderType p_type) const;
+
static int get_type_input_count(NodeType p_type);
static int get_type_output_count(NodeType p_type);
static SlotType get_type_input_type(NodeType p_type,int p_idx);
@@ -384,12 +400,12 @@ VARIANT_ENUM_CAST( ShaderGraph::VecScalarOp );
VARIANT_ENUM_CAST( ShaderGraph::RGBOp );
VARIANT_ENUM_CAST( ShaderGraph::ScalarFunc );
VARIANT_ENUM_CAST( ShaderGraph::VecFunc );
+VARIANT_ENUM_CAST( ShaderGraph::GraphError );
class MaterialShaderGraph : public ShaderGraph {
OBJ_TYPE( MaterialShaderGraph, ShaderGraph );
- RES_BASE_EXTENSION("sgp");
public:
@@ -399,4 +415,17 @@ public:
}
};
+class CanvasItemShaderGraph : public ShaderGraph {
+
+ OBJ_TYPE( CanvasItemShaderGraph, ShaderGraph );
+
+public:
+
+
+ CanvasItemShaderGraph() : ShaderGraph(MODE_CANVAS_ITEM) {
+
+ }
+};
+
+
#endif // SHADER_GRAPH_H
diff --git a/scene/scene_string_names.cpp b/scene/scene_string_names.cpp
index 0d66257eda..af5e6d4165 100644
--- a/scene/scene_string_names.cpp
+++ b/scene/scene_string_names.cpp
@@ -67,6 +67,7 @@ SceneStringNames::SceneStringNames() {
idle=StaticCString::create("idle");
iteration=StaticCString::create("iteration");
update=StaticCString::create("update");
+ updated=StaticCString::create("updated");
_get_gizmo_geometry=StaticCString::create("_get_gizmo_geometry");
_can_gizmo_scale=StaticCString::create("_can_gizmo_scale");
diff --git a/scene/scene_string_names.h b/scene/scene_string_names.h
index b0628c86b6..14e5e83b8d 100644
--- a/scene/scene_string_names.h
+++ b/scene/scene_string_names.h
@@ -63,6 +63,7 @@ public:
StringName idle;
StringName iteration;
StringName update;
+ StringName updated;
StringName line_separation;
diff --git a/servers/physics_2d/body_2d_sw.cpp b/servers/physics_2d/body_2d_sw.cpp
index d93d4d5c35..1cfe9a6ab9 100644
--- a/servers/physics_2d/body_2d_sw.cpp
+++ b/servers/physics_2d/body_2d_sw.cpp
@@ -647,6 +647,7 @@ Body2DSW::Body2DSW() : CollisionObject2DSW(TYPE_BODY), active_list(this), inerti
area_linear_damp=0;
contact_count=0;
gravity_scale=1.0;
+ one_way_collision_max_depth=0.1;
still_time=0;
continuous_cd_mode=Physics2DServer::CCD_MODE_DISABLED;
diff --git a/servers/physics_2d/body_2d_sw.h b/servers/physics_2d/body_2d_sw.h
index 5bd68ba976..3b87be2737 100644
--- a/servers/physics_2d/body_2d_sw.h
+++ b/servers/physics_2d/body_2d_sw.h
@@ -67,6 +67,9 @@ class Body2DSW : public CollisionObject2DSW {
Vector2 applied_force;
real_t applied_torque;
+ Vector2 one_way_collision_direction;
+ float one_way_collision_max_depth;
+
SelfList<Body2DSW> active_list;
SelfList<Body2DSW> inertia_update_list;
@@ -216,6 +219,12 @@ public:
_FORCE_INLINE_ void set_continuous_collision_detection_mode(Physics2DServer::CCDMode p_mode) { continuous_cd_mode=p_mode; }
_FORCE_INLINE_ Physics2DServer::CCDMode get_continuous_collision_detection_mode() const { return continuous_cd_mode; }
+ void set_one_way_collision_direction(const Vector2& p_dir) { one_way_collision_direction=p_dir; }
+ Vector2 get_one_way_collision_direction() const { return one_way_collision_direction; }
+
+ void set_one_way_collision_max_depth(float p_depth) { one_way_collision_max_depth=p_depth; }
+ float get_one_way_collision_max_depth() const { return one_way_collision_max_depth; }
+
void set_space(Space2DSW *p_space);
void update_inertias();
diff --git a/servers/physics_2d/physics_2d_server_sw.cpp b/servers/physics_2d/physics_2d_server_sw.cpp
index ab85f5e1d6..be49955055 100644
--- a/servers/physics_2d/physics_2d_server_sw.cpp
+++ b/servers/physics_2d/physics_2d_server_sw.cpp
@@ -138,6 +138,21 @@ void Physics2DServerSW::_shape_col_cbk(const Vector2& p_point_A,const Vector2& p
if (cbk->max==0)
return;
+ if (cbk->valid_dir!=Vector2()) {
+ if (p_point_A.distance_squared_to(p_point_B)>cbk->valid_depth*cbk->valid_depth) {
+ return;
+ }
+ if (cbk->valid_dir.dot((p_point_A-p_point_B).normalized())<0.7071) {
+/* print_line("A: "+p_point_A);
+ print_line("B: "+p_point_B);
+ print_line("discard too angled "+rtos(cbk->valid_dir.dot((p_point_A-p_point_B))));
+ print_line("resnorm: "+(p_point_A-p_point_B).normalized());
+ print_line("distance: "+rtos(p_point_A.distance_to(p_point_B)));
+*/
+ return;
+ }
+ }
+
if (cbk->amount == cbk->max) {
//find least deep
float min_depth=1e20;
@@ -860,6 +875,37 @@ int Physics2DServerSW::body_get_max_contacts_reported(RID p_body) const {
return body->get_max_contacts_reported();
}
+void Physics2DServerSW::body_set_one_way_collision_direction(RID p_body,const Vector2& p_direction) {
+
+ Body2DSW *body = body_owner.get(p_body);
+ ERR_FAIL_COND(!body);
+ body->set_one_way_collision_direction(p_direction);
+}
+
+Vector2 Physics2DServerSW::body_get_one_way_collision_direction(RID p_body) const{
+
+ Body2DSW *body = body_owner.get(p_body);
+ ERR_FAIL_COND_V(!body,Vector2());
+ return body->get_one_way_collision_direction();
+
+}
+
+void Physics2DServerSW::body_set_one_way_collision_max_depth(RID p_body,float p_max_depth) {
+
+ Body2DSW *body = body_owner.get(p_body);
+ ERR_FAIL_COND(!body);
+ body->set_one_way_collision_max_depth(p_max_depth);
+
+}
+
+float Physics2DServerSW::body_get_one_way_collision_max_depth(RID p_body) const {
+
+ Body2DSW *body = body_owner.get(p_body);
+ ERR_FAIL_COND_V(!body,0);
+ return body->get_one_way_collision_max_depth();
+
+}
+
void Physics2DServerSW::body_set_force_integration_callback(RID p_body,Object *p_receiver,const StringName& p_method,const Variant& p_udata) {
diff --git a/servers/physics_2d/physics_2d_server_sw.h b/servers/physics_2d/physics_2d_server_sw.h
index 9edd4eee11..e9c499aaff 100644
--- a/servers/physics_2d/physics_2d_server_sw.h
+++ b/servers/physics_2d/physics_2d_server_sw.h
@@ -71,6 +71,8 @@ public:
struct CollCbkData {
+ Vector2 valid_dir;
+ float valid_depth;
int max;
int amount;
Vector2 *ptr;
@@ -205,6 +207,13 @@ public:
virtual void body_set_max_contacts_reported(RID p_body, int p_contacts);
virtual int body_get_max_contacts_reported(RID p_body) const;
+ virtual void body_set_one_way_collision_direction(RID p_body,const Vector2& p_direction);
+ virtual Vector2 body_get_one_way_collision_direction(RID p_body) const;
+
+ virtual void body_set_one_way_collision_max_depth(RID p_body,float p_max_depth);
+ virtual float body_get_one_way_collision_max_depth(RID p_body) const;
+
+
virtual void body_set_force_integration_callback(RID p_body,Object *p_receiver,const StringName& p_method,const Variant& p_udata=Variant());
virtual bool body_collide_shape(RID p_body, int p_body_shape,RID p_shape, const Matrix32& p_shape_xform,const Vector2& p_motion,Vector2 *r_results,int p_result_max,int &r_result_count);
diff --git a/servers/physics_2d/shape_2d_sw.cpp b/servers/physics_2d/shape_2d_sw.cpp
index 336eec73b5..ed63870a12 100644
--- a/servers/physics_2d/shape_2d_sw.cpp
+++ b/servers/physics_2d/shape_2d_sw.cpp
@@ -136,6 +136,7 @@ real_t LineShape2DSW::get_moment_of_inertia(float p_mass, const Vector2 &p_scale
return 0;
}
+
void LineShape2DSW::set_data(const Variant& p_data) {
ERR_FAIL_COND(p_data.get_type()!=Variant::ARRAY);
diff --git a/servers/physics_2d/shape_2d_sw.h b/servers/physics_2d/shape_2d_sw.h
index 51ece9fc7e..931491efd5 100644
--- a/servers/physics_2d/shape_2d_sw.h
+++ b/servers/physics_2d/shape_2d_sw.h
@@ -85,7 +85,6 @@ public:
virtual bool intersect_segment(const Vector2& p_begin,const Vector2& p_end,Vector2 &r_point, Vector2 &r_normal) const=0;
virtual real_t get_moment_of_inertia(float p_mass,const Vector2& p_scale) const=0;
-
virtual void set_data(const Variant& p_data)=0;
virtual Variant get_data() const=0;
diff --git a/servers/physics_2d/space_2d_sw.cpp b/servers/physics_2d/space_2d_sw.cpp
index 76069de9a0..f2ed74ffbf 100644
--- a/servers/physics_2d/space_2d_sw.cpp
+++ b/servers/physics_2d/space_2d_sw.cpp
@@ -98,7 +98,7 @@ bool Physics2DDirectSpaceStateSW::intersect_ray(const Vector2& p_from, const Vec
if (shape->intersect_segment(local_from,local_to,shape_point,shape_normal)) {
- //print_line("inters sgment!");
+
Matrix32 xform = col_obj->get_transform() * col_obj->get_shape_transform(shape_idx);
shape_point=xform.xform(shape_point);
@@ -217,6 +217,16 @@ bool Physics2DDirectSpaceStateSW::cast_motion(const RID& p_shape, const Matrix32
int shape_idx=space->intersection_query_subindex_results[i];
+ /*if (col_obj->get_type()==CollisionObject2DSW::TYPE_BODY) {
+
+ const Body2DSW *body=static_cast<const Body2DSW*>(col_obj);
+ if (body->get_one_way_collision_direction()!=Vector2() && p_motion.dot(body->get_one_way_collision_direction())<=CMP_EPSILON) {
+ print_line("failed in motion dir");
+ continue;
+ }
+ }*/
+
+
Matrix32 col_obj_xform = col_obj->get_transform() * col_obj->get_shape_transform(shape_idx);
//test initial overlap, does it collide if going all the way?
if (!CollisionSolver2DSW::solve(shape,p_xform,p_motion,col_obj->get_shape(shape_idx),col_obj_xform,Vector2() ,NULL,NULL,NULL,p_margin)) {
@@ -227,6 +237,14 @@ bool Physics2DDirectSpaceStateSW::cast_motion(const RID& p_shape, const Matrix32
//test initial overlap
if (CollisionSolver2DSW::solve(shape,p_xform,Vector2(),col_obj->get_shape(shape_idx),col_obj_xform,Vector2() ,NULL,NULL,NULL,p_margin)) {
+ if (col_obj->get_type()==CollisionObject2DSW::TYPE_BODY) {
+ //if one way collision direction ignore initial overlap
+ const Body2DSW *body=static_cast<const Body2DSW*>(col_obj);
+ if (body->get_one_way_collision_direction()!=Vector2()) {
+ continue;
+ }
+ }
+
return false;
}
@@ -253,6 +271,29 @@ bool Physics2DDirectSpaceStateSW::cast_motion(const RID& p_shape, const Matrix32
}
}
+ if (col_obj->get_type()==CollisionObject2DSW::TYPE_BODY) {
+
+ const Body2DSW *body=static_cast<const Body2DSW*>(col_obj);
+ if (body->get_one_way_collision_direction()!=Vector2()) {
+
+ Vector2 cd[2];
+ Physics2DServerSW::CollCbkData cbk;
+ cbk.max=1;
+ cbk.amount=0;
+ cbk.ptr=cd;
+ cbk.valid_dir=body->get_one_way_collision_direction();
+ cbk.valid_depth=body->get_one_way_collision_max_depth();
+
+ Vector2 sep=mnormal; //important optimization for this to work fast enough
+ bool collided = CollisionSolver2DSW::solve(shape,p_xform,p_motion*(hi+space->contact_max_allowed_penetration),col_obj->get_shape(shape_idx),col_obj_xform,Vector2(),Physics2DServerSW::_shape_col_cbk,&cbk,&sep,p_margin);
+ if (!collided || cbk.amount==0) {
+ continue;
+ }
+
+ }
+ }
+
+
if (low<best_safe) {
best_safe=low;
best_unsafe=hi;
@@ -311,14 +352,23 @@ bool Physics2DDirectSpaceStateSW::collide_shape(RID p_shape, const Matrix32& p_s
if (p_exclude.has( col_obj->get_self() ))
continue;
-
+ if (col_obj->get_type()==CollisionObject2DSW::TYPE_BODY) {
+
+ const Body2DSW *body=static_cast<const Body2DSW*>(col_obj);
+ cbk.valid_dir=body->get_one_way_collision_direction();
+ cbk.valid_depth=body->get_one_way_collision_max_depth();
+ } else {
+ cbk.valid_dir=Vector2();
+ cbk.valid_depth=0;
+ }
if (CollisionSolver2DSW::solve(shape,p_shape_xform,p_motion,col_obj->get_shape(shape_idx),col_obj->get_transform() * col_obj->get_shape_transform(shape_idx),Vector2(),cbkres,cbkptr,NULL,p_margin)) {
- collided=true;
+ collided=p_result_max==0 || cbk.amount>0;
}
}
+
r_result_count=cbk.amount;
return collided;
@@ -334,6 +384,8 @@ struct _RestCallbackData2D {
Vector2 best_contact;
Vector2 best_normal;
float best_len;
+ Vector2 valid_dir;
+ float valid_depth;
};
static void _rest_cbk_result(const Vector2& p_point_A,const Vector2& p_point_B,void *p_userdata) {
@@ -341,11 +393,23 @@ static void _rest_cbk_result(const Vector2& p_point_A,const Vector2& p_point_B,v
_RestCallbackData2D *rd=(_RestCallbackData2D*)p_userdata;
+ if (rd->valid_dir!=Vector2()) {
+
+ if (rd->valid_dir!=Vector2()) {
+ if (p_point_A.distance_squared_to(p_point_B)>rd->valid_depth*rd->valid_depth)
+ return;
+ if (rd->valid_dir.dot((p_point_A-p_point_B).normalized())<Math_PI*0.25)
+ return;
+ }
+
+ }
+
Vector2 contact_rel = p_point_B - p_point_A;
float len = contact_rel.length();
if (len <= rd->best_len)
return;
+
rd->best_len=len;
rd->best_contact=p_point_B;
rd->best_normal=contact_rel/len;
@@ -385,6 +449,17 @@ bool Physics2DDirectSpaceStateSW::rest_info(RID p_shape, const Matrix32& p_shape
if (p_exclude.has( col_obj->get_self() ))
continue;
+ if (col_obj->get_type()==CollisionObject2DSW::TYPE_BODY) {
+
+ const Body2DSW *body=static_cast<const Body2DSW*>(col_obj);
+ rcd.valid_dir=body->get_one_way_collision_direction();
+ rcd.valid_depth=body->get_one_way_collision_max_depth();
+ } else {
+ rcd.valid_dir=Vector2();
+ rcd.valid_depth=0;
+ }
+
+
rcd.object=col_obj;
rcd.shape=shape_idx;
bool sc = CollisionSolver2DSW::solve(shape,p_shape_xform,p_motion,col_obj->get_shape(shape_idx),col_obj->get_transform() * col_obj->get_shape_transform(shape_idx),Vector2() ,_rest_cbk_result,&rcd,NULL,p_margin);
diff --git a/servers/physics_2d_server.cpp b/servers/physics_2d_server.cpp
index 3633efc5eb..07389bc912 100644
--- a/servers/physics_2d_server.cpp
+++ b/servers/physics_2d_server.cpp
@@ -500,6 +500,13 @@ void Physics2DServer::_bind_methods() {
ObjectTypeDB::bind_method(_MD("body_set_max_contacts_reported","body","amount"),&Physics2DServer::body_set_max_contacts_reported);
ObjectTypeDB::bind_method(_MD("body_get_max_contacts_reported","body"),&Physics2DServer::body_get_max_contacts_reported);
+ ObjectTypeDB::bind_method(_MD("body_set_one_way_collision_direction","normal"),&Physics2DServer::body_set_one_way_collision_direction);
+ ObjectTypeDB::bind_method(_MD("body_get_one_way_collision_direction"),&Physics2DServer::body_get_one_way_collision_direction);
+
+ ObjectTypeDB::bind_method(_MD("body_set_one_way_collision_max_depth","normal"),&Physics2DServer::body_set_one_way_collision_max_depth);
+ ObjectTypeDB::bind_method(_MD("body_get_one_way_collision_max_depth"),&Physics2DServer::body_get_one_way_collision_max_depth);
+
+
ObjectTypeDB::bind_method(_MD("body_set_omit_force_integration","body","enable"),&Physics2DServer::body_set_omit_force_integration);
ObjectTypeDB::bind_method(_MD("body_is_omitting_force_integration","body"),&Physics2DServer::body_is_omitting_force_integration);
diff --git a/servers/physics_2d_server.h b/servers/physics_2d_server.h
index 6e53cde55c..765cebf45f 100644
--- a/servers/physics_2d_server.h
+++ b/servers/physics_2d_server.h
@@ -442,6 +442,12 @@ public:
virtual void body_set_max_contacts_reported(RID p_body, int p_contacts)=0;
virtual int body_get_max_contacts_reported(RID p_body) const=0;
+ virtual void body_set_one_way_collision_direction(RID p_body,const Vector2& p_direction)=0;
+ virtual Vector2 body_get_one_way_collision_direction(RID p_body) const=0;
+
+ virtual void body_set_one_way_collision_max_depth(RID p_body,float p_max_depth)=0;
+ virtual float body_get_one_way_collision_max_depth(RID p_body) const=0;
+
//missing remove
virtual void body_set_contacts_reported_depth_treshold(RID p_body, float p_treshold)=0;
virtual float body_get_contacts_reported_depth_treshold(RID p_body) const=0;
diff --git a/servers/visual/rasterizer.cpp b/servers/visual/rasterizer.cpp
index b5e74e0f2e..c3dcd83a31 100644
--- a/servers/visual/rasterizer.cpp
+++ b/servers/visual/rasterizer.cpp
@@ -568,8 +568,9 @@ void Rasterizer::_update_fixed_materials() {
}
material_set_param(fm.self,_fixed_material_uv_xform_name,fm.uv_xform);
- if (fm.use_pointsize)
+ if (fm.use_pointsize) {
material_set_param(fm.self,_fixed_material_point_size_name,fm.point_size);
+ }
}
fixed_material_dirty_list.remove(fixed_material_dirty_list.first());
@@ -620,6 +621,8 @@ Rasterizer::Rasterizer() {
_fixed_material_uv_xform_name="fmp_uv_xform";
_fixed_material_point_size_name="fmp_point_size";
+ draw_viewport_func=NULL;
+
ERR_FAIL_COND( sizeof(FixedMaterialShaderKey)!=4);
}
diff --git a/servers/visual/rasterizer.h b/servers/visual/rasterizer.h
index 8731095425..92c7b8ac14 100644
--- a/servers/visual/rasterizer.h
+++ b/servers/visual/rasterizer.h
@@ -40,6 +40,9 @@
class Rasterizer {
protected:
+
+ typedef void (*CanvasItemDrawViewportFunc)(VisualServer*owner,void*ud,const Rect2& p_rect);
+
RID create_default_material();
RID create_overdraw_debug_material();
@@ -207,6 +210,8 @@ public:
virtual void shader_set_default_texture_param(RID p_shader, const StringName& p_name, RID p_texture)=0;
virtual RID shader_get_default_texture_param(RID p_shader, const StringName& p_name) const=0;
+ virtual Variant shader_get_default_param(RID p_shader, const StringName& p_name)=0;
+
/* COMMON MATERIAL API */
virtual RID material_create()=0;
@@ -561,7 +566,279 @@ public:
CANVAS_RECT_FLIP_H=4,
CANVAS_RECT_FLIP_V=8
};
-
+
+ struct CanvasItem {
+
+ struct Command {
+
+ enum Type {
+
+ TYPE_LINE,
+ TYPE_RECT,
+ TYPE_STYLE,
+ TYPE_PRIMITIVE,
+ TYPE_POLYGON,
+ TYPE_POLYGON_PTR,
+ TYPE_CIRCLE,
+ TYPE_TRANSFORM,
+ TYPE_BLEND_MODE,
+ TYPE_CLIP_IGNORE,
+ };
+
+ Type type;
+ };
+
+ struct CommandLine : public Command {
+
+ Point2 from,to;
+ Color color;
+ float width;
+ CommandLine() { type = TYPE_LINE; }
+ };
+
+ struct CommandRect : public Command {
+
+ Rect2 rect;
+ RID texture;
+ Color modulate;
+ Rect2 source;
+ uint8_t flags;
+
+ CommandRect() { flags=0; type = TYPE_RECT; }
+ };
+
+ struct CommandStyle : public Command {
+
+ Rect2 rect;
+ RID texture;
+ float margin[4];
+ float draw_center;
+ Color color;
+ CommandStyle() { draw_center=true; type = TYPE_STYLE; }
+ };
+
+ struct CommandPrimitive : public Command {
+
+ Vector<Point2> points;
+ Vector<Point2> uvs;
+ Vector<Color> colors;
+ RID texture;
+ float width;
+
+ CommandPrimitive() { type = TYPE_PRIMITIVE; width=1;}
+ };
+
+ struct CommandPolygon : public Command {
+
+ Vector<int> indices;
+ Vector<Point2> points;
+ Vector<Point2> uvs;
+ Vector<Color> colors;
+ RID texture;
+ int count;
+
+ CommandPolygon() { type = TYPE_POLYGON; count = 0; }
+ };
+
+ struct CommandPolygonPtr : public Command {
+
+ const int* indices;
+ const Point2* points;
+ const Point2* uvs;
+ const Color* colors;
+ RID texture;
+ int count;
+
+ CommandPolygonPtr() { type = TYPE_POLYGON_PTR; count = 0; }
+ };
+
+ struct CommandCircle : public Command {
+
+ Point2 pos;
+ float radius;
+ Color color;
+ CommandCircle() { type = TYPE_CIRCLE; }
+ };
+
+ struct CommandTransform : public Command {
+
+ Matrix32 xform;
+ CommandTransform() { type = TYPE_TRANSFORM; }
+ };
+
+ struct CommandBlendMode : public Command {
+
+ VS::MaterialBlendMode blend_mode;
+ CommandBlendMode() { type = TYPE_BLEND_MODE; blend_mode = VS::MATERIAL_BLEND_MODE_MIX; }
+ };
+ struct CommandClipIgnore : public Command {
+
+ bool ignore;
+ CommandClipIgnore() { type = TYPE_CLIP_IGNORE; ignore=false; }
+ };
+
+
+ struct ViewportRender {
+ VisualServer*owner;
+ void* udata;
+ Rect2 rect;
+ };
+
+ Matrix32 xform;
+ bool clip;
+ bool visible;
+ bool ontop;
+ VS::MaterialBlendMode blend_mode;
+ Vector<Command*> commands;
+ mutable bool custom_rect;
+ mutable bool rect_dirty;
+ mutable Rect2 rect;
+ CanvasItem*next;
+ RID shader;
+ Map<StringName,Variant> shader_param;
+ uint32_t shader_version;
+
+
+ float final_opacity;
+ Matrix32 final_transform;
+ Rect2 final_clip_rect;
+ CanvasItem* final_clip_owner;
+ CanvasItem* shader_owner;
+ ViewportRender *vp_render;
+
+ const Rect2& get_rect() const {
+
+ if (custom_rect || !rect_dirty)
+ return rect;
+
+ //must update rect
+ int s=commands.size();
+ if (s==0) {
+
+ rect=Rect2();
+ rect_dirty=false;
+ return rect;
+ }
+
+ Matrix32 xf;
+ bool found_xform=false;
+ bool first=true;
+
+ const CanvasItem::Command * const *cmd = &commands[0];
+
+
+ for (int i=0;i<s;i++) {
+
+ const CanvasItem::Command *c=cmd[i];
+ Rect2 r;
+
+ switch(c->type) {
+ case CanvasItem::Command::TYPE_LINE: {
+
+ const CanvasItem::CommandLine* line = static_cast< const CanvasItem::CommandLine*>(c);
+ r.pos=line->from;
+ r.expand_to(line->to);
+ } break;
+ case CanvasItem::Command::TYPE_RECT: {
+
+ const CanvasItem::CommandRect* crect = static_cast< const CanvasItem::CommandRect*>(c);
+ r=crect->rect;
+
+ } break;
+ case CanvasItem::Command::TYPE_STYLE: {
+
+ const CanvasItem::CommandStyle* style = static_cast< const CanvasItem::CommandStyle*>(c);
+ r=style->rect;
+ } break;
+ case CanvasItem::Command::TYPE_PRIMITIVE: {
+
+ const CanvasItem::CommandPrimitive* primitive = static_cast< const CanvasItem::CommandPrimitive*>(c);
+ r.pos=primitive->points[0];
+ for(int i=1;i<primitive->points.size();i++) {
+
+ r.expand_to(primitive->points[i]);
+
+ }
+ } break;
+ case CanvasItem::Command::TYPE_POLYGON: {
+
+ const CanvasItem::CommandPolygon* polygon = static_cast< const CanvasItem::CommandPolygon*>(c);
+ int l = polygon->points.size();
+ const Point2*pp=&polygon->points[0];
+ r.pos=pp[0];
+ for(int i=1;i<l;i++) {
+
+ r.expand_to(pp[i]);
+
+ }
+ } break;
+
+ case CanvasItem::Command::TYPE_POLYGON_PTR: {
+
+ const CanvasItem::CommandPolygonPtr* polygon = static_cast< const CanvasItem::CommandPolygonPtr*>(c);
+ int l = polygon->count;
+ if (polygon->indices != NULL) {
+
+ r.pos=polygon->points[polygon->indices[0]];
+ for (int i=1; i<polygon->count; i++) {
+
+ r.expand_to(polygon->points[polygon->indices[i]]);
+ };
+ } else {
+ r.pos=polygon->points[0];
+ for (int i=1; i<polygon->count; i++) {
+
+ r.expand_to(polygon->points[i]);
+ };
+ };
+ } break;
+ case CanvasItem::Command::TYPE_CIRCLE: {
+
+ const CanvasItem::CommandCircle* circle = static_cast< const CanvasItem::CommandCircle*>(c);
+ r.pos=Point2(-circle->radius,-circle->radius)+circle->pos;
+ r.size=Point2(circle->radius*2.0,circle->radius*2.0);
+ } break;
+ case CanvasItem::Command::TYPE_TRANSFORM: {
+
+ const CanvasItem::CommandTransform* transform = static_cast<const CanvasItem::CommandTransform*>(c);
+ xf=transform->xform;
+ found_xform=true;
+ continue;
+ } break;
+ case CanvasItem::Command::TYPE_BLEND_MODE: {
+
+ } break;
+ case CanvasItem::Command::TYPE_CLIP_IGNORE: {
+
+ } break;
+ }
+
+ if (found_xform) {
+ r = xf.xform(r);
+ found_xform=false;
+ }
+
+
+ if (first) {
+ rect=r;
+ first=false;
+ } else
+ rect=rect.merge(r);
+ }
+
+ rect_dirty=false;
+ return rect;
+ }
+
+ void clear() { for (int i=0;i<commands.size();i++) memdelete( commands[i] ); commands.clear(); clip=false; rect_dirty=true; final_clip_owner=NULL; shader_owner=NULL;}
+ CanvasItem() { vp_render=NULL; next=NULL; final_clip_owner=NULL; clip=false; final_opacity=1; blend_mode=VS::MATERIAL_BLEND_MODE_MIX; visible=true; rect_dirty=true; custom_rect=false; ontop=true; shader_version=0; shader_owner=NULL;}
+ virtual ~CanvasItem() { clear(); }
+ };
+
+
+ CanvasItemDrawViewportFunc draw_viewport_func;
+
+
virtual void canvas_begin()=0;
virtual void canvas_disable_blending()=0;
virtual void canvas_set_opacity(float p_opacity)=0;
@@ -575,7 +852,10 @@ public:
virtual void canvas_draw_primitive(const Vector<Point2>& p_points, const Vector<Color>& p_colors,const Vector<Point2>& p_uvs, RID p_texture,float p_width)=0;
virtual void canvas_draw_polygon(int p_vertex_count, const int* p_indices, const Vector2* p_vertices, const Vector2* p_uvs, const Color* p_colors,const RID& p_texture,bool p_singlecolor)=0;
virtual void canvas_set_transform(const Matrix32& p_transform)=0;
-
+
+ virtual void canvas_render_items(CanvasItem *p_item_list)=0;
+
+
/* ENVIRONMENT */
diff --git a/servers/visual/rasterizer_dummy.cpp b/servers/visual/rasterizer_dummy.cpp
index a399960014..6c1b6697c1 100644
--- a/servers/visual/rasterizer_dummy.cpp
+++ b/servers/visual/rasterizer_dummy.cpp
@@ -231,6 +231,11 @@ RID RasterizerDummy::shader_get_default_texture_param(RID p_shader, const String
return RID();
}
+Variant RasterizerDummy::shader_get_default_param(RID p_shader, const StringName& p_name) {
+
+ return Variant();
+}
+
/* COMMON MATERIAL API */
@@ -1617,6 +1622,11 @@ void RasterizerDummy::canvas_set_transform(const Matrix32& p_transform) {
}
+void RasterizerDummy::canvas_render_items(CanvasItem *p_item_list) {
+
+
+}
+
/* ENVIRONMENT */
RID RasterizerDummy::environment_create() {
diff --git a/servers/visual/rasterizer_dummy.h b/servers/visual/rasterizer_dummy.h
index d879fcafeb..c72149f88f 100644
--- a/servers/visual/rasterizer_dummy.h
+++ b/servers/visual/rasterizer_dummy.h
@@ -433,6 +433,8 @@ public:
virtual void shader_set_default_texture_param(RID p_shader, const StringName& p_name, RID p_texture);
virtual RID shader_get_default_texture_param(RID p_shader, const StringName& p_name) const;
+ virtual Variant shader_get_default_param(RID p_shader, const StringName& p_name);
+
/* COMMON MATERIAL API */
virtual RID material_create();
@@ -708,6 +710,8 @@ public:
virtual void canvas_draw_polygon(int p_vertex_count, const int* p_indices, const Vector2* p_vertices, const Vector2* p_uvs, const Color* p_colors,const RID& p_texture,bool p_singlecolor);
virtual void canvas_set_transform(const Matrix32& p_transform);
+ virtual void canvas_render_items(CanvasItem *p_item_list);
+
/* ENVIRONMENT */
virtual RID environment_create();
diff --git a/servers/visual/shader_language.cpp b/servers/visual/shader_language.cpp
index 40e36d2a89..dfa0172e82 100644
--- a/servers/visual/shader_language.cpp
+++ b/servers/visual/shader_language.cpp
@@ -768,16 +768,20 @@ const ShaderLanguage::IntrinsicFuncDef ShaderLanguage::intrinsic_func_defs[]={
//constructors
{"bool",TYPE_BOOL,{TYPE_BOOL,TYPE_VOID}},
{"float",TYPE_FLOAT,{TYPE_FLOAT,TYPE_VOID}},
+ {"vec2",TYPE_VEC2,{TYPE_FLOAT,TYPE_VOID}},
{"vec2",TYPE_VEC2,{TYPE_FLOAT,TYPE_FLOAT,TYPE_VOID}},
+ {"vec3",TYPE_VEC3,{TYPE_FLOAT,TYPE_VOID}},
{"vec3",TYPE_VEC3,{TYPE_FLOAT,TYPE_FLOAT,TYPE_FLOAT,TYPE_VOID}},
{"vec3",TYPE_VEC3,{TYPE_VEC2,TYPE_FLOAT,TYPE_VOID}},
{"vec3",TYPE_VEC3,{TYPE_FLOAT,TYPE_VEC2,TYPE_VOID}},
+ {"vec4",TYPE_VEC4,{TYPE_FLOAT,TYPE_VOID}},
{"vec4",TYPE_VEC4,{TYPE_FLOAT,TYPE_FLOAT,TYPE_FLOAT,TYPE_FLOAT,TYPE_VOID}},
{"vec4",TYPE_VEC4,{TYPE_FLOAT,TYPE_VEC2,TYPE_FLOAT,TYPE_VOID}},
{"vec4",TYPE_VEC4,{TYPE_VEC2,TYPE_FLOAT,TYPE_FLOAT,TYPE_VOID}},
{"vec4",TYPE_VEC4,{TYPE_FLOAT,TYPE_FLOAT,TYPE_VEC2,TYPE_VOID}},
{"vec4",TYPE_VEC4,{TYPE_FLOAT,TYPE_VEC3,TYPE_VOID}},
{"vec4",TYPE_VEC4,{TYPE_VEC3,TYPE_FLOAT,TYPE_VOID}},
+ {"vec4",TYPE_VEC4,{TYPE_VEC2,TYPE_VEC2,TYPE_VOID}},
{"mat3",TYPE_MAT3,{TYPE_VEC3,TYPE_VEC3,TYPE_VEC3,TYPE_VOID}},
{"mat4",TYPE_MAT4,{TYPE_VEC4,TYPE_VEC4,TYPE_VEC4,TYPE_VEC4,TYPE_VOID}},
//intrinsics - trigonometry
@@ -856,6 +860,9 @@ const ShaderLanguage::IntrinsicFuncDef ShaderLanguage::intrinsic_func_defs[]={
{"clamp",TYPE_VEC2,{TYPE_VEC2,TYPE_VEC2,TYPE_VEC2,TYPE_VOID}},
{"clamp",TYPE_VEC3,{TYPE_VEC3,TYPE_VEC3,TYPE_VEC3,TYPE_VOID}},
{"clamp",TYPE_VEC4,{TYPE_VEC4,TYPE_VEC4,TYPE_VEC4,TYPE_VOID}},
+ {"clamp",TYPE_VEC2,{TYPE_VEC2,TYPE_FLOAT,TYPE_FLOAT,TYPE_VOID}},
+ {"clamp",TYPE_VEC3,{TYPE_VEC3,TYPE_FLOAT,TYPE_FLOAT,TYPE_VOID}},
+ {"clamp",TYPE_VEC4,{TYPE_VEC4,TYPE_FLOAT,TYPE_FLOAT,TYPE_VOID}},
{"mix",TYPE_FLOAT,{TYPE_FLOAT,TYPE_FLOAT,TYPE_FLOAT,TYPE_VOID}},
{"mix",TYPE_VEC2,{TYPE_VEC2,TYPE_VEC2,TYPE_FLOAT,TYPE_VOID}},
{"mix",TYPE_VEC2,{TYPE_VEC2,TYPE_VEC2,TYPE_VEC2,TYPE_VOID}},
@@ -893,6 +900,7 @@ const ShaderLanguage::IntrinsicFuncDef ShaderLanguage::intrinsic_func_defs[]={
{"normalize",TYPE_VEC3,{TYPE_VEC3,TYPE_VOID}},
{"normalize",TYPE_VEC4,{TYPE_VEC4,TYPE_VOID}},
{"reflect",TYPE_VEC3,{TYPE_VEC3,TYPE_VEC3,TYPE_VOID}},
+ {"refract",TYPE_VEC3,{TYPE_VEC3,TYPE_VEC3,TYPE_FLOAT,TYPE_VOID}},
//intrinsics - texture
{"tex",TYPE_VEC4,{TYPE_TEXTURE,TYPE_VEC2,TYPE_VOID}},
{"texcube",TYPE_VEC4,{TYPE_CUBEMAP,TYPE_VEC3,TYPE_VOID}},
@@ -1047,7 +1055,7 @@ const ShaderLanguage::BuiltinsDef ShaderLanguage::vertex_builtins_defs[]={
const ShaderLanguage::BuiltinsDef ShaderLanguage::fragment_builtins_defs[]={
{ "VERTEX", TYPE_VEC3},
- { "POSITION", TYPE_VEC3},
+ { "POSITION", TYPE_VEC4},
{ "NORMAL", TYPE_VEC3},
{ "TANGENT", TYPE_VEC3},
{ "BINORMAL", TYPE_VEC3},
@@ -1098,6 +1106,62 @@ const ShaderLanguage::BuiltinsDef ShaderLanguage::light_builtins_defs[]={
};
+
+
+const ShaderLanguage::BuiltinsDef ShaderLanguage::ci_vertex_builtins_defs[]={
+
+ { "SRC_VERTEX", TYPE_VEC2},
+ { "VERTEX", TYPE_VEC2},
+ { "WORLD_VERTEX", TYPE_VEC2},
+ { "UV", TYPE_VEC2},
+ { "COLOR", TYPE_VEC4},
+ { "VAR1", TYPE_VEC4},
+ { "VAR2", TYPE_VEC4},
+ { "POINT_SIZE", TYPE_FLOAT},
+
+ //builtins
+ { "WORLD_MATRIX", TYPE_MAT4},
+ { "PROJECTION_MATRIX", TYPE_MAT4},
+ { "EXTRA_MATRIX", TYPE_MAT4},
+ { "TIME", TYPE_FLOAT},
+ { NULL, TYPE_VOID},
+};
+const ShaderLanguage::BuiltinsDef ShaderLanguage::ci_fragment_builtins_defs[]={
+
+ { "SRC_COLOR", TYPE_VEC4},
+ { "POSITION", TYPE_VEC4},
+ { "NORMAL", TYPE_VEC3},
+ { "UV", TYPE_VEC2},
+ { "COLOR", TYPE_VEC4},
+ { "TEXTURE", TYPE_TEXTURE},
+ { "TEXTURE_PIXEL_SIZE", TYPE_VEC2},
+ { "VAR1", TYPE_VEC4},
+ { "VAR2", TYPE_VEC4},
+ { "SCREEN_UV", TYPE_VEC2},
+ { "POINT_COORD", TYPE_VEC2},
+
+// { "SCREEN_POS", TYPE_VEC2},
+// { "SCREEN_TEXEL_SIZE", TYPE_VEC2},
+ { "TIME", TYPE_FLOAT},
+ { NULL, TYPE_VOID}
+
+};
+
+const ShaderLanguage::BuiltinsDef ShaderLanguage::ci_light_builtins_defs[]={
+
+ { "COLOR", TYPE_VEC4},
+ { "NORMAL", TYPE_VEC3},
+ { "LIGHT_DIR", TYPE_VEC2},
+ { "LIGHT_DISTANCE", TYPE_FLOAT},
+ { "LIGHT", TYPE_VEC3},
+ { "POINT_COORD", TYPE_VEC2},
+// { "SCREEN_POS", TYPE_VEC2},
+// { "SCREEN_TEXEL_SIZE", TYPE_VEC2},
+ { "TIME", TYPE_FLOAT},
+ { NULL, TYPE_VOID}
+
+};
+
const ShaderLanguage::BuiltinsDef ShaderLanguage::postprocess_fragment_builtins_defs[]={
{ "IN_COLOR", TYPE_VEC3},
@@ -1210,9 +1274,25 @@ ShaderLanguage::Node* ShaderLanguage::validate_function_call(Parser&parser, Oper
Variant data;
switch(p_func->return_cache) {
case TYPE_FLOAT: data = cdata[0]; break;
- case TYPE_VEC2: data = Vector2(cdata[0],cdata[1]); break;
- case TYPE_VEC3: data = Vector3(cdata[0],cdata[1],cdata[2]); break;
- case TYPE_VEC4: data = Plane(cdata[0],cdata[1],cdata[2],cdata[3]); break;
+ case TYPE_VEC2:
+ if (cdata.size()==1)
+ data = Vector2(cdata[0],cdata[0]);
+ else
+ data = Vector2(cdata[0],cdata[1]);
+
+ break;
+ case TYPE_VEC3:
+ if (cdata.size()==1)
+ data = Vector3(cdata[0],cdata[0],cdata[0]);
+ else
+ data = Vector3(cdata[0],cdata[1],cdata[2]);
+ break;
+ case TYPE_VEC4:
+ if (cdata.size()==1)
+ data = Plane(cdata[0],cdata[0],cdata[0],cdata[0]);
+ else
+ data = Plane(cdata[0],cdata[1],cdata[2],cdata[3]);
+ break;
}
cn->datatype=p_func->return_cache;
@@ -2448,6 +2528,27 @@ Error ShaderLanguage::parse(const Vector<Token>& p_tokens,ShaderType p_type,Comp
idx++;
}
} break;
+ case SHADER_CANVAS_ITEM_VERTEX: {
+ int idx=0;
+ while (ci_vertex_builtins_defs[idx].name) {
+ parser.program->builtin_variables[ci_vertex_builtins_defs[idx].name]=ci_vertex_builtins_defs[idx].type;
+ idx++;
+ }
+ } break;
+ case SHADER_CANVAS_ITEM_FRAGMENT: {
+ int idx=0;
+ while (ci_fragment_builtins_defs[idx].name) {
+ parser.program->builtin_variables[ci_fragment_builtins_defs[idx].name]=ci_fragment_builtins_defs[idx].type;
+ idx++;
+ }
+ } break;
+ case SHADER_CANVAS_ITEM_LIGHT: {
+ int idx=0;
+ while (ci_light_builtins_defs[idx].name) {
+ parser.program->builtin_variables[ci_light_builtins_defs[idx].name]=ci_light_builtins_defs[idx].type;
+ idx++;
+ }
+ } break;
case SHADER_POST_PROCESS: {
int idx=0;
while (postprocess_fragment_builtins_defs[idx].name) {
@@ -2545,6 +2646,28 @@ void ShaderLanguage::get_keyword_list(ShaderType p_type, List<String> *p_keyword
idx++;
}
} break;
+ case SHADER_CANVAS_ITEM_VERTEX: {
+ idx=0;
+ while (ci_vertex_builtins_defs[idx].name) {
+ p_keywords->push_back(ci_vertex_builtins_defs[idx].name);
+ idx++;
+ }
+ } break;
+ case SHADER_CANVAS_ITEM_FRAGMENT: {
+ idx=0;
+ while (ci_fragment_builtins_defs[idx].name) {
+ p_keywords->push_back(ci_fragment_builtins_defs[idx].name);
+ idx++;
+ }
+ } break;
+ case SHADER_CANVAS_ITEM_LIGHT: {
+ idx=0;
+ while (ci_light_builtins_defs[idx].name) {
+ p_keywords->push_back(ci_light_builtins_defs[idx].name);
+ idx++;
+ }
+ } break;
+
case SHADER_POST_PROCESS: {
idx=0;
while (postprocess_fragment_builtins_defs[idx].name) {
diff --git a/servers/visual/shader_language.h b/servers/visual/shader_language.h
index 7e01368dd5..f79c219d85 100644
--- a/servers/visual/shader_language.h
+++ b/servers/visual/shader_language.h
@@ -105,6 +105,9 @@ public:
SHADER_MATERIAL_VERTEX,
SHADER_MATERIAL_FRAGMENT,
SHADER_MATERIAL_LIGHT,
+ SHADER_CANVAS_ITEM_VERTEX,
+ SHADER_CANVAS_ITEM_FRAGMENT,
+ SHADER_CANVAS_ITEM_LIGHT,
SHADER_POST_PROCESS,
};
@@ -376,6 +379,12 @@ private:
static const BuiltinsDef vertex_builtins_defs[];
static const BuiltinsDef fragment_builtins_defs[];
static const BuiltinsDef light_builtins_defs[];
+
+ static const BuiltinsDef ci_vertex_builtins_defs[];
+ static const BuiltinsDef ci_fragment_builtins_defs[];
+ static const BuiltinsDef ci_light_builtins_defs[];
+
+
static const BuiltinsDef postprocess_fragment_builtins_defs[];
static DataType get_token_datatype(TokenType p_type);
diff --git a/servers/visual/visual_server_raster.cpp b/servers/visual/visual_server_raster.cpp
index 7cfa6dbb32..fc32702a12 100644
--- a/servers/visual/visual_server_raster.cpp
+++ b/servers/visual/visual_server_raster.cpp
@@ -3352,129 +3352,6 @@ void VisualServerRaster::canvas_item_set_clip(RID p_item, bool p_clip) {
canvas_item->clip=p_clip;
}
-const Rect2& VisualServerRaster::CanvasItem::get_rect() const {
-
- if (custom_rect || !rect_dirty)
- return rect;
-
- //must update rect
- int s=commands.size();
- if (s==0) {
-
- rect=Rect2();
- rect_dirty=false;
- return rect;
- }
-
- Matrix32 xf;
- bool found_xform=false;
- bool first=true;
-
- const CanvasItem::Command * const *cmd = &commands[0];
-
-
- for (int i=0;i<s;i++) {
-
- const CanvasItem::Command *c=cmd[i];
- Rect2 r;
-
- switch(c->type) {
- case CanvasItem::Command::TYPE_LINE: {
-
- const CanvasItem::CommandLine* line = static_cast< const CanvasItem::CommandLine*>(c);
- r.pos=line->from;
- r.expand_to(line->to);
- } break;
- case CanvasItem::Command::TYPE_RECT: {
-
- const CanvasItem::CommandRect* crect = static_cast< const CanvasItem::CommandRect*>(c);
- r=crect->rect;
-
- } break;
- case CanvasItem::Command::TYPE_STYLE: {
-
- const CanvasItem::CommandStyle* style = static_cast< const CanvasItem::CommandStyle*>(c);
- r=style->rect;
- } break;
- case CanvasItem::Command::TYPE_PRIMITIVE: {
-
- const CanvasItem::CommandPrimitive* primitive = static_cast< const CanvasItem::CommandPrimitive*>(c);
- r.pos=primitive->points[0];
- for(int i=1;i<primitive->points.size();i++) {
-
- r.expand_to(primitive->points[i]);
-
- }
- } break;
- case CanvasItem::Command::TYPE_POLYGON: {
-
- const CanvasItem::CommandPolygon* polygon = static_cast< const CanvasItem::CommandPolygon*>(c);
- int l = polygon->points.size();
- const Point2*pp=&polygon->points[0];
- r.pos=pp[0];
- for(int i=1;i<l;i++) {
-
- r.expand_to(pp[i]);
-
- }
- } break;
-
- case CanvasItem::Command::TYPE_POLYGON_PTR: {
-
- const CanvasItem::CommandPolygonPtr* polygon = static_cast< const CanvasItem::CommandPolygonPtr*>(c);
- int l = polygon->count;
- if (polygon->indices != NULL) {
-
- r.pos=polygon->points[polygon->indices[0]];
- for (int i=1; i<polygon->count; i++) {
-
- r.expand_to(polygon->points[polygon->indices[i]]);
- };
- } else {
- r.pos=polygon->points[0];
- for (int i=1; i<polygon->count; i++) {
-
- r.expand_to(polygon->points[i]);
- };
- };
- } break;
- case CanvasItem::Command::TYPE_CIRCLE: {
-
- const CanvasItem::CommandCircle* circle = static_cast< const CanvasItem::CommandCircle*>(c);
- r.pos=Point2(-circle->radius,-circle->radius)+circle->pos;
- r.size=Point2(circle->radius*2.0,circle->radius*2.0);
- } break;
- case CanvasItem::Command::TYPE_TRANSFORM: {
-
- const CanvasItem::CommandTransform* transform = static_cast<const CanvasItem::CommandTransform*>(c);
- xf=transform->xform;
- found_xform=true;
- continue;
- } break;
- case CanvasItem::Command::TYPE_BLEND_MODE: {
-
- } break;
- case CanvasItem::Command::TYPE_CLIP_IGNORE: {
-
- } break;
- }
-
- if (found_xform) {
- r = xf.xform(r);
- found_xform=false;
- }
-
-
- if (first) {
- rect=r;
- first=false;
- } else
- rect=rect.merge(r);
- }
-
- rect_dirty=false;
- return rect;
-}
void VisualServerRaster::canvas_item_set_transform(RID p_item, const Matrix32& p_transform) {
@@ -3812,6 +3689,74 @@ void VisualServerRaster::canvas_item_add_set_blend_mode(RID p_item, MaterialBlen
canvas_item->commands.push_back(bm);
};
+void VisualServerRaster::canvas_item_set_z(RID p_item, int p_z) {
+
+ ERR_FAIL_COND(p_z<CANVAS_ITEM_Z_MIN || p_z>CANVAS_ITEM_Z_MAX);
+ VS_CHANGED;
+ CanvasItem *canvas_item = canvas_item_owner.get( p_item );
+ ERR_FAIL_COND(!canvas_item);
+ canvas_item->z=p_z;
+
+}
+
+void VisualServerRaster::canvas_item_set_z_as_relative_to_parent(RID p_item, bool p_enable) {
+
+ VS_CHANGED;
+ CanvasItem *canvas_item = canvas_item_owner.get( p_item );
+ ERR_FAIL_COND(!canvas_item);
+ canvas_item->z_relative=p_enable;
+
+}
+
+void VisualServerRaster::canvas_item_set_use_parent_shader(RID p_item, bool p_enable) {
+
+ VS_CHANGED;
+ CanvasItem *canvas_item = canvas_item_owner.get( p_item );
+ ERR_FAIL_COND(!canvas_item);
+ canvas_item->use_parent_shader=p_enable;
+
+}
+
+void VisualServerRaster::canvas_item_set_shader(RID p_item, RID p_shader) {
+
+ VS_CHANGED;
+ CanvasItem *canvas_item = canvas_item_owner.get( p_item );
+ ERR_FAIL_COND(!canvas_item);
+ canvas_item->shader=p_shader;
+}
+
+RID VisualServerRaster::canvas_item_get_shader(RID p_item) const{
+
+ CanvasItem *canvas_item = canvas_item_owner.get( p_item );
+ ERR_FAIL_COND_V(!canvas_item,RID());
+ return canvas_item->shader;
+
+}
+
+void VisualServerRaster::canvas_item_set_shader_param(RID p_canvas_item, const StringName& p_param, const Variant& p_value){
+
+ VS_CHANGED;
+ CanvasItem *canvas_item = canvas_item_owner.get( p_canvas_item );
+ ERR_FAIL_COND(!canvas_item);
+ if (p_value.get_type()==Variant::NIL)
+ canvas_item->shader_param.erase(p_param);
+ else
+ canvas_item->shader_param[p_param]=p_value;
+
+}
+Variant VisualServerRaster::canvas_item_get_shader_param(RID p_canvas_item, const StringName& p_param) const{
+
+ CanvasItem *canvas_item = canvas_item_owner.get( p_canvas_item );
+ ERR_FAIL_COND_V(!canvas_item,Variant());
+ if (!canvas_item->shader_param.has(p_param)) {
+ ERR_FAIL_COND_V(!canvas_item->shader.is_valid(),Variant());
+ return rasterizer->shader_get_default_param(canvas_item->shader,p_param);
+ }
+
+ return canvas_item->shader_param[p_param];
+}
+
+
void VisualServerRaster::canvas_item_set_sort_children_by_y(RID p_item, bool p_enable) {
VS_CHANGED;
@@ -3874,6 +3819,91 @@ void VisualServerRaster::canvas_item_raise(RID p_item) {
}
+/***** CANVAS LIGHT *******/
+
+RID VisualServerRaster::canvas_light_create() {
+
+ return RID();
+}
+
+void VisualServerRaster::canvas_light_attach_to_canvas(RID p_light,RID p_canvas){
+
+
+}
+void VisualServerRaster::canvas_light_set_enabled(RID p_light, bool p_enabled){
+
+
+}
+void VisualServerRaster::canvas_light_set_transform(RID p_light, const Matrix32& p_transform){
+
+
+}
+void VisualServerRaster::canvas_light_set_texture(RID p_light, RID p_texture){
+
+
+}
+void VisualServerRaster::canvas_light_set_texture_offset(RID p_light, const Vector2& p_offset){
+
+
+}
+void VisualServerRaster::canvas_light_set_color(RID p_light, const Color& p_color){
+
+
+}
+void VisualServerRaster::canvas_light_set_height(RID p_light, float p_height){
+
+
+}
+void VisualServerRaster::canvas_light_set_z_range(RID p_light, int p_min_z,int p_max_z){
+
+
+}
+void VisualServerRaster::canvas_light_set_item_mask(RID p_light, int p_mask){
+
+
+}
+
+void VisualServerRaster::canvas_light_set_blend_mode(RID p_light, CanvasLightBlendMode p_blend_mode){
+
+
+}
+void VisualServerRaster::canvas_light_set_shadow_enabled(RID p_light, bool p_enabled){
+
+
+}
+void VisualServerRaster::canvas_light_set_shadow_buffer_size(RID p_light, int p_size){
+
+
+}
+void VisualServerRaster::canvas_light_set_shadow_filter(RID p_light, int p_size){
+
+
+}
+
+/****** CANVAS LIGHT OCCLUDER ******/
+
+RID VisualServerRaster::canvas_light_occluder_create() {
+
+ return RID();
+}
+
+void VisualServerRaster::canvas_light_occluder_attach_to_canvas(RID p_occluder,RID p_canvas) {
+
+
+}
+
+void VisualServerRaster::canvas_light_occluder_set_enabled(RID p_occluder,bool p_enabled){
+
+
+}
+
+void VisualServerRaster::canvas_light_occluder_set_shape(RID p_occluder,const DVector<Vector2>& p_shape){
+
+
+}
+
+
+
/******** CANVAS *********/
@@ -6200,7 +6230,41 @@ void VisualServerRaster::_render_camera(Viewport *p_viewport,Camera *p_camera, S
rasterizer->end_scene();
}
-void VisualServerRaster::_render_canvas_item(CanvasItem *p_canvas_item,const Matrix32& p_transform,const Rect2& p_clip_rect, float p_opacity) {
+
+void VisualServerRaster::_render_canvas_item_tree(CanvasItem *p_canvas_item,const Matrix32& p_transform,const Rect2& p_clip_rect) {
+
+
+ static const int z_range = CANVAS_ITEM_Z_MAX-CANVAS_ITEM_Z_MIN+1;
+ Rasterizer::CanvasItem *z_list[z_range];
+ Rasterizer::CanvasItem *z_last_list[z_range];
+
+ for(int i=0;i<z_range;i++) {
+ z_list[i]=NULL;
+ z_last_list[i]=NULL;
+ }
+
+
+ _render_canvas_item(p_canvas_item,p_transform,p_clip_rect,1.0,0,z_list,z_last_list,NULL,NULL);
+
+ for(int i=0;i<z_range;i++) {
+ if (!z_list[i])
+ continue;
+ rasterizer->canvas_render_items(z_list[i]);
+ }
+
+}
+
+
+void VisualServerRaster::_render_canvas_item_viewport(VisualServer* p_self,void *p_vp,const Rect2& p_rect) {
+
+ VisualServerRaster *self=(VisualServerRaster*)(p_self);
+ Viewport *vp=(Viewport*)p_vp;
+ self->_draw_viewport(vp,p_rect.pos.x,p_rect.pos.y,p_rect.size.x,p_rect.size.y);
+ self->rasterizer->canvas_begin();
+
+}
+
+void VisualServerRaster::_render_canvas_item(CanvasItem *p_canvas_item,const Matrix32& p_transform,const Rect2& p_clip_rect, float p_opacity,int p_z,Rasterizer::CanvasItem **z_list,Rasterizer::CanvasItem **z_last_list,CanvasItem *p_canvas_clip,CanvasItem *p_shader_owner) {
CanvasItem *ci = p_canvas_item;
@@ -6219,24 +6283,39 @@ void VisualServerRaster::_render_canvas_item(CanvasItem *p_canvas_item,const Mat
if (global_rect.intersects(p_clip_rect) && ci->viewport.is_valid() && viewport_owner.owns(ci->viewport)) {
- Viewport *vp = viewport_owner.get(ci->viewport);
+ Viewport *vp = viewport_owner.get(ci->viewport);
Point2i from = xform.get_origin() + Point2(viewport_rect.x,viewport_rect.y);
Point2i size = rect.size;
size.x *= xform[0].length();
size.y *= xform[1].length();
+ ci->vp_render = memnew( Rasterizer::CanvasItem::ViewportRender );
+ ci->vp_render->owner=this;
+ ci->vp_render->udata=vp;
+ ci->vp_render->rect=Rect2(from.x,
+ from.y,
+ size.x,
+ size.y);
+/*
_draw_viewport(vp,
from.x,
from.y,
size.x,
size.y);
+*/
+ //rasterizer->canvas_begin();
+ } else {
+ ci->vp_render=NULL;
+ }
- rasterizer->canvas_begin();
+ if (ci->use_parent_shader && p_shader_owner)
+ ci->shader_owner=p_shader_owner;
+ else {
+ p_shader_owner=ci;
+ ci->shader_owner=NULL;
}
- int s = ci->commands.size();
- bool reclip=false;
float opacity = ci->opacity * p_opacity;
@@ -6246,8 +6325,11 @@ void VisualServerRaster::_render_canvas_item(CanvasItem *p_canvas_item,const Mat
copymem(child_items,ci->child_items.ptr(),child_item_count*sizeof(CanvasItem*));
if (ci->clip) {
- rasterizer->canvas_set_clip(true,global_rect);
- canvas_clip=global_rect;
+ ci->final_clip_rect=global_rect;
+ ci->final_clip_owner=ci;
+
+ } else {
+ ci->final_clip_owner=p_canvas_clip;
}
if (ci->sort_y) {
@@ -6256,160 +6338,45 @@ void VisualServerRaster::_render_canvas_item(CanvasItem *p_canvas_item,const Mat
sorter.sort(child_items,child_item_count);
}
+ if (ci->z_relative)
+ p_z=CLAMP(p_z+ci->z,CANVAS_ITEM_Z_MIN,CANVAS_ITEM_Z_MAX);
+ else
+ p_z=ci->z;
for(int i=0;i<child_item_count;i++) {
if (child_items[i]->ontop)
continue;
- _render_canvas_item(child_items[i],xform,p_clip_rect,opacity);
+ _render_canvas_item(child_items[i],xform,p_clip_rect,opacity,p_z,z_list,z_last_list,(CanvasItem*)ci->final_clip_owner,p_shader_owner);
}
- if (s!=0) {
-
- //Rect2 rect( ci->rect.pos + p_ofs, ci->rect.size);
-
- if (p_clip_rect.intersects(global_rect)) {
-
- rasterizer->canvas_begin_rect(xform);
- rasterizer->canvas_set_opacity( opacity * ci->self_opacity );
- rasterizer->canvas_set_blend_mode( ci->blend_mode );
-
- CanvasItem::Command **commands = &ci->commands[0];
+ if ((!ci->commands.empty() && p_clip_rect.intersects(global_rect)) || ci->vp_render) {
+ //something to draw?
+ ci->final_transform=xform;
+ ci->final_opacity=opacity * ci->self_opacity;
- for (int i=0;i<s;i++) {
- CanvasItem::Command *c=commands[i];
+ int zidx = p_z-CANVAS_ITEM_Z_MIN;
- switch(c->type) {
- case CanvasItem::Command::TYPE_LINE: {
+ if (z_last_list[zidx]) {
+ z_last_list[zidx]->next=ci;
+ z_last_list[zidx]=ci;
- CanvasItem::CommandLine* line = static_cast<CanvasItem::CommandLine*>(c);
- rasterizer->canvas_draw_line(line->from,line->to,line->color,line->width);
- } break;
- case CanvasItem::Command::TYPE_RECT: {
-
- CanvasItem::CommandRect* rect = static_cast<CanvasItem::CommandRect*>(c);
-// rasterizer->canvas_draw_rect(rect->rect,rect->region,rect->source,rect->flags&CanvasItem::CommandRect::FLAG_TILE,rect->flags&CanvasItem::CommandRect::FLAG_FLIP_H,rect->flags&CanvasItem::CommandRect::FLAG_FLIP_V,rect->texture,rect->modulate);
-#if 0
- int flags=0;
-
- if (rect->flags&CanvasItem::CommandRect::FLAG_REGION) {
- flags|=Rasterizer::CANVAS_RECT_REGION;
- }
- if (rect->flags&CanvasItem::CommandRect::FLAG_TILE) {
- flags|=Rasterizer::CANVAS_RECT_TILE;
- }
- if (rect->flags&CanvasItem::CommandRect::FLAG_FLIP_H) {
-
- flags|=Rasterizer::CANVAS_RECT_FLIP_H;
- }
- if (rect->flags&CanvasItem::CommandRect::FLAG_FLIP_V) {
-
- flags|=Rasterizer::CANVAS_RECT_FLIP_V;
- }
-#else
-
- int flags=rect->flags;
-#endif
- rasterizer->canvas_draw_rect(rect->rect,flags,rect->source,rect->texture,rect->modulate);
-
- } break;
- case CanvasItem::Command::TYPE_STYLE: {
-
- CanvasItem::CommandStyle* style = static_cast<CanvasItem::CommandStyle*>(c);
- rasterizer->canvas_draw_style_box(style->rect,style->texture,style->margin,style->draw_center,style->color);
-
- } break;
- case CanvasItem::Command::TYPE_PRIMITIVE: {
-
- CanvasItem::CommandPrimitive* primitive = static_cast<CanvasItem::CommandPrimitive*>(c);
- rasterizer->canvas_draw_primitive(primitive->points,primitive->colors,primitive->uvs,primitive->texture,primitive->width);
- } break;
- case CanvasItem::Command::TYPE_POLYGON: {
-
- CanvasItem::CommandPolygon* polygon = static_cast<CanvasItem::CommandPolygon*>(c);
- rasterizer->canvas_draw_polygon(polygon->count,polygon->indices.ptr(),polygon->points.ptr(),polygon->uvs.ptr(),polygon->colors.ptr(),polygon->texture,polygon->colors.size()==1);
-
- } break;
-
- case CanvasItem::Command::TYPE_POLYGON_PTR: {
-
- CanvasItem::CommandPolygonPtr* polygon = static_cast<CanvasItem::CommandPolygonPtr*>(c);
- rasterizer->canvas_draw_polygon(polygon->count,polygon->indices,polygon->points,polygon->uvs,polygon->colors,polygon->texture,false);
- } break;
- case CanvasItem::Command::TYPE_CIRCLE: {
-
- CanvasItem::CommandCircle* circle = static_cast<CanvasItem::CommandCircle*>(c);
- static const int numpoints=32;
- Vector2 points[numpoints+1];
- points[numpoints]=circle->pos;
- int indices[numpoints*3];
-
- for(int i=0;i<numpoints;i++) {
-
- points[i]=circle->pos+Vector2( Math::sin(i*Math_PI*2.0/numpoints),Math::cos(i*Math_PI*2.0/numpoints) )*circle->radius;
- indices[i*3+0]=i;
- indices[i*3+1]=(i+1)%numpoints;
- indices[i*3+2]=numpoints;
- }
- rasterizer->canvas_draw_polygon(numpoints*3,indices,points,NULL,&circle->color,RID(),true);
- //rasterizer->canvas_draw_circle(circle->indices.size(),circle->indices.ptr(),circle->points.ptr(),circle->uvs.ptr(),circle->colors.ptr(),circle->texture,circle->colors.size()==1);
- } break;
- case CanvasItem::Command::TYPE_TRANSFORM: {
-
- CanvasItem::CommandTransform* transform = static_cast<CanvasItem::CommandTransform*>(c);
- rasterizer->canvas_set_transform(transform->xform);
- } break;
- case CanvasItem::Command::TYPE_BLEND_MODE: {
-
- CanvasItem::CommandBlendMode* bm = static_cast<CanvasItem::CommandBlendMode*>(c);
- rasterizer->canvas_set_blend_mode(bm->blend_mode);
-
- } break;
- case CanvasItem::Command::TYPE_CLIP_IGNORE: {
-
- CanvasItem::CommandClipIgnore* ci = static_cast<CanvasItem::CommandClipIgnore*>(c);
- if (canvas_clip!=Rect2()) {
-
- if (ci->ignore!=reclip) {
- if (ci->ignore) {
-
- rasterizer->canvas_set_clip(false,Rect2());
- reclip=true;
- } else {
- rasterizer->canvas_set_clip(true,canvas_clip);
- reclip=false;
- }
- }
- }
-
-
-
- } break;
- }
- }
- rasterizer->canvas_end_rect();
+ } else {
+ z_list[zidx]=ci;
+ z_last_list[zidx]=ci;
}
- }
-
- if (reclip) {
+ ci->next=NULL;
- rasterizer->canvas_set_clip(true,canvas_clip);
}
for(int i=0;i<child_item_count;i++) {
if (!child_items[i]->ontop)
continue;
- _render_canvas_item(child_items[i],xform,p_clip_rect,opacity);
- }
-
-
- if (ci->clip) {
- rasterizer->canvas_set_clip(false,Rect2());
- canvas_clip=Rect2();
+ _render_canvas_item(child_items[i],xform,p_clip_rect,opacity,p_z,z_list,z_last_list,(CanvasItem*)ci->final_clip_owner,p_shader_owner);
}
}
@@ -6419,29 +6386,61 @@ void VisualServerRaster::_render_canvas(Canvas *p_canvas,const Matrix32 &p_trans
rasterizer->canvas_begin();
int l = p_canvas->child_items.size();
+ Canvas::ChildItem *ci=p_canvas->child_items.ptr();
+ bool has_mirror=false;
for(int i=0;i<l;i++) {
+ if (ci[i].mirror.x || ci[i].mirror.y) {
+ has_mirror=true;
+ break;
+ }
+ }
- Canvas::ChildItem& ci=p_canvas->child_items[i];
- _render_canvas_item(ci.item,p_transform,Rect2(viewport_rect.x,viewport_rect.y,viewport_rect.width,viewport_rect.height),1);
+ Rect2 clip_rect(viewport_rect.x,viewport_rect.y,viewport_rect.width,viewport_rect.height);
+ if (!has_mirror) {
- //mirroring (useful for scrolling backgrounds)
- if (ci.mirror.x!=0) {
+ static const int z_range = CANVAS_ITEM_Z_MAX-CANVAS_ITEM_Z_MIN+1;
+ Rasterizer::CanvasItem *z_list[z_range];
+ Rasterizer::CanvasItem *z_last_list[z_range];
- Matrix32 xform2 = p_transform * Matrix32(0,Vector2(ci.mirror.x,0));
- _render_canvas_item(ci.item,xform2,Rect2(viewport_rect.x,viewport_rect.y,viewport_rect.width,viewport_rect.height),1);
+ for(int i=0;i<z_range;i++) {
+ z_list[i]=NULL;
+ z_last_list[i]=NULL;
}
- if (ci.mirror.y!=0) {
-
- Matrix32 xform2 = p_transform * Matrix32(0,Vector2(0,ci.mirror.y));
- _render_canvas_item(ci.item,xform2,Rect2(viewport_rect.x,viewport_rect.y,viewport_rect.width,viewport_rect.height),1);
+ for(int i=0;i<l;i++) {
+ _render_canvas_item(ci[i].item,p_transform,clip_rect,1.0,0,z_list,z_last_list,NULL,NULL);
}
- if (ci.mirror.y!=0 && ci.mirror.x!=0) {
- Matrix32 xform2 = p_transform * Matrix32(0,ci.mirror);
- _render_canvas_item(ci.item,xform2,Rect2(viewport_rect.x,viewport_rect.y,viewport_rect.width,viewport_rect.height),1);
+ for(int i=0;i<z_range;i++) {
+ if (!z_list[i])
+ continue;
+ rasterizer->canvas_render_items(z_list[i]);
}
+ } else {
+
+ for(int i=0;i<l;i++) {
+
+ Canvas::ChildItem& ci=p_canvas->child_items[i];
+ _render_canvas_item_tree(ci.item,p_transform,clip_rect);
+
+ //mirroring (useful for scrolling backgrounds)
+ if (ci.mirror.x!=0) {
+ Matrix32 xform2 = p_transform * Matrix32(0,Vector2(ci.mirror.x,0));
+ _render_canvas_item_tree(ci.item,xform2,clip_rect);
+ }
+ if (ci.mirror.y!=0) {
+
+ Matrix32 xform2 = p_transform * Matrix32(0,Vector2(0,ci.mirror.y));
+ _render_canvas_item_tree(ci.item,xform2,clip_rect);
+ }
+ if (ci.mirror.y!=0 && ci.mirror.x!=0) {
+
+ Matrix32 xform2 = p_transform * Matrix32(0,ci.mirror);
+ _render_canvas_item_tree(ci.item,xform2,clip_rect);
+ }
+
+ }
}
}
@@ -6604,7 +6603,7 @@ void VisualServerRaster::_draw_viewports() {
rasterizer->set_viewport(viewport_rect);
}
- rasterizer->canvas_begin();
+ rasterizer->canvas_begin();
rasterizer->canvas_disable_blending();
rasterizer->canvas_begin_rect(Matrix32());
rasterizer->canvas_draw_rect(E->get()->rt_to_screen_rect,0,Rect2(Point2(),E->get()->rt_to_screen_rect.size),E->get()->render_target_texture,Color(1,1,1));
@@ -6859,6 +6858,7 @@ RID VisualServerRaster::get_test_cube() {
VisualServerRaster::VisualServerRaster(Rasterizer *p_rasterizer) {
rasterizer=p_rasterizer;
+ rasterizer->draw_viewport_func=_render_canvas_item_viewport;
instance_update_list=NULL;
render_pass=0;
clear_color=Color(0.3,0.3,0.3,1.0);
diff --git a/servers/visual/visual_server_raster.h b/servers/visual/visual_server_raster.h
index ce52077550..57032ab441 100644
--- a/servers/visual/visual_server_raster.h
+++ b/servers/visual/visual_server_raster.h
@@ -85,6 +85,7 @@ class VisualServerRaster : public VisualServer {
Vector<Point2> shape;
Rect2 bounds;
+
Portal() { enabled=true; disable_distance=50; disable_color=Color(); connect_range=0.8; }
};
@@ -372,139 +373,32 @@ class VisualServerRaster : public VisualServer {
- struct CanvasItem {
-
- struct Command {
-
- enum Type {
-
- TYPE_LINE,
- TYPE_RECT,
- TYPE_STYLE,
- TYPE_PRIMITIVE,
- TYPE_POLYGON,
- TYPE_POLYGON_PTR,
- TYPE_CIRCLE,
- TYPE_TRANSFORM,
- TYPE_BLEND_MODE,
- TYPE_CLIP_IGNORE,
- };
-
- Type type;
- };
-
- struct CommandLine : public Command {
-
- Point2 from,to;
- Color color;
- float width;
- CommandLine() { type = TYPE_LINE; }
- };
-
- struct CommandRect : public Command {
-
- Rect2 rect;
- RID texture;
- Color modulate;
- Rect2 source;
- uint8_t flags;
-
- CommandRect() { flags=0; type = TYPE_RECT; }
- };
-
- struct CommandStyle : public Command {
-
- Rect2 rect;
- RID texture;
- float margin[4];
- float draw_center;
- Color color;
- CommandStyle() { draw_center=true; type = TYPE_STYLE; }
- };
-
- struct CommandPrimitive : public Command {
-
- Vector<Point2> points;
- Vector<Point2> uvs;
- Vector<Color> colors;
- RID texture;
- float width;
-
- CommandPrimitive() { type = TYPE_PRIMITIVE; width=1;}
- };
-
- struct CommandPolygon : public Command {
-
- Vector<int> indices;
- Vector<Point2> points;
- Vector<Point2> uvs;
- Vector<Color> colors;
- RID texture;
- int count;
-
- CommandPolygon() { type = TYPE_POLYGON; count = 0; }
- };
-
- struct CommandPolygonPtr : public Command {
+ struct CanvasItem : public Rasterizer::CanvasItem {
- const int* indices;
- const Point2* points;
- const Point2* uvs;
- const Color* colors;
- RID texture;
- int count;
-
- CommandPolygonPtr() { type = TYPE_POLYGON_PTR; count = 0; }
- };
-
- struct CommandCircle : public Command {
-
- Point2 pos;
- float radius;
- Color color;
- CommandCircle() { type = TYPE_CIRCLE; }
- };
-
- struct CommandTransform : public Command {
-
- Matrix32 xform;
- CommandTransform() { type = TYPE_TRANSFORM; }
- };
-
- struct CommandBlendMode : public Command {
-
- MaterialBlendMode blend_mode;
- CommandBlendMode() { type = TYPE_BLEND_MODE; blend_mode = MATERIAL_BLEND_MODE_MIX; };
- };
- struct CommandClipIgnore : public Command {
-
- bool ignore;
- CommandClipIgnore() { type = TYPE_CLIP_IGNORE; ignore=false; };
- };
RID parent; // canvas it belongs to
List<CanvasItem*>::Element *E;
- Matrix32 xform;
- bool clip;
- bool visible;
- bool ontop;
+ RID viewport;
+ int z;
+ bool z_relative;
bool sort_y;
float opacity;
float self_opacity;
- MaterialBlendMode blend_mode;
- RID viewport;
+ bool use_parent_shader;
+
- mutable bool custom_rect;
- mutable bool rect_dirty;
- mutable Rect2 rect;
-
- Vector<Command*> commands;
Vector<CanvasItem*> child_items;
- const Rect2& get_rect() const;
- void clear() { for (int i=0;i<commands.size();i++) memdelete( commands[i] ); commands.clear(); clip=false; rect_dirty=true;};
- CanvasItem() { clip=false; E=NULL; opacity=1; self_opacity=1; blend_mode=MATERIAL_BLEND_MODE_MIX; visible=true; rect_dirty=true; custom_rect=false; ontop=true; sort_y=false;}
- ~CanvasItem() { clear(); }
+
+ CanvasItem() {
+ E=NULL;
+ z=0;
+ opacity=1;
+ self_opacity=1;
+ sort_y=false;
+ use_parent_shader=false;
+ z_relative=true;
+ }
};
@@ -706,7 +600,9 @@ class VisualServerRaster : public VisualServer {
void _process_sampled_light(const Transform &p_camera, Instance *p_sampled_light, bool p_linear_colorspace);
void _render_camera(Viewport *p_viewport,Camera *p_camera, Scenario *p_scenario);
- void _render_canvas_item(CanvasItem *p_canvas_item,const Matrix32& p_transform,const Rect2& p_clip_rect,float p_opacity);
+ static void _render_canvas_item_viewport(VisualServer* p_self,void *p_vp,const Rect2& p_rect);
+ void _render_canvas_item_tree(CanvasItem *p_canvas_item,const Matrix32& p_transform,const Rect2& p_clip_rect);
+ void _render_canvas_item(CanvasItem *p_canvas_item,const Matrix32& p_transform,const Rect2& p_clip_rect, float p_opacity,int p_z,Rasterizer::CanvasItem **z_list,Rasterizer::CanvasItem **z_last_list,CanvasItem *p_canvas_clip,CanvasItem *p_shader_owner);
void _render_canvas(Canvas *p_canvas,const Matrix32 &p_transform);
Vector<Vector3> _camera_generate_endpoints(Instance *p_light,Camera *p_camera,float p_range_min, float p_range_max);
Vector<Plane> _camera_generate_orthogonal_planes(Instance *p_light,Camera *p_camera,float p_range_min, float p_range_max);
@@ -1217,6 +1113,51 @@ public:
virtual void canvas_item_add_set_blend_mode(RID p_item, MaterialBlendMode p_blend);
virtual void canvas_item_add_clip_ignore(RID p_item, bool p_ignore);
virtual void canvas_item_set_sort_children_by_y(RID p_item, bool p_enable);
+ virtual void canvas_item_set_z(RID p_item, int p_z);
+ virtual void canvas_item_set_z_as_relative_to_parent(RID p_item, bool p_enable);
+
+ virtual void canvas_item_set_shader(RID p_item, RID p_shader);
+ virtual RID canvas_item_get_shader(RID p_item) const;
+
+ virtual void canvas_item_set_use_parent_shader(RID p_item, bool p_enable);
+
+
+
+ virtual void canvas_item_set_shader_param(RID p_canvas_item, const StringName& p_param, const Variant& p_value);
+ virtual Variant canvas_item_get_shader_param(RID p_canvas_item, const StringName& p_param) const;
+
+ virtual RID canvas_light_create();
+ virtual void canvas_light_attach_to_canvas(RID p_light,RID p_canvas);
+ virtual void canvas_light_set_enabled(RID p_light, bool p_enabled);
+ virtual void canvas_light_set_transform(RID p_light, const Matrix32& p_transform);
+ virtual void canvas_light_set_texture(RID p_light, RID p_texture);
+ virtual void canvas_light_set_texture_offset(RID p_light, const Vector2& p_offset);
+ virtual void canvas_light_set_color(RID p_light, const Color& p_color);
+ virtual void canvas_light_set_height(RID p_light, float p_height);
+ virtual void canvas_light_set_z_range(RID p_light, int p_min_z,int p_max_z);
+ virtual void canvas_light_set_item_mask(RID p_light, int p_mask);
+
+ enum CanvasightBlendMode {
+ CANVAS_LIGHT_BLEND_ADD,
+ CANVAS_LIGHT_BLEND_SUB,
+ CANVAS_LIGHT_BLEND_MULTIPLY,
+ CANVAS_LIGHT_BLEND_DODGE,
+ CANVAS_LIGHT_BLEND_BURN,
+ CANVAS_LIGHT_BLEND_LIGHTEN,
+ CANVAS_LIGHT_BLEND_DARKEN,
+ CANVAS_LIGHT_BLEND_OVERLAY,
+ CANVAS_LIGHT_BLEND_SCREEN,
+ };
+ virtual void canvas_light_set_blend_mode(RID p_light, CanvasLightBlendMode p_blend_mode);
+ virtual void canvas_light_set_shadow_enabled(RID p_light, bool p_enabled);
+ virtual void canvas_light_set_shadow_buffer_size(RID p_light, int p_size);
+ virtual void canvas_light_set_shadow_filter(RID p_light, int p_size);
+
+
+ virtual RID canvas_light_occluder_create();
+ virtual void canvas_light_occluder_attach_to_canvas(RID p_occluder,RID p_canvas);
+ virtual void canvas_light_occluder_set_enabled(RID p_occluder,bool p_enabled);
+ virtual void canvas_light_occluder_set_shape(RID p_occluder,const DVector<Vector2>& p_shape);
virtual void canvas_item_clear(RID p_item);
virtual void canvas_item_raise(RID p_item);
diff --git a/servers/visual/visual_server_wrap_mt.h b/servers/visual/visual_server_wrap_mt.h
index 7d2b8a3767..9574dff018 100644
--- a/servers/visual/visual_server_wrap_mt.h
+++ b/servers/visual/visual_server_wrap_mt.h
@@ -1131,10 +1131,44 @@ public:
FUNC2(canvas_item_add_clip_ignore,RID, bool );
FUNC2(canvas_item_set_sort_children_by_y,RID,bool);
+ FUNC2(canvas_item_set_z,RID,int);
+ FUNC2(canvas_item_set_z_as_relative_to_parent,RID,bool);
+
+ FUNC2(canvas_item_set_shader,RID, RID );
+ FUNC1RC(RID,canvas_item_get_shader,RID );
+
+ FUNC2(canvas_item_set_use_parent_shader,RID, bool );
+
+
+ FUNC3(canvas_item_set_shader_param,RID,const StringName&,const Variant&);
+ FUNC2RC(Variant,canvas_item_get_shader_param,RID,const StringName&);
FUNC1(canvas_item_clear,RID);
FUNC1(canvas_item_raise,RID);
+ /* CANVAS LIGHT */
+ FUNC0R(RID,canvas_light_create);
+ FUNC2(canvas_light_attach_to_canvas,RID,RID);
+ FUNC2(canvas_light_set_enabled,RID,bool);
+ FUNC2(canvas_light_set_transform,RID,const Matrix32&);
+ FUNC2(canvas_light_set_texture,RID,RID);
+ FUNC2(canvas_light_set_texture_offset,RID,const Vector2&);
+ FUNC2(canvas_light_set_color,RID,const Color&);
+ FUNC2(canvas_light_set_height,RID,float);
+ FUNC3(canvas_light_set_z_range,RID,int,int);
+ FUNC2(canvas_light_set_item_mask,RID,int);
+
+ FUNC2(canvas_light_set_blend_mode,RID,CanvasLightBlendMode);
+ FUNC2(canvas_light_set_shadow_enabled,RID,bool);
+ FUNC2(canvas_light_set_shadow_buffer_size,RID,int);
+ FUNC2(canvas_light_set_shadow_filter,RID,int);
+
+ /* CANVAS OCCLUDER */
+
+ FUNC0R(RID,canvas_light_occluder_create);
+ FUNC2(canvas_light_occluder_attach_to_canvas,RID,RID);
+ FUNC2(canvas_light_occluder_set_enabled,RID,bool);
+ FUNC2(canvas_light_occluder_set_shape,RID,const DVector<Vector2>&);
/* CURSOR */
FUNC2(cursor_set_rotation,float , int ); // radians
diff --git a/servers/visual_server.h b/servers/visual_server.h
index 4336a91407..49ae8ce4e6 100644
--- a/servers/visual_server.h
+++ b/servers/visual_server.h
@@ -86,6 +86,9 @@ public:
ARRAY_WEIGHTS_SIZE=4,
MAX_PARTICLE_COLOR_PHASES=4,
MAX_PARTICLE_ATTRACTORS=4,
+ CANVAS_ITEM_Z_MIN=-4096,
+ CANVAS_ITEM_Z_MAX=4096,
+
MAX_CURSORS = 8,
@@ -982,10 +985,53 @@ public:
virtual void canvas_item_add_set_blend_mode(RID p_item, MaterialBlendMode p_blend)=0;
virtual void canvas_item_add_clip_ignore(RID p_item, bool p_ignore)=0;
virtual void canvas_item_set_sort_children_by_y(RID p_item, bool p_enable)=0;
+ virtual void canvas_item_set_z(RID p_item, int p_z)=0;
+ virtual void canvas_item_set_z_as_relative_to_parent(RID p_item, bool p_enable)=0;
virtual void canvas_item_clear(RID p_item)=0;
virtual void canvas_item_raise(RID p_item)=0;
+ virtual void canvas_item_set_shader(RID p_item, RID p_shader)=0;
+ virtual RID canvas_item_get_shader(RID p_item) const=0;
+
+ virtual void canvas_item_set_use_parent_shader(RID p_item, bool p_enable)=0;
+
+ virtual void canvas_item_set_shader_param(RID p_canvas_item, const StringName& p_param, const Variant& p_value)=0;
+ virtual Variant canvas_item_get_shader_param(RID p_canvas_item, const StringName& p_param) const=0;
+
+ virtual RID canvas_light_create()=0;
+ virtual void canvas_light_attach_to_canvas(RID p_light,RID p_canvas)=0;
+ virtual void canvas_light_set_enabled(RID p_light, bool p_enabled)=0;
+ virtual void canvas_light_set_transform(RID p_light, const Matrix32& p_transform)=0;
+ virtual void canvas_light_set_texture(RID p_light, RID p_texture)=0;
+ virtual void canvas_light_set_texture_offset(RID p_light, const Vector2& p_offset)=0;
+ virtual void canvas_light_set_color(RID p_light, const Color& p_color)=0;
+ virtual void canvas_light_set_height(RID p_light, float p_height)=0;
+ virtual void canvas_light_set_z_range(RID p_light, int p_min_z,int p_max_z)=0;
+ virtual void canvas_light_set_item_mask(RID p_light, int p_mask)=0;
+
+ enum CanvasLightBlendMode {
+ CANVAS_LIGHT_BLEND_ADD,
+ CANVAS_LIGHT_BLEND_SUB,
+ CANVAS_LIGHT_BLEND_MULTIPLY,
+ CANVAS_LIGHT_BLEND_DODGE,
+ CANVAS_LIGHT_BLEND_BURN,
+ CANVAS_LIGHT_BLEND_LIGHTEN,
+ CANVAS_LIGHT_BLEND_DARKEN,
+ CANVAS_LIGHT_BLEND_OVERLAY,
+ CANVAS_LIGHT_BLEND_SCREEN,
+ };
+ virtual void canvas_light_set_blend_mode(RID p_light, CanvasLightBlendMode p_blend_mode)=0;
+ virtual void canvas_light_set_shadow_enabled(RID p_light, bool p_enabled)=0;
+ virtual void canvas_light_set_shadow_buffer_size(RID p_light, int p_size)=0;
+ virtual void canvas_light_set_shadow_filter(RID p_light, int p_size)=0;
+
+
+ virtual RID canvas_light_occluder_create()=0;
+ virtual void canvas_light_occluder_attach_to_canvas(RID p_occluder,RID p_canvas)=0;
+ virtual void canvas_light_occluder_set_enabled(RID p_occluder,bool p_enabled)=0;
+ virtual void canvas_light_occluder_set_shape(RID p_occluder,const DVector<Vector2>& p_shape)=0;
+
/* CURSOR */
virtual void cursor_set_rotation(float p_rotation, int p_cursor = 0)=0; // radians
virtual void cursor_set_texture(RID p_texture, const Point2 &p_center_offset = Point2(0, 0), int p_cursor=0)=0;
diff --git a/tools/SCsub b/tools/SCsub
index 4d8b05fe79..ce7df2c35b 100644
--- a/tools/SCsub
+++ b/tools/SCsub
@@ -13,11 +13,9 @@ if (env["tools"]!="no"):
SConscript('freetype/SCsub');
SConscript('doc/SCsub')
SConscript('pck/SCsub')
-
+ lib = env.Library("tool",env.tool_sources)
-lib = env.Library("tool",env.tool_sources)
-
-env.Prepend(LIBS=[lib])
+ env.Prepend(LIBS=[lib])
diff --git a/tools/editor/editor_node.cpp b/tools/editor/editor_node.cpp
index 5843a7cb28..6ff16e661c 100644
--- a/tools/editor/editor_node.cpp
+++ b/tools/editor/editor_node.cpp
@@ -978,6 +978,15 @@ void EditorNode::_dialog_action(String p_file) {
}
} break;
+
+ case FILE_SAVE_AND_RUN: {
+ if (file->get_mode()==FileDialog::MODE_SAVE_FILE) {
+
+ _save_scene(p_file);
+ _run(false);
+ }
+ } break;
+
case FILE_EXPORT_MESH_LIBRARY: {
Ref<MeshLibrary> ml;
@@ -1391,13 +1400,10 @@ void EditorNode::_run(bool p_current,const String& p_custom) {
}
if (scene->get_filename()=="") {
-
-
current_option=-1;
//accept->get_cancel()->hide();
- accept->get_ok()->set_text("I see..");
- accept->set_text("Scene has never been saved. Save before running!");
- accept->popup_centered(Size2(300,70));;
+ /**/
+ _menu_option_confirm(FILE_SAVE_BEFORE_RUN, false);
return;
}
@@ -1664,6 +1670,18 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
} break;
+ case FILE_SAVE_BEFORE_RUN: {
+ if (!p_confirmed) {
+ accept->get_ok()->set_text("Yes");
+ accept->set_text("This scene has never been saved. Save before running?");
+ accept->popup_centered(Size2(300, 70));
+ break;
+ }
+
+ _menu_option(FILE_SAVE_AS_SCENE);
+ _menu_option_confirm(FILE_SAVE_AND_RUN, true);
+ } break;
+
case FILE_DUMP_STRINGS: {
Node *scene = edited_scene;
@@ -4017,8 +4035,10 @@ EditorNode::EditorNode() {
add_editor_plugin( memnew( ScriptEditorPlugin(this) ) );
add_editor_plugin( memnew( EditorHelpPlugin(this) ) );
add_editor_plugin( memnew( AnimationPlayerEditorPlugin(this) ) );
- add_editor_plugin( memnew( ShaderGraphEditorPlugin(this) ) );
- add_editor_plugin( memnew( ShaderEditorPlugin(this) ) );
+ add_editor_plugin( memnew( ShaderGraphEditorPlugin(this,true) ) );
+ add_editor_plugin( memnew( ShaderGraphEditorPlugin(this,false) ) );
+ add_editor_plugin( memnew( ShaderEditorPlugin(this,true) ) );
+ add_editor_plugin( memnew( ShaderEditorPlugin(this,false) ) );
add_editor_plugin( memnew( CameraEditorPlugin(this) ) );
add_editor_plugin( memnew( SampleEditorPlugin(this) ) );
add_editor_plugin( memnew( SampleLibraryEditorPlugin(this) ) );
@@ -4069,9 +4089,9 @@ EditorNode::EditorNode() {
Globals::get_singleton()->set("debug/indicators_enabled",true);
Globals::get_singleton()->set("render/room_cull_enabled",false);
- theme->set_color("prop_category","Editor",Color::hex(0x3f3945ff));
- theme->set_color("prop_section","Editor",Color::hex(0x38323dff));
- theme->set_color("prop_subsection","Editor",Color::hex(0x342e39ff));
+ theme->set_color("prop_category","Editor",Color::hex(0x403d41ff));
+ theme->set_color("prop_section","Editor",Color::hex(0x383539ff));
+ theme->set_color("prop_subsection","Editor",Color::hex(0x343135ff));
theme->set_color("fg_selected","Editor",Color::html("ffbd8e8e"));
theme->set_color("fg_error","Editor",Color::html("ffbd8e8e"));
diff --git a/tools/editor/editor_node.h b/tools/editor/editor_node.h
index 381993646e..7560c2b149 100644
--- a/tools/editor/editor_node.h
+++ b/tools/editor/editor_node.h
@@ -108,6 +108,8 @@ class EditorNode : public Node {
FILE_OPEN_SCENE,
FILE_SAVE_SCENE,
FILE_SAVE_AS_SCENE,
+ FILE_SAVE_BEFORE_RUN,
+ FILE_SAVE_AND_RUN,
FILE_IMPORT_SUBSCENE,
FILE_EXPORT_PROJECT,
FILE_EXPORT_MESH_LIBRARY,
diff --git a/tools/editor/editor_plugin.cpp b/tools/editor/editor_plugin.cpp
index 2a2ad63d32..1bad1dc6ac 100644
--- a/tools/editor/editor_plugin.cpp
+++ b/tools/editor/editor_plugin.cpp
@@ -73,6 +73,12 @@ void EditorPlugin::add_custom_control(CustomControlContainer p_location,Control
} break;
case CONTAINER_CANVAS_EDITOR_SIDE: {
+ CanvasItemEditor::get_singleton()->get_palette_split()->add_child(p_control);
+
+ } break;
+ case CONTAINER_CANVAS_EDITOR_BOTTOM: {
+
+ CanvasItemEditor::get_singleton()->get_bottom_split()->add_child(p_control);
} break;
diff --git a/tools/editor/editor_plugin.h b/tools/editor/editor_plugin.h
index bcde0f73fb..4f2341d3b1 100644
--- a/tools/editor/editor_plugin.h
+++ b/tools/editor/editor_plugin.h
@@ -66,7 +66,8 @@ public:
CONTAINER_SPATIAL_EDITOR_SIDE,
CONTAINER_SPATIAL_EDITOR_BOTTOM,
CONTAINER_CANVAS_EDITOR_MENU,
- CONTAINER_CANVAS_EDITOR_SIDE
+ CONTAINER_CANVAS_EDITOR_SIDE,
+ CONTAINER_CANVAS_EDITOR_BOTTOM
};
//TODO: send a resoucre for editing to the editor node?
diff --git a/tools/editor/editor_settings.cpp b/tools/editor/editor_settings.cpp
index bc800d7e9e..24699ac87f 100644
--- a/tools/editor/editor_settings.cpp
+++ b/tools/editor/editor_settings.cpp
@@ -404,6 +404,7 @@ void EditorSettings::_load_defaults() {
set("text_editor/symbol_color",Color::html("badfff"));
set("text_editor/selection_color",Color::html("7b5dbe"));
set("text_editor/brace_mismatch_color",Color(1,0.2,0.2));
+ set("text_editor/current_line_color",Color(0.3,0.5,0.8,0.15));
set("text_editor/idle_parse_delay",2);
set("text_editor/create_signal_callbacks",true);
@@ -413,6 +414,10 @@ void EditorSettings::_load_defaults() {
set("text_editor/auto_brace_complete", false);
+ set("scenetree_editor/duplicate_node_name_num_separator",0);
+ hints["scenetree_editor/duplicate_node_name_num_separator"]=PropertyInfo(Variant::INT,"scenetree_editor/duplicate_node_name_num_separator",PROPERTY_HINT_ENUM, "None,Space,Underscore,Dash");
+
+
set("3d_editor/default_fov",45.0);
set("3d_editor/default_z_near",0.1);
set("3d_editor/default_z_far",500.0);
diff --git a/tools/editor/icons/icon_add.png b/tools/editor/icons/icon_add.png
index 1a97f356d6..26283ca67c 100644
--- a/tools/editor/icons/icon_add.png
+++ b/tools/editor/icons/icon_add.png
Binary files differ
diff --git a/tools/editor/icons/icon_animation.png b/tools/editor/icons/icon_animation.png
index 6af126bf37..ac663c0554 100644
--- a/tools/editor/icons/icon_animation.png
+++ b/tools/editor/icons/icon_animation.png
Binary files differ
diff --git a/tools/editor/icons/icon_atlas_texture.png b/tools/editor/icons/icon_atlas_texture.png
index 3da9f0bee4..0051b0cda4 100644
--- a/tools/editor/icons/icon_atlas_texture.png
+++ b/tools/editor/icons/icon_atlas_texture.png
Binary files differ
diff --git a/tools/editor/icons/icon_audio_stream_gibberish.png b/tools/editor/icons/icon_audio_stream_gibberish.png
index f10671e8a2..95470c298e 100644
--- a/tools/editor/icons/icon_audio_stream_gibberish.png
+++ b/tools/editor/icons/icon_audio_stream_gibberish.png
Binary files differ
diff --git a/tools/editor/icons/icon_auto_play.png b/tools/editor/icons/icon_auto_play.png
index e454ca8c7b..1d5c957cc7 100644
--- a/tools/editor/icons/icon_auto_play.png
+++ b/tools/editor/icons/icon_auto_play.png
Binary files differ
diff --git a/tools/editor/icons/icon_bake.png b/tools/editor/icons/icon_bake.png
index b1b0f941da..ae06ce48e6 100644
--- a/tools/editor/icons/icon_bake.png
+++ b/tools/editor/icons/icon_bake.png
Binary files differ
diff --git a/tools/editor/icons/icon_blend.png b/tools/editor/icons/icon_blend.png
index 985b63d5d1..2a75f0b2f4 100644
--- a/tools/editor/icons/icon_blend.png
+++ b/tools/editor/icons/icon_blend.png
Binary files differ
diff --git a/tools/editor/icons/icon_bone.png b/tools/editor/icons/icon_bone.png
index 174b0bc167..81b6d8856e 100644
--- a/tools/editor/icons/icon_bone.png
+++ b/tools/editor/icons/icon_bone.png
Binary files differ
diff --git a/tools/editor/icons/icon_bool.png b/tools/editor/icons/icon_bool.png
index d465b7da07..3381033b00 100644
--- a/tools/editor/icons/icon_bool.png
+++ b/tools/editor/icons/icon_bool.png
Binary files differ
diff --git a/tools/editor/icons/icon_canvas_item.png b/tools/editor/icons/icon_canvas_item.png
index 99403bed21..add54ba1af 100644
--- a/tools/editor/icons/icon_canvas_item.png
+++ b/tools/editor/icons/icon_canvas_item.png
Binary files differ
diff --git a/tools/editor/icons/icon_close.png b/tools/editor/icons/icon_close.png
index 11fa746271..10e56d5bb8 100644
--- a/tools/editor/icons/icon_close.png
+++ b/tools/editor/icons/icon_close.png
Binary files differ
diff --git a/tools/editor/icons/icon_close_hover.png b/tools/editor/icons/icon_close_hover.png
index efcc9e7471..cb519691e5 100644
--- a/tools/editor/icons/icon_close_hover.png
+++ b/tools/editor/icons/icon_close_hover.png
Binary files differ
diff --git a/tools/editor/icons/icon_collapse.png b/tools/editor/icons/icon_collapse.png
index bd5c9765a5..23db9e42a7 100644
--- a/tools/editor/icons/icon_collapse.png
+++ b/tools/editor/icons/icon_collapse.png
Binary files differ
diff --git a/tools/editor/icons/icon_collapse_hl.png b/tools/editor/icons/icon_collapse_hl.png
index 7ed9a5c125..0dfbc8b175 100644
--- a/tools/editor/icons/icon_collapse_hl.png
+++ b/tools/editor/icons/icon_collapse_hl.png
Binary files differ
diff --git a/tools/editor/icons/icon_connect.png b/tools/editor/icons/icon_connect.png
index 24258414c4..745e445a61 100644
--- a/tools/editor/icons/icon_connect.png
+++ b/tools/editor/icons/icon_connect.png
Binary files differ
diff --git a/tools/editor/icons/icon_del.png b/tools/editor/icons/icon_del.png
index 5349af466e..10e56d5bb8 100644
--- a/tools/editor/icons/icon_del.png
+++ b/tools/editor/icons/icon_del.png
Binary files differ
diff --git a/tools/editor/icons/icon_duplicate.png b/tools/editor/icons/icon_duplicate.png
index bae4aa2c30..f854a14fd3 100644
--- a/tools/editor/icons/icon_duplicate.png
+++ b/tools/editor/icons/icon_duplicate.png
Binary files differ
diff --git a/tools/editor/icons/icon_edit.png b/tools/editor/icons/icon_edit.png
index 012a7f5f1d..157f785b83 100644
--- a/tools/editor/icons/icon_edit.png
+++ b/tools/editor/icons/icon_edit.png
Binary files differ
diff --git a/tools/editor/icons/icon_edit_key.png b/tools/editor/icons/icon_edit_key.png
index 43a7056f38..9ab1287fc6 100644
--- a/tools/editor/icons/icon_edit_key.png
+++ b/tools/editor/icons/icon_edit_key.png
Binary files differ
diff --git a/tools/editor/icons/icon_edit_resource.png b/tools/editor/icons/icon_edit_resource.png
index de538dfe95..31d0c68fc6 100644
--- a/tools/editor/icons/icon_edit_resource.png
+++ b/tools/editor/icons/icon_edit_resource.png
Binary files differ
diff --git a/tools/editor/icons/icon_editor_focus.png b/tools/editor/icons/icon_editor_focus.png
index f21d22ebd8..40ce11f381 100644
--- a/tools/editor/icons/icon_editor_focus.png
+++ b/tools/editor/icons/icon_editor_focus.png
Binary files differ
diff --git a/tools/editor/icons/icon_enum.png b/tools/editor/icons/icon_enum.png
index 2496e1d0db..ac36c96e28 100644
--- a/tools/editor/icons/icon_enum.png
+++ b/tools/editor/icons/icon_enum.png
Binary files differ
diff --git a/tools/editor/icons/icon_event_player.png b/tools/editor/icons/icon_event_player.png
index b67f91b1b3..68646b3dfe 100644
--- a/tools/editor/icons/icon_event_player.png
+++ b/tools/editor/icons/icon_event_player.png
Binary files differ
diff --git a/tools/editor/icons/icon_file_server.png b/tools/editor/icons/icon_file_server.png
index 27c99127c3..4bd94fa8c8 100644
--- a/tools/editor/icons/icon_file_server.png
+++ b/tools/editor/icons/icon_file_server.png
Binary files differ
diff --git a/tools/editor/icons/icon_folder.png b/tools/editor/icons/icon_folder.png
index 814f217edf..a450a7b297 100644
--- a/tools/editor/icons/icon_folder.png
+++ b/tools/editor/icons/icon_folder.png
Binary files differ
diff --git a/tools/editor/icons/icon_font.png b/tools/editor/icons/icon_font.png
index d9554183c2..3ffe4f1b17 100644
--- a/tools/editor/icons/icon_font.png
+++ b/tools/editor/icons/icon_font.png
Binary files differ
diff --git a/tools/editor/icons/icon_g_d_script.png b/tools/editor/icons/icon_g_d_script.png
index 3b1cc98c4d..88d865356c 100644
--- a/tools/editor/icons/icon_g_d_script.png
+++ b/tools/editor/icons/icon_g_d_script.png
Binary files differ
diff --git a/tools/editor/icons/icon_graph_color_ramp.png b/tools/editor/icons/icon_graph_color_ramp.png
new file mode 100644
index 0000000000..9031b5ec53
--- /dev/null
+++ b/tools/editor/icons/icon_graph_color_ramp.png
Binary files differ
diff --git a/tools/editor/icons/icon_graph_comment.png b/tools/editor/icons/icon_graph_comment.png
new file mode 100644
index 0000000000..bf7889c510
--- /dev/null
+++ b/tools/editor/icons/icon_graph_comment.png
Binary files differ
diff --git a/tools/editor/icons/icon_graph_cube_uniform.png b/tools/editor/icons/icon_graph_cube_uniform.png
new file mode 100644
index 0000000000..d1b92b4943
--- /dev/null
+++ b/tools/editor/icons/icon_graph_cube_uniform.png
Binary files differ
diff --git a/tools/editor/icons/icon_graph_curve_map.png b/tools/editor/icons/icon_graph_curve_map.png
new file mode 100644
index 0000000000..de5c32f09e
--- /dev/null
+++ b/tools/editor/icons/icon_graph_curve_map.png
Binary files differ
diff --git a/tools/editor/icons/icon_graph_default_texture.png b/tools/editor/icons/icon_graph_default_texture.png
new file mode 100644
index 0000000000..da77ec9364
--- /dev/null
+++ b/tools/editor/icons/icon_graph_default_texture.png
Binary files differ
diff --git a/tools/editor/icons/icon_graph_input.png b/tools/editor/icons/icon_graph_input.png
new file mode 100644
index 0000000000..a396bc2350
--- /dev/null
+++ b/tools/editor/icons/icon_graph_input.png
Binary files differ
diff --git a/tools/editor/icons/icon_graph_rgb.png b/tools/editor/icons/icon_graph_rgb.png
new file mode 100644
index 0000000000..abffaedd34
--- /dev/null
+++ b/tools/editor/icons/icon_graph_rgb.png
Binary files differ
diff --git a/tools/editor/icons/icon_graph_rgb_op.png b/tools/editor/icons/icon_graph_rgb_op.png
new file mode 100644
index 0000000000..642fc838c2
--- /dev/null
+++ b/tools/editor/icons/icon_graph_rgb_op.png
Binary files differ
diff --git a/tools/editor/icons/icon_graph_rgb_uniform.png b/tools/editor/icons/icon_graph_rgb_uniform.png
new file mode 100644
index 0000000000..92c79997ef
--- /dev/null
+++ b/tools/editor/icons/icon_graph_rgb_uniform.png
Binary files differ
diff --git a/tools/editor/icons/icon_graph_scalar.png b/tools/editor/icons/icon_graph_scalar.png
new file mode 100644
index 0000000000..028d0e9ea4
--- /dev/null
+++ b/tools/editor/icons/icon_graph_scalar.png
Binary files differ
diff --git a/tools/editor/icons/icon_graph_scalar_interp.png b/tools/editor/icons/icon_graph_scalar_interp.png
new file mode 100644
index 0000000000..4f178a27c4
--- /dev/null
+++ b/tools/editor/icons/icon_graph_scalar_interp.png
Binary files differ
diff --git a/tools/editor/icons/icon_graph_scalar_op.png b/tools/editor/icons/icon_graph_scalar_op.png
new file mode 100644
index 0000000000..0fc4cae94c
--- /dev/null
+++ b/tools/editor/icons/icon_graph_scalar_op.png
Binary files differ
diff --git a/tools/editor/icons/icon_graph_scalar_uniform.png b/tools/editor/icons/icon_graph_scalar_uniform.png
new file mode 100644
index 0000000000..fc6590a8cf
--- /dev/null
+++ b/tools/editor/icons/icon_graph_scalar_uniform.png
Binary files differ
diff --git a/tools/editor/icons/icon_graph_scalars_to_vec.png b/tools/editor/icons/icon_graph_scalars_to_vec.png
new file mode 100644
index 0000000000..7ca39a2f56
--- /dev/null
+++ b/tools/editor/icons/icon_graph_scalars_to_vec.png
Binary files differ
diff --git a/tools/editor/icons/icon_graph_texscreen.png b/tools/editor/icons/icon_graph_texscreen.png
new file mode 100644
index 0000000000..e183a8fa56
--- /dev/null
+++ b/tools/editor/icons/icon_graph_texscreen.png
Binary files differ
diff --git a/tools/editor/icons/icon_graph_texture_uniform.png b/tools/editor/icons/icon_graph_texture_uniform.png
new file mode 100644
index 0000000000..7517ac1d92
--- /dev/null
+++ b/tools/editor/icons/icon_graph_texture_uniform.png
Binary files differ
diff --git a/tools/editor/icons/icon_graph_time.png b/tools/editor/icons/icon_graph_time.png
new file mode 100644
index 0000000000..b61e45589f
--- /dev/null
+++ b/tools/editor/icons/icon_graph_time.png
Binary files differ
diff --git a/tools/editor/icons/icon_graph_vec_dp.png b/tools/editor/icons/icon_graph_vec_dp.png
new file mode 100644
index 0000000000..059c3025e7
--- /dev/null
+++ b/tools/editor/icons/icon_graph_vec_dp.png
Binary files differ
diff --git a/tools/editor/icons/icon_graph_vec_interp.png b/tools/editor/icons/icon_graph_vec_interp.png
new file mode 100644
index 0000000000..daf7a00203
--- /dev/null
+++ b/tools/editor/icons/icon_graph_vec_interp.png
Binary files differ
diff --git a/tools/editor/icons/icon_graph_vec_length.png b/tools/editor/icons/icon_graph_vec_length.png
new file mode 100644
index 0000000000..60ade8c90a
--- /dev/null
+++ b/tools/editor/icons/icon_graph_vec_length.png
Binary files differ
diff --git a/tools/editor/icons/icon_graph_vec_op.png b/tools/editor/icons/icon_graph_vec_op.png
new file mode 100644
index 0000000000..f2a7a51123
--- /dev/null
+++ b/tools/editor/icons/icon_graph_vec_op.png
Binary files differ
diff --git a/tools/editor/icons/icon_graph_vec_scalar_op.png b/tools/editor/icons/icon_graph_vec_scalar_op.png
new file mode 100644
index 0000000000..f0f4e7a196
--- /dev/null
+++ b/tools/editor/icons/icon_graph_vec_scalar_op.png
Binary files differ
diff --git a/tools/editor/icons/icon_graph_vec_to_scalars.png b/tools/editor/icons/icon_graph_vec_to_scalars.png
new file mode 100644
index 0000000000..a677a7cc53
--- /dev/null
+++ b/tools/editor/icons/icon_graph_vec_to_scalars.png
Binary files differ
diff --git a/tools/editor/icons/icon_graph_vecs_to_xform.png b/tools/editor/icons/icon_graph_vecs_to_xform.png
new file mode 100644
index 0000000000..51216c93eb
--- /dev/null
+++ b/tools/editor/icons/icon_graph_vecs_to_xform.png
Binary files differ
diff --git a/tools/editor/icons/icon_graph_vector.png b/tools/editor/icons/icon_graph_vector.png
new file mode 100644
index 0000000000..9dfe47d757
--- /dev/null
+++ b/tools/editor/icons/icon_graph_vector.png
Binary files differ
diff --git a/tools/editor/icons/icon_graph_vector_uniform.png b/tools/editor/icons/icon_graph_vector_uniform.png
new file mode 100644
index 0000000000..611539fca7
--- /dev/null
+++ b/tools/editor/icons/icon_graph_vector_uniform.png
Binary files differ
diff --git a/tools/editor/icons/icon_graph_xform.png b/tools/editor/icons/icon_graph_xform.png
new file mode 100644
index 0000000000..22df472be4
--- /dev/null
+++ b/tools/editor/icons/icon_graph_xform.png
Binary files differ
diff --git a/tools/editor/icons/icon_graph_xform_mult.png b/tools/editor/icons/icon_graph_xform_mult.png
new file mode 100644
index 0000000000..5d0ce7982d
--- /dev/null
+++ b/tools/editor/icons/icon_graph_xform_mult.png
Binary files differ
diff --git a/tools/editor/icons/icon_graph_xform_scalar_func.png b/tools/editor/icons/icon_graph_xform_scalar_func.png
new file mode 100644
index 0000000000..e53f08a564
--- /dev/null
+++ b/tools/editor/icons/icon_graph_xform_scalar_func.png
Binary files differ
diff --git a/tools/editor/icons/icon_graph_xform_to_vecs.png b/tools/editor/icons/icon_graph_xform_to_vecs.png
new file mode 100644
index 0000000000..847261f726
--- /dev/null
+++ b/tools/editor/icons/icon_graph_xform_to_vecs.png
Binary files differ
diff --git a/tools/editor/icons/icon_graph_xform_uniform.png b/tools/editor/icons/icon_graph_xform_uniform.png
new file mode 100644
index 0000000000..94c9759b25
--- /dev/null
+++ b/tools/editor/icons/icon_graph_xform_uniform.png
Binary files differ
diff --git a/tools/editor/icons/icon_graph_xform_vec_func.png b/tools/editor/icons/icon_graph_xform_vec_func.png
new file mode 100644
index 0000000000..f3ba528896
--- /dev/null
+++ b/tools/editor/icons/icon_graph_xform_vec_func.png
Binary files differ
diff --git a/tools/editor/icons/icon_graph_xform_vec_imult.png b/tools/editor/icons/icon_graph_xform_vec_imult.png
new file mode 100644
index 0000000000..7e7330cb8c
--- /dev/null
+++ b/tools/editor/icons/icon_graph_xform_vec_imult.png
Binary files differ
diff --git a/tools/editor/icons/icon_graph_xform_vec_mult.png b/tools/editor/icons/icon_graph_xform_vec_mult.png
new file mode 100644
index 0000000000..f80a28c80d
--- /dev/null
+++ b/tools/editor/icons/icon_graph_xform_vec_mult.png
Binary files differ
diff --git a/tools/editor/icons/icon_group.png b/tools/editor/icons/icon_group.png
index 577c84777e..d43b4958c9 100644
--- a/tools/editor/icons/icon_group.png
+++ b/tools/editor/icons/icon_group.png
Binary files differ
diff --git a/tools/editor/icons/icon_groups.png b/tools/editor/icons/icon_groups.png
index da4fd0d985..f4386821ed 100644
--- a/tools/editor/icons/icon_groups.png
+++ b/tools/editor/icons/icon_groups.png
Binary files differ
diff --git a/tools/editor/icons/icon_hidden.png b/tools/editor/icons/icon_hidden.png
index 45fcfc2f47..e51b9ad03a 100644
--- a/tools/editor/icons/icon_hidden.png
+++ b/tools/editor/icons/icon_hidden.png
Binary files differ
diff --git a/tools/editor/icons/icon_image.png b/tools/editor/icons/icon_image.png
index a6b1fbf6c1..5919ca8c6d 100644
--- a/tools/editor/icons/icon_image.png
+++ b/tools/editor/icons/icon_image.png
Binary files differ
diff --git a/tools/editor/icons/icon_image_texture.png b/tools/editor/icons/icon_image_texture.png
index 4618d984b8..b87e284a52 100644
--- a/tools/editor/icons/icon_image_texture.png
+++ b/tools/editor/icons/icon_image_texture.png
Binary files differ
diff --git a/tools/editor/icons/icon_instance_options.png b/tools/editor/icons/icon_instance_options.png
index 2d3e98b2ea..9108448095 100644
--- a/tools/editor/icons/icon_instance_options.png
+++ b/tools/editor/icons/icon_instance_options.png
Binary files differ
diff --git a/tools/editor/icons/icon_integer.png b/tools/editor/icons/icon_integer.png
index 0e5b5abd62..32c8d9885b 100644
--- a/tools/editor/icons/icon_integer.png
+++ b/tools/editor/icons/icon_integer.png
Binary files differ
diff --git a/tools/editor/icons/icon_interp_cubic.png b/tools/editor/icons/icon_interp_cubic.png
index ab33aa7e6a..a946d70947 100644
--- a/tools/editor/icons/icon_interp_cubic.png
+++ b/tools/editor/icons/icon_interp_cubic.png
Binary files differ
diff --git a/tools/editor/icons/icon_interp_linear.png b/tools/editor/icons/icon_interp_linear.png
index bf3849ecaf..9174af39e7 100644
--- a/tools/editor/icons/icon_interp_linear.png
+++ b/tools/editor/icons/icon_interp_linear.png
Binary files differ
diff --git a/tools/editor/icons/icon_interp_raw.png b/tools/editor/icons/icon_interp_raw.png
index 48650d6e66..f12936493b 100644
--- a/tools/editor/icons/icon_interp_raw.png
+++ b/tools/editor/icons/icon_interp_raw.png
Binary files differ
diff --git a/tools/editor/icons/icon_key.png b/tools/editor/icons/icon_key.png
index d647876866..d6096ef41f 100644
--- a/tools/editor/icons/icon_key.png
+++ b/tools/editor/icons/icon_key.png
Binary files differ
diff --git a/tools/editor/icons/icon_key_selected.png b/tools/editor/icons/icon_key_selected.png
index d916c55286..562beef98a 100644
--- a/tools/editor/icons/icon_key_selected.png
+++ b/tools/editor/icons/icon_key_selected.png
Binary files differ
diff --git a/tools/editor/icons/icon_light_map.png b/tools/editor/icons/icon_light_map.png
index 96d3f6e11c..e0333f06ea 100644
--- a/tools/editor/icons/icon_light_map.png
+++ b/tools/editor/icons/icon_light_map.png
Binary files differ
diff --git a/tools/editor/icons/icon_load.png b/tools/editor/icons/icon_load.png
index fdc06d38a3..a450a7b297 100644
--- a/tools/editor/icons/icon_load.png
+++ b/tools/editor/icons/icon_load.png
Binary files differ
diff --git a/tools/editor/icons/icon_lock.png b/tools/editor/icons/icon_lock.png
index 0cfd1d4ab1..995d87b6fb 100644
--- a/tools/editor/icons/icon_lock.png
+++ b/tools/editor/icons/icon_lock.png
Binary files differ
diff --git a/tools/editor/icons/icon_loop.png b/tools/editor/icons/icon_loop.png
index d75642359d..7bde451ca0 100644
--- a/tools/editor/icons/icon_loop.png
+++ b/tools/editor/icons/icon_loop.png
Binary files differ
diff --git a/tools/editor/icons/icon_main_play.png b/tools/editor/icons/icon_main_play.png
index 401708c49e..9e8cc6c4a9 100644
--- a/tools/editor/icons/icon_main_play.png
+++ b/tools/editor/icons/icon_main_play.png
Binary files differ
diff --git a/tools/editor/icons/icon_main_stop.png b/tools/editor/icons/icon_main_stop.png
index 3f54ba69c9..31a6cd601e 100644
--- a/tools/editor/icons/icon_main_stop.png
+++ b/tools/editor/icons/icon_main_stop.png
Binary files differ
diff --git a/tools/editor/icons/icon_mirror_x.png b/tools/editor/icons/icon_mirror_x.png
index d20f90c1da..657e7f5458 100644
--- a/tools/editor/icons/icon_mirror_x.png
+++ b/tools/editor/icons/icon_mirror_x.png
Binary files differ
diff --git a/tools/editor/icons/icon_mirror_y.png b/tools/editor/icons/icon_mirror_y.png
index 5e2f710425..111aa5e4ae 100644
--- a/tools/editor/icons/icon_mirror_y.png
+++ b/tools/editor/icons/icon_mirror_y.png
Binary files differ
diff --git a/tools/editor/icons/icon_move_down.png b/tools/editor/icons/icon_move_down.png
index ef310e80e1..06c7246084 100644
--- a/tools/editor/icons/icon_move_down.png
+++ b/tools/editor/icons/icon_move_down.png
Binary files differ
diff --git a/tools/editor/icons/icon_move_down_hl.png b/tools/editor/icons/icon_move_down_hl.png
index dec56e8da8..f9de58a940 100644
--- a/tools/editor/icons/icon_move_down_hl.png
+++ b/tools/editor/icons/icon_move_down_hl.png
Binary files differ
diff --git a/tools/editor/icons/icon_move_up.png b/tools/editor/icons/icon_move_up.png
index d67b1aff0b..ca6c64f7a1 100644
--- a/tools/editor/icons/icon_move_up.png
+++ b/tools/editor/icons/icon_move_up.png
Binary files differ
diff --git a/tools/editor/icons/icon_move_up_hl.png b/tools/editor/icons/icon_move_up_hl.png
index 19ce8bbe27..e076c9a265 100644
--- a/tools/editor/icons/icon_move_up_hl.png
+++ b/tools/editor/icons/icon_move_up_hl.png
Binary files differ
diff --git a/tools/editor/icons/icon_new.png b/tools/editor/icons/icon_new.png
index 3596d2e8ea..c04785fc3f 100644
--- a/tools/editor/icons/icon_new.png
+++ b/tools/editor/icons/icon_new.png
Binary files differ
diff --git a/tools/editor/icons/icon_node.png b/tools/editor/icons/icon_node.png
index b0f7fb01dc..d8ce1b7538 100644
--- a/tools/editor/icons/icon_node.png
+++ b/tools/editor/icons/icon_node.png
Binary files differ
diff --git a/tools/editor/icons/icon_open.png b/tools/editor/icons/icon_open.png
index 4fad5677ca..a450a7b297 100644
--- a/tools/editor/icons/icon_open.png
+++ b/tools/editor/icons/icon_open.png
Binary files differ
diff --git a/tools/editor/icons/icon_p_hash_translation.png b/tools/editor/icons/icon_p_hash_translation.png
index c0eadc3c55..e18ef6a76f 100644
--- a/tools/editor/icons/icon_p_hash_translation.png
+++ b/tools/editor/icons/icon_p_hash_translation.png
Binary files differ
diff --git a/tools/editor/icons/icon_packed_scene.png b/tools/editor/icons/icon_packed_scene.png
index 9c1e1c4fbf..c9802f2b66 100644
--- a/tools/editor/icons/icon_packed_scene.png
+++ b/tools/editor/icons/icon_packed_scene.png
Binary files differ
diff --git a/tools/editor/icons/icon_panels_1.png b/tools/editor/icons/icon_panels_1.png
index 501c8c9acc..546ca61c89 100644
--- a/tools/editor/icons/icon_panels_1.png
+++ b/tools/editor/icons/icon_panels_1.png
Binary files differ
diff --git a/tools/editor/icons/icon_panels_2.png b/tools/editor/icons/icon_panels_2.png
index 08f104e2b1..5a4750bda2 100644
--- a/tools/editor/icons/icon_panels_2.png
+++ b/tools/editor/icons/icon_panels_2.png
Binary files differ
diff --git a/tools/editor/icons/icon_panels_3.png b/tools/editor/icons/icon_panels_3.png
index 1d1902d8dd..13988de93a 100644
--- a/tools/editor/icons/icon_panels_3.png
+++ b/tools/editor/icons/icon_panels_3.png
Binary files differ
diff --git a/tools/editor/icons/icon_panels_4.png b/tools/editor/icons/icon_panels_4.png
index 83cc133d21..c217330d43 100644
--- a/tools/editor/icons/icon_panels_4.png
+++ b/tools/editor/icons/icon_panels_4.png
Binary files differ
diff --git a/tools/editor/icons/icon_pin.png b/tools/editor/icons/icon_pin.png
index f34c8585f7..037352137d 100644
--- a/tools/editor/icons/icon_pin.png
+++ b/tools/editor/icons/icon_pin.png
Binary files differ
diff --git a/tools/editor/icons/icon_pin_pressed.png b/tools/editor/icons/icon_pin_pressed.png
index f151b5a590..5738e6856f 100644
--- a/tools/editor/icons/icon_pin_pressed.png
+++ b/tools/editor/icons/icon_pin_pressed.png
Binary files differ
diff --git a/tools/editor/icons/icon_play.png b/tools/editor/icons/icon_play.png
index 544b3bc5f4..08cce495a9 100644
--- a/tools/editor/icons/icon_play.png
+++ b/tools/editor/icons/icon_play.png
Binary files differ
diff --git a/tools/editor/icons/icon_play_custom.png b/tools/editor/icons/icon_play_custom.png
index 5c98c7100b..8e8ab8c62a 100644
--- a/tools/editor/icons/icon_play_custom.png
+++ b/tools/editor/icons/icon_play_custom.png
Binary files differ
diff --git a/tools/editor/icons/icon_play_scene.png b/tools/editor/icons/icon_play_scene.png
index 7ca59fe900..7079cc9677 100644
--- a/tools/editor/icons/icon_play_scene.png
+++ b/tools/editor/icons/icon_play_scene.png
Binary files differ
diff --git a/tools/editor/icons/icon_prev_scene.png b/tools/editor/icons/icon_prev_scene.png
index c7c180e1c4..9d8dda5180 100644
--- a/tools/editor/icons/icon_prev_scene.png
+++ b/tools/editor/icons/icon_prev_scene.png
Binary files differ
diff --git a/tools/editor/icons/icon_real.png b/tools/editor/icons/icon_real.png
index bfe5038319..80fbf7017c 100644
--- a/tools/editor/icons/icon_real.png
+++ b/tools/editor/icons/icon_real.png
Binary files differ
diff --git a/tools/editor/icons/icon_reload.png b/tools/editor/icons/icon_reload.png
index 07f53efb56..f7c6530d77 100644
--- a/tools/editor/icons/icon_reload.png
+++ b/tools/editor/icons/icon_reload.png
Binary files differ
diff --git a/tools/editor/icons/icon_remove.png b/tools/editor/icons/icon_remove.png
index 5349af466e..10e56d5bb8 100644
--- a/tools/editor/icons/icon_remove.png
+++ b/tools/editor/icons/icon_remove.png
Binary files differ
diff --git a/tools/editor/icons/icon_rename.png b/tools/editor/icons/icon_rename.png
index f88da39915..7b6a10df93 100644
--- a/tools/editor/icons/icon_rename.png
+++ b/tools/editor/icons/icon_rename.png
Binary files differ
diff --git a/tools/editor/icons/icon_reparent.png b/tools/editor/icons/icon_reparent.png
index af85b17ecc..59aee5e42d 100644
--- a/tools/editor/icons/icon_reparent.png
+++ b/tools/editor/icons/icon_reparent.png
Binary files differ
diff --git a/tools/editor/icons/icon_replace.png b/tools/editor/icons/icon_replace.png
index 2ae843ae10..662a58dc93 100644
--- a/tools/editor/icons/icon_replace.png
+++ b/tools/editor/icons/icon_replace.png
Binary files differ
diff --git a/tools/editor/icons/icon_resource_preloader.png b/tools/editor/icons/icon_resource_preloader.png
index e31e5a0d59..14b8c4de3c 100644
--- a/tools/editor/icons/icon_resource_preloader.png
+++ b/tools/editor/icons/icon_resource_preloader.png
Binary files differ
diff --git a/tools/editor/icons/icon_sample_player.png b/tools/editor/icons/icon_sample_player.png
index 5561769b05..92d9cc77bf 100644
--- a/tools/editor/icons/icon_sample_player.png
+++ b/tools/editor/icons/icon_sample_player.png
Binary files differ
diff --git a/tools/editor/icons/icon_save.png b/tools/editor/icons/icon_save.png
index dce274ffb1..ddef66688d 100644
--- a/tools/editor/icons/icon_save.png
+++ b/tools/editor/icons/icon_save.png
Binary files differ
diff --git a/tools/editor/icons/icon_script.png b/tools/editor/icons/icon_script.png
index 65fb3c4934..baf5927c18 100644
--- a/tools/editor/icons/icon_script.png
+++ b/tools/editor/icons/icon_script.png
Binary files differ
diff --git a/tools/editor/icons/icon_sound_room_params.png b/tools/editor/icons/icon_sound_room_params.png
index 8e381d7978..2d37a4b49f 100644
--- a/tools/editor/icons/icon_sound_room_params.png
+++ b/tools/editor/icons/icon_sound_room_params.png
Binary files differ
diff --git a/tools/editor/icons/icon_stop.png b/tools/editor/icons/icon_stop.png
index 3b7562fa4a..fd568b61a8 100644
--- a/tools/editor/icons/icon_stop.png
+++ b/tools/editor/icons/icon_stop.png
Binary files differ
diff --git a/tools/editor/icons/icon_stream_player.png b/tools/editor/icons/icon_stream_player.png
index 2670a567e8..cf8fdcbaea 100644
--- a/tools/editor/icons/icon_stream_player.png
+++ b/tools/editor/icons/icon_stream_player.png
Binary files differ
diff --git a/tools/editor/icons/icon_string.png b/tools/editor/icons/icon_string.png
index 86cc8e633f..48bf753c40 100644
--- a/tools/editor/icons/icon_string.png
+++ b/tools/editor/icons/icon_string.png
Binary files differ
diff --git a/tools/editor/icons/icon_texture.png b/tools/editor/icons/icon_texture.png
index 03d6ac7db2..bbcc54bd6e 100644
--- a/tools/editor/icons/icon_texture.png
+++ b/tools/editor/icons/icon_texture.png
Binary files differ
diff --git a/tools/editor/icons/icon_timer.png b/tools/editor/icons/icon_timer.png
index 3855683033..e8c36ae893 100644
--- a/tools/editor/icons/icon_timer.png
+++ b/tools/editor/icons/icon_timer.png
Binary files differ
diff --git a/tools/editor/icons/icon_tool_move.png b/tools/editor/icons/icon_tool_move.png
index fc611cdbb1..7257d3897b 100644
--- a/tools/editor/icons/icon_tool_move.png
+++ b/tools/editor/icons/icon_tool_move.png
Binary files differ
diff --git a/tools/editor/icons/icon_tool_pan.png b/tools/editor/icons/icon_tool_pan.png
index 5c078a7b1c..bfe6fddf45 100644
--- a/tools/editor/icons/icon_tool_pan.png
+++ b/tools/editor/icons/icon_tool_pan.png
Binary files differ
diff --git a/tools/editor/icons/icon_tool_rotate.png b/tools/editor/icons/icon_tool_rotate.png
index c833b93d6e..9575ceb54e 100644
--- a/tools/editor/icons/icon_tool_rotate.png
+++ b/tools/editor/icons/icon_tool_rotate.png
Binary files differ
diff --git a/tools/editor/icons/icon_tool_scale.png b/tools/editor/icons/icon_tool_scale.png
index 3eaeae1e99..a94a6e7c98 100644
--- a/tools/editor/icons/icon_tool_scale.png
+++ b/tools/editor/icons/icon_tool_scale.png
Binary files differ
diff --git a/tools/editor/icons/icon_tool_select.png b/tools/editor/icons/icon_tool_select.png
index eb5ff6e1da..47683228e9 100644
--- a/tools/editor/icons/icon_tool_select.png
+++ b/tools/editor/icons/icon_tool_select.png
Binary files differ
diff --git a/tools/editor/icons/icon_tools.png b/tools/editor/icons/icon_tools.png
index 927173ea0f..f02d924203 100644
--- a/tools/editor/icons/icon_tools.png
+++ b/tools/editor/icons/icon_tools.png
Binary files differ
diff --git a/tools/editor/icons/icon_track_continuous.png b/tools/editor/icons/icon_track_continuous.png
index 97e8762299..9f99891c21 100644
--- a/tools/editor/icons/icon_track_continuous.png
+++ b/tools/editor/icons/icon_track_continuous.png
Binary files differ
diff --git a/tools/editor/icons/icon_track_discrete.png b/tools/editor/icons/icon_track_discrete.png
index 57a4cd5579..4e65e49afb 100644
--- a/tools/editor/icons/icon_track_discrete.png
+++ b/tools/editor/icons/icon_track_discrete.png
Binary files differ
diff --git a/tools/editor/icons/icon_translation.png b/tools/editor/icons/icon_translation.png
index 6211ab9a1b..917c6f548a 100644
--- a/tools/editor/icons/icon_translation.png
+++ b/tools/editor/icons/icon_translation.png
Binary files differ
diff --git a/tools/editor/icons/icon_unbone.png b/tools/editor/icons/icon_unbone.png
index 819e8a8e5d..c8cd774460 100644
--- a/tools/editor/icons/icon_unbone.png
+++ b/tools/editor/icons/icon_unbone.png
Binary files differ
diff --git a/tools/editor/icons/icon_ungroup.png b/tools/editor/icons/icon_ungroup.png
index 16511e3f1c..4ea620bf96 100644
--- a/tools/editor/icons/icon_ungroup.png
+++ b/tools/editor/icons/icon_ungroup.png
Binary files differ
diff --git a/tools/editor/icons/icon_unlock.png b/tools/editor/icons/icon_unlock.png
index b86447bf7a..f9fa31c3e0 100644
--- a/tools/editor/icons/icon_unlock.png
+++ b/tools/editor/icons/icon_unlock.png
Binary files differ
diff --git a/tools/editor/icons/icon_uv.png b/tools/editor/icons/icon_uv.png
index 4d9d198d86..39bc737a37 100644
--- a/tools/editor/icons/icon_uv.png
+++ b/tools/editor/icons/icon_uv.png
Binary files differ
diff --git a/tools/editor/icons/icon_vector.png b/tools/editor/icons/icon_vector.png
index 7826d7f7a9..0ee33ba0b7 100644
--- a/tools/editor/icons/icon_vector.png
+++ b/tools/editor/icons/icon_vector.png
Binary files differ
diff --git a/tools/editor/icons/icon_vector2.png b/tools/editor/icons/icon_vector2.png
index 44e48c36c7..5920109a55 100644
--- a/tools/editor/icons/icon_vector2.png
+++ b/tools/editor/icons/icon_vector2.png
Binary files differ
diff --git a/tools/editor/icons/icon_viewport.png b/tools/editor/icons/icon_viewport.png
index 0a0d93cf4d..3859f6c7e9 100644
--- a/tools/editor/icons/icon_viewport.png
+++ b/tools/editor/icons/icon_viewport.png
Binary files differ
diff --git a/tools/editor/icons/icon_visible.png b/tools/editor/icons/icon_visible.png
index 519898bbef..cbc44c4e30 100644
--- a/tools/editor/icons/icon_visible.png
+++ b/tools/editor/icons/icon_visible.png
Binary files differ
diff --git a/tools/editor/icons/icon_zoom.png b/tools/editor/icons/icon_zoom.png
index cbacaaaeca..e4bbbfe7c3 100644
--- a/tools/editor/icons/icon_zoom.png
+++ b/tools/editor/icons/icon_zoom.png
Binary files differ
diff --git a/tools/editor/io_plugins/editor_font_import_plugin.cpp b/tools/editor/io_plugins/editor_font_import_plugin.cpp
index 064758f6cd..1fd7d26f8b 100644
--- a/tools/editor/io_plugins/editor_font_import_plugin.cpp
+++ b/tools/editor/io_plugins/editor_font_import_plugin.cpp
@@ -499,7 +499,7 @@ class EditorFontImportDialog : public ConfirmationDialog {
Error err = plugin->import(dest->get_line_edit()->get_text(),rimd);
if (err!=OK) {
- error_dialog->set_text("Could't save font.");
+ error_dialog->set_text("Couldn't save font.");
error_dialog->popup_centered(Size2(200,100));
return;
}
diff --git a/tools/editor/io_plugins/editor_texture_import_plugin.cpp b/tools/editor/io_plugins/editor_texture_import_plugin.cpp
index b855b15b39..ce376f2e7b 100644
--- a/tools/editor/io_plugins/editor_texture_import_plugin.cpp
+++ b/tools/editor/io_plugins/editor_texture_import_plugin.cpp
@@ -411,7 +411,11 @@ void EditorTextureImportDialog::popup_import(const String& p_from) {
Ref<ResourceImportMetadata> rimd = ResourceLoader::load_import_metadata(p_from);
ERR_FAIL_COND(!rimd.is_valid());
- save_path->set_text(p_from.get_base_dir());
+ if (plugin->get_mode()==EditorTextureImportPlugin::MODE_ATLAS)
+ save_path->set_text(p_from);
+ else
+ save_path->set_text(p_from.get_base_dir());
+
texture_options->set_format(EditorTextureImportPlugin::ImageFormat(int(rimd->get_option("format"))));
texture_options->set_flags(rimd->get_option("flags"));
texture_options->set_quality(rimd->get_option("quality"));
diff --git a/tools/editor/io_plugins/editor_texture_import_plugin.h b/tools/editor/io_plugins/editor_texture_import_plugin.h
index d17b3c05c2..e733a3ddf9 100644
--- a/tools/editor/io_plugins/editor_texture_import_plugin.h
+++ b/tools/editor/io_plugins/editor_texture_import_plugin.h
@@ -98,6 +98,7 @@ public:
IMAGE_FLAG_USE_ANISOTROPY=1024, //convert image to linear
};
+ Mode get_mode() const { return mode; }
virtual String get_name() const;
virtual String get_visible_name() const;
virtual void import_dialog(const String& p_from="");
diff --git a/tools/editor/plugins/canvas_item_editor_plugin.cpp b/tools/editor/plugins/canvas_item_editor_plugin.cpp
index 43ebebeb22..514f4b6525 100644
--- a/tools/editor/plugins/canvas_item_editor_plugin.cpp
+++ b/tools/editor/plugins/canvas_item_editor_plugin.cpp
@@ -2688,6 +2688,11 @@ HSplitContainer *CanvasItemEditor::get_palette_split() {
return palette_split;
}
+VSplitContainer *CanvasItemEditor::get_bottom_split() {
+
+ return bottom_split;
+}
+
CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
tool = TOOL_SELECT;
@@ -2702,9 +2707,13 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
add_child( hb );
hb->set_area_as_parent_rect();
+ bottom_split = memnew( VSplitContainer );
+ bottom_split->set_v_size_flags(SIZE_EXPAND_FILL);
+ add_child(bottom_split);
+
palette_split = memnew( HSplitContainer);
palette_split->set_v_size_flags(SIZE_EXPAND_FILL);
- add_child(palette_split);
+ bottom_split->add_child(palette_split);
Control *vp_base = memnew (Control);
vp_base->set_v_size_flags(SIZE_EXPAND_FILL);
diff --git a/tools/editor/plugins/canvas_item_editor_plugin.h b/tools/editor/plugins/canvas_item_editor_plugin.h
index c56570d43f..6648d486e8 100644
--- a/tools/editor/plugins/canvas_item_editor_plugin.h
+++ b/tools/editor/plugins/canvas_item_editor_plugin.h
@@ -290,8 +290,8 @@ class CanvasItemEditor : public VBoxContainer {
void _viewport_input_event(const InputEvent& p_event);
void _viewport_draw();
-private:
HSplitContainer *palette_split;
+ VSplitContainer *bottom_split;
friend class CanvasItemEditorPlugin;
protected:
@@ -346,6 +346,7 @@ public:
void add_control_to_menu_panel(Control *p_control);
HSplitContainer *get_palette_split();
+ VSplitContainer *get_bottom_split();
Control *get_viewport_control() { return viewport; }
diff --git a/tools/editor/plugins/path_2d_editor_plugin.cpp b/tools/editor/plugins/path_2d_editor_plugin.cpp
index 33ea5f3588..49239343a5 100644
--- a/tools/editor/plugins/path_2d_editor_plugin.cpp
+++ b/tools/editor/plugins/path_2d_editor_plugin.cpp
@@ -195,7 +195,7 @@ bool Path2DEditor::forward_input_event(const InputEvent& p_event) {
Ref<Curve2D> curve = node->get_curve();
- Vector2 new_pos = moving_from + xform.basis_xform( gpoint - moving_screen_from );
+ Vector2 new_pos = moving_from + xform.affine_inverse().basis_xform(gpoint - moving_screen_from);
switch(action) {
case ACTION_MOVING_POINT: {
@@ -439,7 +439,7 @@ bool Path2DEditor::forward_input_event(const InputEvent& p_event) {
Ref<Curve2D> curve = node->get_curve();
- Vector2 new_pos = moving_from + xform.basis_xform( gpoint - moving_screen_from );
+ Vector2 new_pos = moving_from + xform.affine_inverse().basis_xform(gpoint - moving_screen_from);
switch(action) {
diff --git a/tools/editor/plugins/script_editor_plugin.cpp b/tools/editor/plugins/script_editor_plugin.cpp
index 55957887dc..4b7d1cf0e0 100644
--- a/tools/editor/plugins/script_editor_plugin.cpp
+++ b/tools/editor/plugins/script_editor_plugin.cpp
@@ -188,7 +188,7 @@ void ScriptTextEditor::apply_code() {
if (script.is_null())
return;
- print_line("applying code");
+// print_line("applying code");
script->set_source_code(get_text_edit()->get_text());
script->update_exports();
}
@@ -210,6 +210,7 @@ void ScriptTextEditor::_load_theme_settings() {
get_text_edit()->add_color_override("font_selected_color",EDITOR_DEF("text_editor/text_selected_color",Color(1,1,1)));
get_text_edit()->add_color_override("selection_color",EDITOR_DEF("text_editor/selection_color",Color(0.2,0.2,1)));
get_text_edit()->add_color_override("brace_mismatch_color",EDITOR_DEF("text_editor/brace_mismatch_color",Color(1,0.2,0.2)));
+ get_text_edit()->add_color_override("current_line_color",EDITOR_DEF("text_editor/current_line_color",Color(0.3,0.5,0.8,0.15)));
Color keyword_color= EDITOR_DEF("text_editor/keyword_color",Color(0.5,0.0,0.2));
@@ -1033,9 +1034,12 @@ void ScriptEditor::_menu_option(int p_option) {
editor->emit_signal("request_help", text);
} break;
case WINDOW_CLOSE: {
-
- erase_tab_confirm->set_text("Close Tab?:\n\""+current->get_name()+"\"");
- erase_tab_confirm->popup_centered(Point2(250,80));
+ if (current->get_text_edit()->get_version()!=current->get_text_edit()->get_saved_version()) {
+ erase_tab_confirm->set_text("Close and save changes?\n\""+current->get_name()+"\"");
+ erase_tab_confirm->popup_centered(Point2(250,80));
+ } else {
+ _close_current_tab();
+ }
} break;
case WINDOW_MOVE_LEFT: {
@@ -1603,7 +1607,7 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) {
edit_menu->get_popup()->add_item("Clone Down",EDIT_CLONE_DOWN,KEY_MASK_CMD|KEY_B);
edit_menu->get_popup()->add_separator();
#ifdef OSX_ENABLED
- edit_menu->get_popup()->add_item("Complete Symbol",EDIT_COMPLETE,KEY_MASK_META|KEY_SPACE);
+ edit_menu->get_popup()->add_item("Complete Symbol",EDIT_COMPLETE,KEY_MASK_CTRL|KEY_SPACE);
#else
edit_menu->get_popup()->add_item("Complete Symbol",EDIT_COMPLETE,KEY_MASK_CMD|KEY_SPACE);
#endif
diff --git a/tools/editor/plugins/shader_editor_plugin.cpp b/tools/editor/plugins/shader_editor_plugin.cpp
index 3166383fc8..2fcd4e8cd1 100644
--- a/tools/editor/plugins/shader_editor_plugin.cpp
+++ b/tools/editor/plugins/shader_editor_plugin.cpp
@@ -57,9 +57,9 @@ void ShaderTextEditor::set_edited_shader(const Ref<Shader>& p_shader,ShaderLangu
_load_theme_settings();
- if (p_type==ShaderLanguage::SHADER_MATERIAL_LIGHT)
+ if (p_type==ShaderLanguage::SHADER_MATERIAL_LIGHT || p_type==ShaderLanguage::SHADER_CANVAS_ITEM_LIGHT)
get_text_edit()->set_text(shader->get_light_code());
- else if (p_type==ShaderLanguage::SHADER_MATERIAL_VERTEX)
+ else if (p_type==ShaderLanguage::SHADER_MATERIAL_VERTEX || p_type==ShaderLanguage::SHADER_CANVAS_ITEM_VERTEX)
get_text_edit()->set_text(shader->get_vertex_code());
else
get_text_edit()->set_text(shader->get_fragment_code());
@@ -81,6 +81,7 @@ void ShaderTextEditor::_load_theme_settings() {
get_text_edit()->add_color_override("font_selected_color",EDITOR_DEF("text_editor/text_selected_color",Color(1,1,1)));
get_text_edit()->add_color_override("selection_color",EDITOR_DEF("text_editor/selection_color",Color(0.2,0.2,1)));
get_text_edit()->add_color_override("brace_mismatch_color",EDITOR_DEF("text_editor/brace_mismatch_color",Color(1,0.2,0.2)));
+ get_text_edit()->add_color_override("current_line_color",EDITOR_DEF("text_editor/current_line_color",Color(0.3,0.5,0.8,0.15)));
Color keyword_color= EDITOR_DEF("text_editor/keyword_color",Color(0.5,0.0,0.2));
@@ -131,17 +132,12 @@ void ShaderTextEditor::_validate_script() {
String errortxt;
int line,col;
- String code;
- if (type==ShaderLanguage::SHADER_MATERIAL_LIGHT)
- code=get_text_edit()->get_text();
- else if (type==ShaderLanguage::SHADER_MATERIAL_VERTEX)
- code=get_text_edit()->get_text();
- else
- code=get_text_edit()->get_text();
-
+ String code=get_text_edit()->get_text();
//List<StringName> params;
//shader->get_param_list(&params);
+ print_line("compile: type: "+itos(type)+" code:\n"+code);
+
Error err = ShaderLanguage::compile(code,type,NULL,NULL,&errortxt,&line,&col);
if (err!=OK) {
@@ -233,25 +229,7 @@ void ShaderEditor::_menu_option(int p_option) {
goto_line_dialog->popup_find_line(current->get_text_edit());
} break;
- case SHADER_POST_PROCESS_MODE:{
-
- fragment_editor->set_edited_shader(shader,ShaderLanguage::SHADER_POST_PROCESS);
- fragment_editor->_validate_script();
- apply_shaders();
- settings_menu->get_popup()->set_item_checked( settings_menu->get_popup()->get_item_index(SHADER_MATERIAL_MODE), false);
- settings_menu->get_popup()->set_item_checked( settings_menu->get_popup()->get_item_index(SHADER_POST_PROCESS_MODE), true);
-
-
- } break;
- case SHADER_MATERIAL_MODE: {
- fragment_editor->set_edited_shader(shader,ShaderLanguage::SHADER_MATERIAL_FRAGMENT);
- fragment_editor->_validate_script();
- apply_shaders();
- settings_menu->get_popup()->set_item_checked( settings_menu->get_popup()->get_item_index(SHADER_MATERIAL_MODE), true);
- settings_menu->get_popup()->set_item_checked( settings_menu->get_popup()->get_item_index(SHADER_POST_PROCESS_MODE), false);
-
- } break;
}
}
@@ -408,18 +386,17 @@ void ShaderEditor::edit(const Ref<Shader>& p_shader) {
shader=p_shader;
if (shader->get_mode()==Shader::MODE_MATERIAL) {
+ vertex_editor->set_edited_shader(p_shader,ShaderLanguage::SHADER_MATERIAL_VERTEX);
fragment_editor->set_edited_shader(p_shader,ShaderLanguage::SHADER_MATERIAL_FRAGMENT);
light_editor->set_edited_shader(shader,ShaderLanguage::SHADER_MATERIAL_LIGHT);
- settings_menu->get_popup()->set_item_checked( settings_menu->get_popup()->get_item_index(SHADER_MATERIAL_MODE), true);
- settings_menu->get_popup()->set_item_checked( settings_menu->get_popup()->get_item_index(SHADER_POST_PROCESS_MODE), false);
- } else {
+ } else if (shader->get_mode()==Shader::MODE_CANVAS_ITEM) {
- fragment_editor->set_edited_shader(p_shader,ShaderLanguage::SHADER_POST_PROCESS);
- settings_menu->get_popup()->set_item_checked( settings_menu->get_popup()->get_item_index(SHADER_MATERIAL_MODE), false);
- settings_menu->get_popup()->set_item_checked( settings_menu->get_popup()->get_item_index(SHADER_POST_PROCESS_MODE), true);
+ vertex_editor->set_edited_shader(p_shader,ShaderLanguage::SHADER_CANVAS_ITEM_VERTEX);
+ fragment_editor->set_edited_shader(p_shader,ShaderLanguage::SHADER_CANVAS_ITEM_FRAGMENT);
+ light_editor->set_edited_shader(shader,ShaderLanguage::SHADER_CANVAS_ITEM_LIGHT);
}
- vertex_editor->set_edited_shader(shader,ShaderLanguage::SHADER_MATERIAL_VERTEX);
+ //vertex_editor->set_edited_shader(shader,ShaderLanguage::SHADER_MATERIAL_VERTEX);
// see if already has it
@@ -495,15 +472,6 @@ ShaderEditor::ShaderEditor() {
search_menu->get_popup()->add_item("Goto Line..",SEARCH_GOTO_LINE,KEY_MASK_CMD|KEY_G);
search_menu->get_popup()->connect("item_pressed", this,"_menu_option");
- settings_menu = memnew( MenuButton );
- add_child(settings_menu);
- settings_menu->set_pos(Point2(90,-1));
- settings_menu->set_text("Shader");
- settings_menu->get_popup()->add_check_item("Material Mode",SHADER_MATERIAL_MODE);
- settings_menu->get_popup()->set_item_checked(settings_menu->get_popup()->get_item_index(SHADER_MATERIAL_MODE),true);
- settings_menu->get_popup()->add_check_item("Post Process Mode",SHADER_POST_PROCESS_MODE);
-
- settings_menu->get_popup()->connect("item_pressed", this,"_menu_option");
tab_container->connect("tab_changed", this,"_tab_changed");
@@ -550,7 +518,13 @@ void ShaderEditorPlugin::edit(Object *p_object) {
bool ShaderEditorPlugin::handles(Object *p_object) const {
- return p_object->is_type("Shader");
+ Shader *shader=p_object->cast_to<Shader>();
+ if (!shader)
+ return false;
+ if (_2d)
+ return shader->get_mode()==Shader::MODE_CANVAS_ITEM;
+ else
+ return shader->get_mode()==Shader::MODE_MATERIAL;
}
void ShaderEditorPlugin::make_visible(bool p_visible) {
@@ -596,12 +570,15 @@ void ShaderEditorPlugin::apply_changes() {
shader_editor->apply_shaders();
}
-ShaderEditorPlugin::ShaderEditorPlugin(EditorNode *p_node) {
+ShaderEditorPlugin::ShaderEditorPlugin(EditorNode *p_node, bool p_2d) {
editor=p_node;
shader_editor = memnew( ShaderEditor );
-
- SpatialEditor::get_singleton()->get_shader_split()->add_child(shader_editor);
+ _2d=p_2d;
+ if (p_2d)
+ add_custom_control(CONTAINER_CANVAS_EDITOR_BOTTOM,shader_editor);
+ else
+ add_custom_control(CONTAINER_SPATIAL_EDITOR_BOTTOM,shader_editor);
// editor->get_viewport()->add_child(shader_editor);
// shader_editor->set_area_as_parent_rect();
diff --git a/tools/editor/plugins/shader_editor_plugin.h b/tools/editor/plugins/shader_editor_plugin.h
index 49caee5da6..daaa0ccb94 100644
--- a/tools/editor/plugins/shader_editor_plugin.h
+++ b/tools/editor/plugins/shader_editor_plugin.h
@@ -79,9 +79,6 @@ class ShaderEditor : public Control {
SEARCH_REPLACE,
//SEARCH_LOCATE_SYMBOL,
SEARCH_GOTO_LINE,
- SHADER_MATERIAL_MODE,
- SHADER_POST_PROCESS_MODE,
- SHADER_SHADE_MODEL_MODE,
};
@@ -134,6 +131,7 @@ class ShaderEditorPlugin : public EditorPlugin {
OBJ_TYPE( ShaderEditorPlugin, EditorPlugin );
+ bool _2d;
ShaderEditor *shader_editor;
EditorNode *editor;
public:
@@ -152,7 +150,7 @@ public:
virtual void save_external_data();
virtual void apply_changes();
- ShaderEditorPlugin(EditorNode *p_node);
+ ShaderEditorPlugin(EditorNode *p_node,bool p_2d);
~ShaderEditorPlugin();
};
diff --git a/tools/editor/plugins/shader_graph_editor_plugin.cpp b/tools/editor/plugins/shader_graph_editor_plugin.cpp
index 710f11e726..508e8b4cba 100644
--- a/tools/editor/plugins/shader_graph_editor_plugin.cpp
+++ b/tools/editor/plugins/shader_graph_editor_plugin.cpp
@@ -32,6 +32,642 @@
#include "scene/gui/menu_button.h"
#include "scene/gui/panel.h"
#include "spatial_editor_plugin.h"
+#include "os/keyboard.h"
+#include "canvas_item_editor_plugin.h"
+
+void GraphColorRampEdit::_input_event(const InputEvent& p_event) {
+
+ if (p_event.type==InputEvent::KEY && p_event.key.pressed && p_event.key.scancode==KEY_DELETE && grabbed!=-1) {
+
+ points.remove(grabbed);
+ grabbed=-1;
+ update();
+ emit_signal("ramp_changed");
+ accept_event();
+ }
+
+ if (p_event.type==InputEvent::MOUSE_BUTTON && p_event.mouse_button.button_index==1 && p_event.mouse_button.pressed) {
+
+ update();
+ int x = p_event.mouse_button.x;
+ int total_w = get_size().width-get_size().height-3;
+ if (x>total_w+3) {
+
+ if (grabbed==-1)
+ return;
+ Size2 ms = Size2(350, picker->get_combined_minimum_size().height+10);
+ picker->set_color(points[grabbed].color);
+ popup->set_pos(get_global_pos()-Size2(0,ms.height));
+ popup->set_size(ms);
+ popup->popup();
+ return;
+ }
+
+
+ float ofs = CLAMP(x/float(total_w),0,1);
+
+ grabbed=-1;
+ grabbing=true;
+ int pos=-1;
+ for(int i=0;i<points.size();i++) {
+
+ if (ABS(x-points[i].offset*total_w)<4) {
+ grabbed=i;
+ }
+ if (points[i].offset<ofs)
+ pos=i;
+ }
+
+ grabbed_at=ofs;
+ //grab or select
+ if (grabbed!=-1) {
+ return;
+ }
+ //insert
+
+
+ Point p;
+ p.offset=ofs;
+
+ Point prev;
+ Point next;
+
+ if (pos==-1) {
+
+ prev.color=Color(0,0,0);
+ prev.offset=0;
+ if (points.size()) {
+ next=points[0];
+ } else {
+ next.color=Color(1,1,1);
+ next.offset=1.0;
+ }
+ } else {
+
+ if (pos==points.size()-1) {
+ next.color=Color(1,1,1);
+ next.offset=1.0;
+ } else {
+ next=points[pos+1];
+ }
+ prev=points[pos];
+
+ }
+
+ p.color=prev.color.linear_interpolate(next.color,(p.offset-prev.offset)/(next.offset-prev.offset));
+
+ points.push_back(p);
+ points.sort();
+ for(int i=0;i<points.size();i++) {
+ if (points[i].offset==ofs) {
+ grabbed=i;
+ break;
+ }
+ }
+
+ emit_signal("ramp_changed");
+
+ }
+
+ if (p_event.type==InputEvent::MOUSE_BUTTON && p_event.mouse_button.button_index==1 && !p_event.mouse_button.pressed) {
+
+ if (grabbing) {
+ grabbing=false;
+ emit_signal("ramp_changed");
+ }
+ update();
+ }
+
+ if (p_event.type==InputEvent::MOUSE_MOTION && grabbing) {
+
+ int total_w = get_size().width-get_size().height-3;
+
+ int x = p_event.mouse_motion.x;
+ float newofs = CLAMP(x/float(total_w),0,1);
+
+ bool valid=true;
+ for(int i=0;i<points.size();i++) {
+
+ if (points[i].offset==newofs && i!=grabbed) {
+ valid=false;
+ }
+ }
+
+ if (!valid)
+ return;
+
+ points[grabbed].offset=newofs;
+
+ points.sort();
+ for(int i=0;i<points.size();i++) {
+ if (points[i].offset==newofs) {
+ grabbed=i;
+ break;
+ }
+ }
+
+ emit_signal("ramp_changed");
+
+ update();
+ }
+}
+
+void GraphColorRampEdit::_notification(int p_what){
+
+ if (p_what==NOTIFICATION_ENTER_TREE) {
+ picker->connect("color_changed",this,"_color_changed");
+ }
+ if (p_what==NOTIFICATION_DRAW) {
+
+
+ Point prev;
+ prev.offset=0;
+ prev.color=Color(0,0,0);
+ int w = get_size().x;
+ int h = get_size().y;
+
+ int total_w = get_size().width-get_size().height-3;
+
+ for(int i=-1;i<points.size();i++) {
+
+ Point next;
+ if (i+1==points.size()) {
+ next.color=Color(1,1,1);
+ next.offset=1;
+ } else {
+ next=points[i+1];
+ }
+
+ if (prev.offset==next.offset) {
+ prev=next;
+ continue;
+ }
+
+ Vector<Vector2> points;
+ Vector<Color> colors;
+ points.push_back(Vector2(prev.offset*total_w,h));
+ points.push_back(Vector2(prev.offset*total_w,0));
+ points.push_back(Vector2(next.offset*total_w,0));
+ points.push_back(Vector2(next.offset*total_w,h));
+ colors.push_back(prev.color);
+ colors.push_back(prev.color);
+ colors.push_back(next.color);
+ colors.push_back(next.color);
+ draw_primitive(points,colors,Vector<Point2>());
+ prev=next;
+ }
+
+ for(int i=0;i<points.size();i++) {
+
+ Color col=i==grabbed?Color(1,0.0,0.0,0.9):Color(1,1,1,0.8);
+
+ draw_line(Vector2(points[i].offset*total_w,0),Vector2(points[i].offset*total_w,h-1),Color(0,0,0,0.7));
+ draw_line(Vector2(points[i].offset*total_w-1,h/2),Vector2(points[i].offset*total_w-1,h-1),col);
+ draw_line(Vector2(points[i].offset*total_w+1,h/2),Vector2(points[i].offset*total_w+1,h-1),col);
+ draw_line(Vector2(points[i].offset*total_w-1,h/2),Vector2(points[i].offset*total_w+1,h/2),col);
+ draw_line(Vector2(points[i].offset*total_w-1,h-1),Vector2(points[i].offset*total_w+1,h-1),col);
+
+ }
+
+ if (grabbed!=-1) {
+
+ draw_rect(Rect2(total_w+3,0,h,h),points[grabbed].color);
+ }
+
+ if (has_focus()) {
+
+ draw_line(Vector2(-1,-1),Vector2(total_w+1,-1),Color(1,1,1,0.6));
+ draw_line(Vector2(total_w+1,-1),Vector2(total_w+1,h+1),Color(1,1,1,0.6));
+ draw_line(Vector2(total_w+1,h+1),Vector2(-1,h+1),Color(1,1,1,0.6));
+ draw_line(Vector2(-1,-1),Vector2(-1,h+1),Color(1,1,1,0.6));
+ }
+
+ }
+}
+
+Size2 GraphColorRampEdit::get_minimum_size() const {
+
+ return Vector2(0,16);
+}
+
+
+void GraphColorRampEdit::_color_changed(const Color& p_color) {
+
+ if (grabbed==-1)
+ return;
+ points[grabbed].color=p_color;
+ update();
+ emit_signal("ramp_changed");
+
+}
+
+void GraphColorRampEdit::set_ramp(const Vector<float>& p_offsets,const Vector<Color>& p_colors) {
+
+ ERR_FAIL_COND(p_offsets.size()!=p_colors.size());
+ points.clear();
+ for(int i=0;i<p_offsets.size();i++) {
+ Point p;
+ p.offset=p_offsets[i];
+ p.color=p_colors[i];
+ points.push_back(p);
+ }
+
+ points.sort();
+ update();
+}
+
+Vector<float> GraphColorRampEdit::get_offsets() const{
+ Vector<float> ret;
+ for(int i=0;i<points.size();i++)
+ ret.push_back(points[i].offset);
+ return ret;
+}
+Vector<Color> GraphColorRampEdit::get_colors() const{
+
+ Vector<Color> ret;
+ for(int i=0;i<points.size();i++)
+ ret.push_back(points[i].color);
+ return ret;
+}
+
+
+void GraphColorRampEdit::_bind_methods(){
+
+ ObjectTypeDB::bind_method(_MD("_input_event"),&GraphColorRampEdit::_input_event);
+ ObjectTypeDB::bind_method(_MD("_color_changed"),&GraphColorRampEdit::_color_changed);
+ ADD_SIGNAL(MethodInfo("ramp_changed"));
+}
+
+GraphColorRampEdit::GraphColorRampEdit(){
+
+ grabbed=-1;
+ grabbing=false;
+ set_focus_mode(FOCUS_ALL);
+
+ popup = memnew( PopupPanel );
+ picker = memnew( ColorPicker );
+ popup->add_child(picker);
+ popup->set_child_rect(picker);
+ add_child(popup);
+
+}
+////////////
+
+void GraphCurveMapEdit::_input_event(const InputEvent& p_event) {
+
+ if (p_event.type==InputEvent::KEY && p_event.key.pressed && p_event.key.scancode==KEY_DELETE && grabbed!=-1) {
+
+ points.remove(grabbed);
+ grabbed=-1;
+ update();
+ emit_signal("curve_changed");
+ accept_event();
+ }
+
+ if (p_event.type==InputEvent::MOUSE_BUTTON && p_event.mouse_button.button_index==1 && p_event.mouse_button.pressed) {
+
+ update();
+ Point2 p = Vector2(p_event.mouse_button.x,p_event.mouse_button.y)/get_size();
+ p.y=1.0-p.y;
+ grabbed=-1;
+ grabbing=true;
+
+ for(int i=0;i<points.size();i++) {
+
+ Vector2 ps = p*get_size();
+ Vector2 pt = Vector2(points[i].offset,points[i].height)*get_size();
+ if (ps.distance_to(pt)<4) {
+ grabbed=i;
+ }
+
+ }
+
+
+ //grab or select
+ if (grabbed!=-1) {
+ return;
+ }
+ //insert
+
+
+ Point np;
+ np.offset=p.x;
+ np.height=p.y;
+
+ points.push_back(np);
+ points.sort();
+ for(int i=0;i<points.size();i++) {
+ if (points[i].offset==p.x && points[i].height==p.y) {
+ grabbed=i;
+ break;
+ }
+ }
+
+ emit_signal("curve_changed");
+
+ }
+
+ if (p_event.type==InputEvent::MOUSE_BUTTON && p_event.mouse_button.button_index==1 && !p_event.mouse_button.pressed) {
+
+ if (grabbing) {
+ grabbing=false;
+ emit_signal("curve_changed");
+ }
+ update();
+ }
+
+ if (p_event.type==InputEvent::MOUSE_MOTION && grabbing) {
+
+ Point2 p = Vector2(p_event.mouse_button.x,p_event.mouse_button.y)/get_size();
+ p.y=1.0-p.y;
+
+ p.x = CLAMP(p.x,0.0,1.0);
+ p.y = CLAMP(p.y,0.0,1.0);
+
+ bool valid=true;
+
+ for(int i=0;i<points.size();i++) {
+
+ if (points[i].offset==p.x && points[i].height==p.y && i!=grabbed) {
+ valid=false;
+ }
+ }
+
+ if (!valid)
+ return;
+
+ points[grabbed].offset=p.x;
+ points[grabbed].height=p.y;
+
+ points.sort();
+ for(int i=0;i<points.size();i++) {
+ if (points[i].offset==p.x && points[i].height==p.y) {
+ grabbed=i;
+ break;
+ }
+ }
+
+ emit_signal("curve_changed");
+
+ update();
+ }
+}
+
+void GraphCurveMapEdit::_plot_curve(const Vector2& p_a,const Vector2& p_b,const Vector2& p_c,const Vector2& p_d) {
+
+ float geometry[4][4];
+ float tmp1[4][4];
+ float tmp2[4][4];
+ float deltas[4][4];
+ double x, dx, dx2, dx3;
+ double y, dy, dy2, dy3;
+ double d, d2, d3;
+ int lastx, lasty;
+ int newx, newy;
+ int ntimes;
+ int i,j;
+
+ int xmax=get_size().x;
+ int ymax=get_size().y;
+
+ /* construct the geometry matrix from the segment */
+ for (i = 0; i < 4; i++) {
+ geometry[i][2] = 0;
+ geometry[i][3] = 0;
+ }
+
+ geometry[0][0] = (p_a[0] * xmax);
+ geometry[1][0] = (p_b[0] * xmax);
+ geometry[2][0] = (p_c[0] * xmax);
+ geometry[3][0] = (p_d[0] * xmax);
+
+ geometry[0][1] = (p_a[1] * ymax);
+ geometry[1][1] = (p_b[1] * ymax);
+ geometry[2][1] = (p_c[1] * ymax);
+ geometry[3][1] = (p_d[1] * ymax);
+
+ /* subdivide the curve ntimes (1000) times */
+ ntimes = 4 * xmax;
+ /* ntimes can be adjusted to give a finer or coarser curve */
+ d = 1.0 / ntimes;
+ d2 = d * d;
+ d3 = d * d * d;
+
+ /* construct a temporary matrix for determining the forward differencing deltas */
+ tmp2[0][0] = 0; tmp2[0][1] = 0; tmp2[0][2] = 0; tmp2[0][3] = 1;
+ tmp2[1][0] = d3; tmp2[1][1] = d2; tmp2[1][2] = d; tmp2[1][3] = 0;
+ tmp2[2][0] = 6*d3; tmp2[2][1] = 2*d2; tmp2[2][2] = 0; tmp2[2][3] = 0;
+ tmp2[3][0] = 6*d3; tmp2[3][1] = 0; tmp2[3][2] = 0; tmp2[3][3] = 0;
+
+ /* compose the basis and geometry matrices */
+
+ static const float CR_basis[4][4] =
+ {
+ { -0.5, 1.5, -1.5, 0.5 },
+ { 1.0, -2.5, 2.0, -0.5 },
+ { -0.5, 0.0, 0.5, 0.0 },
+ { 0.0, 1.0, 0.0, 0.0 },
+ };
+
+ for (i = 0; i < 4; i++)
+ {
+ for (j = 0; j < 4; j++)
+ {
+ tmp1[i][j] = (CR_basis[i][0] * geometry[0][j] +
+ CR_basis[i][1] * geometry[1][j] +
+ CR_basis[i][2] * geometry[2][j] +
+ CR_basis[i][3] * geometry[3][j]);
+ }
+ }
+ /* compose the above results to get the deltas matrix */
+
+ for (i = 0; i < 4; i++)
+ {
+ for (j = 0; j < 4; j++)
+ {
+ deltas[i][j] = (tmp2[i][0] * tmp1[0][j] +
+ tmp2[i][1] * tmp1[1][j] +
+ tmp2[i][2] * tmp1[2][j] +
+ tmp2[i][3] * tmp1[3][j]);
+ }
+ }
+
+
+ /* extract the x deltas */
+ x = deltas[0][0];
+ dx = deltas[1][0];
+ dx2 = deltas[2][0];
+ dx3 = deltas[3][0];
+
+ /* extract the y deltas */
+ y = deltas[0][1];
+ dy = deltas[1][1];
+ dy2 = deltas[2][1];
+ dy3 = deltas[3][1];
+
+
+ lastx = CLAMP (x, 0, xmax);
+ lasty = CLAMP (y, 0, ymax);
+
+/* if (fix255)
+ {
+ cd->curve[cd->outline][lastx] = lasty;
+ }
+ else
+ {
+ cd->curve_ptr[cd->outline][lastx] = lasty;
+ if(gb_debug) printf("bender_plot_curve xmax:%d ymax:%d\n", (int)xmax, (int)ymax);
+ }
+*/
+ /* loop over the curve */
+ for (i = 0; i < ntimes; i++)
+ {
+ /* increment the x values */
+ x += dx;
+ dx += dx2;
+ dx2 += dx3;
+
+ /* increment the y values */
+ y += dy;
+ dy += dy2;
+ dy2 += dy3;
+
+ newx = CLAMP ((Math::round (x)), 0, xmax);
+ newy = CLAMP ((Math::round (y)), 0, ymax);
+
+ /* if this point is different than the last one...then draw it */
+ if ((lastx != newx) || (lasty != newy))
+ {
+#if 0
+ /*
+ if(fix255)
+ {
+ /* use fixed array size (for the curve graph) */
+ cd->curve[cd->outline][newx] = newy;
+ }
+ else
+ {
+ /* use dynamic allocated curve_ptr (for the real curve) */
+ cd->curve_ptr[cd->outline][newx] = newy;
+
+ if(gb_debug) printf("outline: %d cX: %d cY: %d\n", (int)cd->outline, (int)newx, (int)newy);
+ }
+#endif
+ draw_line(Vector2(lastx,ymax-lasty),Vector2(newx,ymax-newy),Color(0.8,0.8,0.8,0.8),2.0);
+ }
+
+ lastx = newx;
+ lasty = newy;
+ }
+}
+
+
+void GraphCurveMapEdit::_notification(int p_what){
+
+ if (p_what==NOTIFICATION_DRAW) {
+
+ draw_style_box(get_stylebox("bg","Tree"),Rect2(Point2(),get_size()));
+
+ int w = get_size().x;
+ int h = get_size().y;
+
+ Vector2 prev=Vector2(0,0);
+ Vector2 prev2=Vector2(0,0);
+
+ for(int i=-1;i<points.size();i++) {
+
+ Vector2 next;
+ Vector2 next2;
+ if (i+1>=points.size()) {
+ next=Vector2(1,1);
+ } else {
+ next=Vector2(points[i+1].offset,points[i+1].height);
+ }
+
+ if (i+2>=points.size()) {
+ next2=Vector2(1,1);
+ } else {
+ next2=Vector2(points[i+2].offset,points[i+2].height);
+ }
+
+ /*if (i==-1 && prev.offset==next.offset) {
+ prev=next;
+ continue;
+ }*/
+
+ _plot_curve(prev2,prev,next,next2);
+
+ prev2=prev;
+ prev=next;
+ }
+
+ for(int i=0;i<points.size();i++) {
+
+ Color col=i==grabbed?Color(1,0.0,0.0,0.9):Color(1,1,1,0.8);
+
+
+ draw_rect(Rect2( Vector2(points[i].offset,1.0-points[i].height)*get_size()-Vector2(2,2),Vector2(5,5)),col);
+ }
+
+/* if (grabbed!=-1) {
+
+ draw_rect(Rect2(total_w+3,0,h,h),points[grabbed].color);
+ }
+*/
+ if (has_focus()) {
+
+ draw_line(Vector2(-1,-1),Vector2(w+1,-1),Color(1,1,1,0.6));
+ draw_line(Vector2(w+1,-1),Vector2(w+1,h+1),Color(1,1,1,0.6));
+ draw_line(Vector2(w+1,h+1),Vector2(-1,h+1),Color(1,1,1,0.6));
+ draw_line(Vector2(-1,-1),Vector2(-1,h+1),Color(1,1,1,0.6));
+ }
+
+ }
+}
+
+Size2 GraphCurveMapEdit::get_minimum_size() const {
+
+ return Vector2(64,64);
+}
+
+
+
+void GraphCurveMapEdit::set_points(const Vector<Vector2>& p_points) {
+
+
+ points.clear();
+ for(int i=0;i<p_points.size();i++) {
+ Point p;
+ p.offset=p_points[i].x;
+ p.height=p_points[i].y;
+ points.push_back(p);
+ }
+
+ points.sort();
+ update();
+}
+
+Vector<Vector2> GraphCurveMapEdit::get_points() const {
+ Vector<Vector2> ret;
+ for(int i=0;i<points.size();i++)
+ ret.push_back(Vector2(points[i].offset,points[i].height));
+ return ret;
+}
+
+void GraphCurveMapEdit::_bind_methods(){
+
+ ObjectTypeDB::bind_method(_MD("_input_event"),&GraphCurveMapEdit::_input_event);
+ ADD_SIGNAL(MethodInfo("curve_changed"));
+}
+
+GraphCurveMapEdit::GraphCurveMapEdit(){
+
+ grabbed=-1;
+ grabbing=false;
+ set_focus_mode(FOCUS_ALL);
+
+}
+
////cbacks
///
@@ -200,7 +836,7 @@ void ShaderGraphView::_vec_input_changed(double p_value, int p_id,Array p_arr){
}
void ShaderGraphView::_xform_input_changed(int p_id, Node *p_button){
- print_line("XFIC");
+
ToolButton *tb = p_button->cast_to<ToolButton>();
ped_popup->set_pos(tb->get_global_pos()+Vector2(0,tb->get_size().height));
ped_popup->set_size(tb->get_size());
@@ -306,6 +942,84 @@ void ShaderGraphView::_comment_edited(int p_id,Node* p_button) {
}
+void ShaderGraphView::_color_ramp_changed(int p_id,Node* p_ramp) {
+
+ GraphColorRampEdit *cr=p_ramp->cast_to<GraphColorRampEdit>();
+
+ UndoRedo *ur=EditorNode::get_singleton()->get_undo_redo();
+
+
+ Vector<float> offsets=cr->get_offsets();
+ Vector<Color> colors=cr->get_colors();
+
+ DVector<float> new_offsets;
+ DVector<Color> new_colors;
+ {
+ new_offsets.resize(offsets.size());
+ new_colors.resize(colors.size());
+ DVector<float>::Write ow=new_offsets.write();
+ DVector<Color>::Write cw=new_colors.write();
+ for(int i=0;i<new_offsets.size();i++) {
+ ow[i]=offsets[i];
+ cw[i]=colors[i];
+ }
+
+ }
+
+
+ DVector<float> old_offsets=graph->color_ramp_node_get_offsets(type,p_id);
+ DVector<Color> old_colors=graph->color_ramp_node_get_colors(type,p_id);
+
+ if (old_offsets.size()!=new_offsets.size())
+ ur->create_action("Add/Remove to Color Ramp");
+ else
+ ur->create_action("Modify Color Ramp",true);
+
+ ur->add_do_method(graph.ptr(),"color_ramp_node_set_ramp",type,p_id,new_colors,new_offsets);
+ ur->add_undo_method(graph.ptr(),"color_ramp_node_set_ramp",type,p_id,old_colors,old_offsets);
+ ur->add_do_method(this,"_update_graph");
+ ur->add_undo_method(this,"_update_graph");
+ block_update=true;
+ ur->commit_action();
+ block_update=false;
+}
+
+void ShaderGraphView::_curve_changed(int p_id,Node* p_curve) {
+
+ GraphCurveMapEdit *cr=p_curve->cast_to<GraphCurveMapEdit>();
+
+ UndoRedo *ur=EditorNode::get_singleton()->get_undo_redo();
+
+
+ Vector<Point2> points=cr->get_points();
+
+ DVector<Vector2> new_points;
+ {
+ new_points.resize(points.size());
+ DVector<Vector2>::Write ow=new_points.write();
+ for(int i=0;i<new_points.size();i++) {
+ ow[i]=points[i];
+ }
+
+ }
+
+
+ DVector<Vector2> old_points=graph->curve_map_node_get_points(type,p_id);
+
+ if (old_points.size()!=new_points.size())
+ ur->create_action("Add/Remove to Curve Map");
+ else
+ ur->create_action("Modify Curve Map",true);
+
+ ur->add_do_method(graph.ptr(),"curve_map_node_set_points",type,p_id,new_points);
+ ur->add_undo_method(graph.ptr(),"curve_map_node_set_points",type,p_id,old_points);
+ ur->add_do_method(this,"_update_graph");
+ ur->add_undo_method(this,"_update_graph");
+ block_update=true;
+ ur->commit_action();
+ block_update=false;
+}
+
void ShaderGraphView::_input_name_changed(const String& p_name, int p_id, Node *p_line_edit) {
@@ -385,6 +1099,41 @@ void ShaderGraphView::_connection_request(const String& p_from, int p_from_slot,
}
+void ShaderGraphView::_disconnection_request(const String& p_from, int p_from_slot,const String& p_to,int p_to_slot) {
+
+ UndoRedo *ur=EditorNode::get_singleton()->get_undo_redo();
+
+ int from_idx=-1;
+ int to_idx=-1;
+ for (Map<int,GraphNode*>::Element *E=node_map.front();E;E=E->next()) {
+
+ if (p_from==E->get()->get_name())
+ from_idx=E->key();
+ if (p_to==E->get()->get_name())
+ to_idx=E->key();
+ }
+
+ ERR_FAIL_COND(from_idx==-1);
+ ERR_FAIL_COND(to_idx==-1);
+
+ if (!graph->is_node_connected(type,from_idx,p_from_slot,to_idx,p_to_slot))
+ return; //nothing to disconnect
+
+ ur->create_action("Disconnect Graph Nodes");
+
+ List<ShaderGraph::Connection> conns;
+
+ graph->get_node_connections(type,&conns);
+ //disconnect/reconnect dependencies
+ ur->add_do_method(graph.ptr(),"disconnect_node",type,from_idx,p_from_slot,to_idx,p_to_slot);
+ ur->add_undo_method(graph.ptr(),"connect_node",type,from_idx,p_from_slot,to_idx,p_to_slot);
+ ur->add_do_method(this,"_update_graph");
+ ur->add_undo_method(this,"_update_graph");
+ ur->commit_action();
+
+
+}
+
void ShaderGraphView::_node_removed(int p_id) {
UndoRedo *ur=EditorNode::get_singleton()->get_undo_redo();
@@ -410,7 +1159,7 @@ void ShaderGraphView::_node_removed(int p_id) {
void ShaderGraphView::_node_moved(const Vector2& p_from, const Vector2& p_to,int p_id) {
- print_line("moved from "+p_from+" to "+p_to);
+
ERR_FAIL_COND(!node_map.has(p_id));
UndoRedo *ur=EditorNode::get_singleton()->get_undo_redo();
ur->create_action("Move Shader Graph Node");
@@ -433,8 +1182,8 @@ void ShaderGraphView::_create_node(int p_id) {
GraphNode *gn = memnew( GraphNode );
gn->set_show_close_button(true);
Color typecol[4]={
- Color(0.2,1,0.2),
- Color(0.7,0.1,1),
+ Color(0.9,0.4,1),
+ Color(0.8,1,0.2),
Color(1,0.2,0.2),
Color(0,1,1)
};
@@ -710,14 +1459,9 @@ void ShaderGraphView::_create_node(int p_id) {
} break; // mat4 x mat4
- case ShaderGraph::NODE_XFORM_VEC_MULT:
- case ShaderGraph::NODE_XFORM_VEC_INV_MULT: {
-
- if (graph->node_get_type(type,p_id)==ShaderGraph::NODE_XFORM_VEC_INV_MULT)
- gn->set_title("XFVecMult");
- else
- gn->set_title("XFVecInvMult");
+ case ShaderGraph::NODE_XFORM_VEC_MULT: {
+ gn->set_title("XFVecMult");
Button *button = memnew( Button("RotOnly"));
button->set_toggle_mode(true);
@@ -739,6 +1483,32 @@ void ShaderGraphView::_create_node(int p_id) {
gn->set_slot(1,true,ShaderGraph::SLOT_TYPE_XFORM,typecol[ShaderGraph::SLOT_TYPE_XFORM],true,ShaderGraph::SLOT_TYPE_VEC,typecol[ShaderGraph::SLOT_TYPE_VEC]);
gn->set_slot(2,true,ShaderGraph::SLOT_TYPE_VEC,typecol[ShaderGraph::SLOT_TYPE_VEC],false,0,Color());
+ } break;
+ case ShaderGraph::NODE_XFORM_VEC_INV_MULT: {
+
+ gn->set_title("XFVecInvMult");
+
+
+ Button *button = memnew( Button("RotOnly"));
+ button->set_toggle_mode(true);
+ button->set_pressed(graph->xform_vec_mult_node_get_no_translation(type,p_id));
+ button->connect("toggled",this,"_xform_inv_rev_changed",varray(p_id));
+
+ gn->add_child(button);
+
+ gn->add_child( memnew(Label("vec")));
+ HBoxContainer *hbc = memnew( HBoxContainer );
+ hbc->add_constant_override("separation",0);
+ hbc->add_child( memnew(Label("xf")));
+ hbc->add_spacer();
+ Label *l = memnew(Label("out"));
+ l->set_align(Label::ALIGN_RIGHT);
+ hbc->add_child( l);
+ gn->add_child(hbc);
+
+ gn->set_slot(1,true,ShaderGraph::SLOT_TYPE_VEC,typecol[ShaderGraph::SLOT_TYPE_VEC],false,0,Color());
+ gn->set_slot(2,true,ShaderGraph::SLOT_TYPE_XFORM,typecol[ShaderGraph::SLOT_TYPE_XFORM],true,ShaderGraph::SLOT_TYPE_VEC,typecol[ShaderGraph::SLOT_TYPE_VEC]);
+
} break; // mat4 x vec3 inverse mult (with no-translation option)
case ShaderGraph::NODE_SCALAR_FUNC: {
@@ -967,9 +1737,99 @@ void ShaderGraphView::_create_node(int p_id) {
gn->set_slot(0,true,ShaderGraph::SLOT_TYPE_VEC,typecol[ShaderGraph::SLOT_TYPE_VEC],true,ShaderGraph::SLOT_TYPE_VEC,typecol[ShaderGraph::SLOT_TYPE_VEC]);
gn->set_slot(1,true,ShaderGraph::SLOT_TYPE_VEC,typecol[ShaderGraph::SLOT_TYPE_VEC],false,0,Color());
- gn->set_slot(2,true,ShaderGraph::SLOT_TYPE_VEC,typecol[ShaderGraph::SLOT_TYPE_VEC],false,0,Color());
+ gn->set_slot(2,true,ShaderGraph::SLOT_TYPE_SCALAR,typecol[ShaderGraph::SLOT_TYPE_SCALAR],false,0,Color());
} break; // vec3 interpolation (with optional curve)
+ case ShaderGraph::NODE_COLOR_RAMP: {
+
+ gn->set_title("ColorRamp");
+ GraphColorRampEdit * ramp = memnew( GraphColorRampEdit );
+
+ DVector<real_t> offsets = graph->color_ramp_node_get_offsets(type,p_id);
+ DVector<Color> colors = graph->color_ramp_node_get_colors(type,p_id);
+
+ int oc = offsets.size();
+
+ if (oc) {
+ DVector<real_t>::Read rofs = offsets.read();
+ DVector<Color>::Read rcol = colors.read();
+
+ Vector<float> ofsv;
+ Vector<Color> colorv;
+ for(int i=0;i<oc;i++) {
+ ofsv.push_back(rofs[i]);
+ colorv.push_back(rcol[i]);
+ }
+
+ ramp->set_ramp(ofsv,colorv);
+
+ }
+
+ ramp->connect("ramp_changed",this,"_color_ramp_changed",varray(p_id,ramp));
+ ramp->set_custom_minimum_size(Size2(128,1));
+ gn->add_child(ramp);
+
+
+ HBoxContainer *hbc = memnew( HBoxContainer );
+ hbc->add_constant_override("separation",0);
+ hbc->add_child( memnew(Label("c")));
+ hbc->add_spacer();
+ Label *l=memnew(Label("rgb"));
+ l->set_align(Label::ALIGN_RIGHT);
+ hbc->add_child( l);
+ gn->add_child(hbc);
+ l=memnew(Label("alpha"));
+ l->set_align(Label::ALIGN_RIGHT);
+ gn->add_child( l);
+
+
+ gn->set_slot(1,true,ShaderGraph::SLOT_TYPE_SCALAR,typecol[ShaderGraph::SLOT_TYPE_SCALAR],true,ShaderGraph::SLOT_TYPE_VEC,typecol[ShaderGraph::SLOT_TYPE_VEC]);
+ gn->set_slot(2,false,ShaderGraph::SLOT_MAX,Color(),true,ShaderGraph::SLOT_TYPE_SCALAR,typecol[ShaderGraph::SLOT_TYPE_SCALAR]);
+
+
+ } break; // scalar interpolation (with optional curve)
+ case ShaderGraph::NODE_CURVE_MAP: {
+
+ gn->set_title("CurveMap");
+ GraphCurveMapEdit * map = memnew( GraphCurveMapEdit );
+
+ DVector<Vector2> points = graph->curve_map_node_get_points(type,p_id);
+
+ int oc = points.size();
+
+ if (oc) {
+ DVector<Vector2>::Read rofs = points.read();
+
+
+ Vector<Vector2> ofsv;
+ for(int i=0;i<oc;i++) {
+ ofsv.push_back(rofs[i]);
+ }
+
+ map->set_points(ofsv);
+
+ }
+ map->connect("curve_changed",this,"_curve_changed",varray(p_id,map));
+
+ //map->connect("map_changed",this,"_curve_map_changed",varray(p_id,map));
+ map->set_custom_minimum_size(Size2(128,64));
+ gn->add_child(map);
+
+ HBoxContainer *hbc = memnew( HBoxContainer );
+ hbc->add_constant_override("separation",0);
+ hbc->add_child( memnew(Label("c")));
+ hbc->add_spacer();
+ Label *l=memnew(Label("cmap"));
+ l->set_align(Label::ALIGN_RIGHT);
+ hbc->add_child( l);
+ gn->add_child(hbc);
+
+
+ gn->set_slot(1,true,ShaderGraph::SLOT_TYPE_SCALAR,typecol[ShaderGraph::SLOT_TYPE_SCALAR],true,ShaderGraph::SLOT_TYPE_SCALAR,typecol[ShaderGraph::SLOT_TYPE_SCALAR]);
+
+
+ } break; // scalar interpolation (with optional curve)
+
case ShaderGraph::NODE_SCALAR_INPUT: {
gn->set_title("ScalarUniform");
@@ -1117,6 +1977,28 @@ void ShaderGraphView::_create_node(int p_id) {
gn->set_slot(3,false,0,Color(),true,ShaderGraph::SLOT_TYPE_SCALAR,typecol[ShaderGraph::SLOT_TYPE_SCALAR]);
} break; // cubemap input (assignable in material)
+ case ShaderGraph::NODE_DEFAULT_TEXTURE: {
+
+ gn->set_title("CanvasItemTex");
+ HBoxContainer *hbc = memnew( HBoxContainer );
+ hbc->add_constant_override("separation",0);
+ hbc->add_child( memnew(Label("UV")));
+ hbc->add_spacer();
+ Label *l=memnew(Label("RGB"));
+ l->set_align(Label::ALIGN_RIGHT);
+ hbc->add_child(l);
+ gn->add_child(hbc);
+ l = memnew( Label );
+ l->set_text("Alpha");
+ l->set_align(Label::ALIGN_RIGHT);
+ gn->add_child(l);
+
+ gn->set_slot(0,true,ShaderGraph::SLOT_TYPE_VEC,typecol[ShaderGraph::SLOT_TYPE_VEC],true,ShaderGraph::SLOT_TYPE_VEC,typecol[ShaderGraph::SLOT_TYPE_VEC]);
+ gn->set_slot(1,false,0,Color(),true,ShaderGraph::SLOT_TYPE_SCALAR,typecol[ShaderGraph::SLOT_TYPE_SCALAR]);
+
+
+ } break; // screen texture sampler (takes UV) (only usable in fragment case Shader)
+
case ShaderGraph::NODE_OUTPUT: {
gn->set_title("Output");
@@ -1157,7 +2039,7 @@ void ShaderGraphView::_create_node(int p_id) {
graph_edit->add_child(gn);
node_map[p_id]=gn;
gn->set_offset(graph->node_get_pos(type,p_id));
- print_line("NODE "+itos(p_id)+" OFS "+gn->get_offset());
+
}
@@ -1180,7 +2062,7 @@ void ShaderGraphView::_update_graph() {
List<int> nl;
graph->get_node_list(type,&nl);
- print_line("graph nodes: "+itos(nl.size()));
+
for(List<int>::Element *E=nl.front();E;E=E->next()) {
_create_node(E->get());
@@ -1199,11 +2081,29 @@ void ShaderGraphView::_update_graph() {
}
+void ShaderGraphView::_sg_updated() {
+
+ if (!graph.is_valid())
+ return;
+ switch(graph->get_graph_error(type)) {
+ case ShaderGraph::GRAPH_OK: status->set_text(""); break;
+ case ShaderGraph::GRAPH_ERROR_CYCLIC: status->set_text("Error: Cyclic Connection Link"); break;
+ case ShaderGraph::GRAPH_ERROR_MISSING_CONNECTIONS: status->set_text("Error: Missing Input Connections"); break;
+ }
+}
+
void ShaderGraphView::set_graph(Ref<ShaderGraph> p_graph){
- print_line("GRAPH EDIT: "+itos(p_graph.is_valid()));
+
+ if (graph.is_valid()) {
+ graph->disconnect("updated",this,"_sg_updated");
+ }
graph=p_graph;
+ if (graph.is_valid()) {
+ graph->connect("updated",this,"_sg_updated");
+ }
_update_graph();
+ _sg_updated();
}
@@ -1262,6 +2162,7 @@ void ShaderGraphView::_bind_methods() {
ObjectTypeDB::bind_method("_move_node",&ShaderGraphView::_move_node);
ObjectTypeDB::bind_method("_node_removed",&ShaderGraphView::_node_removed);
ObjectTypeDB::bind_method("_connection_request",&ShaderGraphView::_connection_request);
+ ObjectTypeDB::bind_method("_disconnection_request",&ShaderGraphView::_disconnection_request);
ObjectTypeDB::bind_method("_scalar_const_changed",&ShaderGraphView::_scalar_const_changed);
ObjectTypeDB::bind_method("_vec_const_changed",&ShaderGraphView::_vec_const_changed);
@@ -1285,7 +2186,10 @@ void ShaderGraphView::_bind_methods() {
ObjectTypeDB::bind_method("_variant_edited",&ShaderGraphView::_variant_edited);
ObjectTypeDB::bind_method("_cube_edited",&ShaderGraphView::_cube_edited);
ObjectTypeDB::bind_method("_comment_edited",&ShaderGraphView::_comment_edited);
+ ObjectTypeDB::bind_method("_color_ramp_changed",&ShaderGraphView::_color_ramp_changed);
+ ObjectTypeDB::bind_method("_curve_changed",&ShaderGraphView::_curve_changed);
+ ObjectTypeDB::bind_method("_sg_updated",&ShaderGraphView::_sg_updated);
}
ShaderGraphView::ShaderGraphView(ShaderGraph::ShaderType p_type) {
@@ -1295,8 +2199,15 @@ ShaderGraphView::ShaderGraphView(ShaderGraph::ShaderType p_type) {
block_update=false;
ped_popup = memnew( CustomPropertyEditor );
graph_edit->add_child(ped_popup);
-
-
+ status = memnew( Label );
+ graph_edit->get_top_layer()->add_child(status);
+ status->set_pos(Vector2(5,5));
+ status->add_color_override("font_color_shadow",Color(0,0,0));
+ status->add_color_override("font_color",Color(1,0.4,0.3));
+ status->add_constant_override("shadow_as_outline",1);
+ status->add_constant_override("shadow_offset_x",2);
+ status->add_constant_override("shadow_offset_y",2);
+ status->set_text("");
}
@@ -1318,6 +2229,25 @@ void ShaderGraphEditor::_add_node(int p_type) {
void ShaderGraphEditor::_notification(int p_what) {
if (p_what==NOTIFICATION_ENTER_TREE) {
+
+ for(int i=0;i<ShaderGraph::NODE_TYPE_MAX;i++) {
+
+ if (i==ShaderGraph::NODE_OUTPUT)
+ continue;
+ if (!_2d && i==ShaderGraph::NODE_DEFAULT_TEXTURE)
+ continue;
+
+ String nn = node_names[i];
+ String ic = nn.get_slice(":",0);
+ String v = nn.get_slice(":",1);
+ bool addsep=false;
+ if (nn.ends_with(":")) {
+ addsep=true;
+ }
+ menu->get_popup()->add_icon_item(get_icon(ic,"EditorIcons"),v,i);
+ if (addsep)
+ menu->get_popup()->add_separator();
+ }
menu->get_popup()->connect("item_pressed",this,"_add_node");
@@ -1332,62 +2262,53 @@ void ShaderGraphEditor::_bind_methods() {
const char* ShaderGraphEditor::node_names[ShaderGraph::NODE_TYPE_MAX]={
- "Input", // all inputs (shader type dependent)
- "Scalar Constant", //scalar constant
- "Vector Constant", //vec3 constant
- "RGB Constant", //rgb constant (shows a color picker instead)
- "XForm Constant", // 4x4 matrix constant
- "Time:", // time in seconds
- "Screen Sample", // screen texture sampler (takes uv) (only usable in fragment shader)
- "Scalar Operator", // scalar vs scalar op (mul", add", div", etc)
- "Vector Operator", // vec3 vs vec3 op (mul",ad",div",crossprod",etc)
- "Scalar+Vector Operator", // vec3 vs scalar op (mul", add", div", etc)
- "RGB Operator:", // vec3 vs vec3 rgb op (with scalar amount)", like brighten", darken", burn", dodge", multiply", etc.
- "XForm Multiply", // mat4 x mat4
- "XForm+Vector Multiply", // mat4 x vec3 mult (with no-translation option)
- "XForm+Vector InvMultiply:", // mat4 x vec3 inverse mult (with no-translation option)
- "Scalar Function", // scalar function (sin", cos", etc)
- "Vector Function", // vector function (normalize", negate", reciprocal", rgb2hsv", hsv2rgb", etc", etc)
- "Vector Length", // vec3 length
- "Dot Product:", // vec3 . vec3 (dot product -> scalar output)
- "Vector -> Scalars", // 1 vec3 input", 3 scalar outputs
- "Scalars -> Vector", // 3 scalar input", 1 vec3 output
- "XForm -> Vectors", // 3 vec input", 1 xform output
- "Vectors -> XForm:", // 3 vec input", 1 xform output
- "Scalar Interpolate", // scalar interpolation (with optional curve)
- "Vector Interpolate:", // vec3 interpolation (with optional curve)
- "Scalar Uniform", // scalar uniform (assignable in material)
- "Vector Uniform", // vec3 uniform (assignable in material)
- "RGB Uniform", // color uniform (assignable in material)
- "XForm Uniform", // mat4 uniform (assignable in material)
- "Texture Uniform", // texture input (assignable in material)
- "CubeMap Uniform:", // cubemap input (assignable in material)
- "Output", // output (shader type dependent)
- "Comment", // comment
+ "GraphInput:Input", // all inputs (shader type dependent)
+ "GraphScalar:Scalar Constant", //scalar constant
+ "GraphVector:Vector Constant", //vec3 constant
+ "GraphRgb:RGB Constant", //rgb constant (shows a color picker instead)
+ "GraphXform:XForm Constant", // 4x4 matrix constant
+ "GraphTime:Time:", // time in seconds
+ "GraphTexscreen:Screen Sample", // screen texture sampler (takes uv) (only usable in fragment shader)
+ "GraphScalarOp:Scalar Operator", // scalar vs scalar op (mul", add", div", etc)
+ "GraphVecOp:Vector Operator", // vec3 vs vec3 op (mul",ad",div",crossprod",etc)
+ "GraphVecScalarOp:Scalar+Vector Operator", // vec3 vs scalar op (mul", add", div", etc)
+ "GraphRgbOp:RGB Operator:", // vec3 vs vec3 rgb op (with scalar amount)", like brighten", darken", burn", dodge", multiply", etc.
+ "GraphXformMult:XForm Multiply", // mat4 x mat4
+ "GraphXformVecMult:XForm+Vector Multiply", // mat4 x vec3 mult (with no-translation option)
+ "GraphXformVecImult:Form+Vector InvMultiply:", // mat4 x vec3 inverse mult (with no-translation option)
+ "GraphXformScalarFunc:Scalar Function", // scalar function (sin", cos", etc)
+ "GraphXformVecFunc:Vector Function", // vector function (normalize", negate", reciprocal", rgb2hsv", hsv2rgb", etc", etc)
+ "GraphVecLength:Vector Length", // vec3 length
+ "GraphVecDp:Dot Product:", // vec3 . vec3 (dot product -> scalar output)
+ "GraphVecToScalars:Vector -> Scalars", // 1 vec3 input", 3 scalar outputs
+ "GraphScalarsToVec:Scalars -> Vector", // 3 scalar input", 1 vec3 output
+ "GraphXformToVecs:XForm -> Vectors", // 3 vec input", 1 xform output
+ "GraphVecsToXform:Vectors -> XForm:", // 3 vec input", 1 xform output
+ "GraphScalarInterp:Scalar Interpolate", // scalar interpolation (with optional curve)
+ "GraphVecInterp:Vector Interpolate:", // vec3 interpolation (with optional curve)
+ "GraphColorRamp:Color Ramp", // vec3 interpolation (with optional curve)
+ "GraphCurveMap:Curve Remap:", // vec3 interpolation (with optional curve)
+ "GraphScalarUniform:Scalar Uniform", // scalar uniform (assignable in material)
+ "GraphVectorUniform:Vector Uniform", // vec3 uniform (assignable in material)
+ "GraphRgbUniform:RGB Uniform", // color uniform (assignable in material)
+ "GraphXformUniform:XForm Uniform", // mat4 uniform (assignable in material)
+ "GraphTextureUniform:Texture Uniform", // texture input (assignable in material)
+ "GraphCubeUniform:CubeMap Uniform:", // cubemap input (assignable in material)
+ "GraphDefaultTexture:CanvasItem Texture:", // cubemap input (assignable in material)
+ "Output", // output (shader type dependent)
+ "GraphComment:Comment", // comment
};
-ShaderGraphEditor::ShaderGraphEditor() {
+ShaderGraphEditor::ShaderGraphEditor(bool p_2d) {
+ _2d=p_2d;
HBoxContainer *hbc = memnew( HBoxContainer );
menu = memnew( MenuButton );
- menu->set_text("Add..");
+ menu->set_text("Add Node..");
hbc->add_child(menu);
add_child(hbc);
- for(int i=0;i<ShaderGraph::NODE_TYPE_MAX;i++) {
-
- if (i==ShaderGraph::NODE_OUTPUT)
- continue;
- String v = node_names[i];
- bool addsep=false;
- if (v.ends_with(":")) {
- addsep=true;
- v=v.substr(0,v.length()-1);
- }
- menu->get_popup()->add_item(v,i);
- if (addsep)
- menu->get_popup()->add_separator();
- }
+
tabs = memnew(TabContainer);
tabs->set_v_size_flags(SIZE_EXPAND_FILL);
@@ -1404,8 +2325,13 @@ ShaderGraphEditor::ShaderGraphEditor() {
graph_edits[i]->get_graph_edit()->set_name(sname[i]);
tabs->add_child(graph_edits[i]->get_graph_edit());
graph_edits[i]->get_graph_edit()->connect("connection_request",graph_edits[i],"_connection_request");
+ graph_edits[i]->get_graph_edit()->connect("disconnection_request",graph_edits[i],"_disconnection_request");
+ graph_edits[i]->get_graph_edit()->set_right_disconnects(true);
+
}
+ tabs->set_current_tab(1);
+
set_custom_minimum_size(Size2(100,300));
}
@@ -1417,7 +2343,13 @@ void ShaderGraphEditorPlugin::edit(Object *p_object) {
bool ShaderGraphEditorPlugin::handles(Object *p_object) const {
- return p_object->is_type("ShaderGraph");
+ ShaderGraph *shader=p_object->cast_to<ShaderGraph>();
+ if (!shader)
+ return false;
+ if (_2d)
+ return shader->get_mode()==Shader::MODE_CANVAS_ITEM;
+ else
+ return shader->get_mode()==Shader::MODE_MATERIAL;
}
void ShaderGraphEditorPlugin::make_visible(bool p_visible) {
@@ -1431,12 +2363,16 @@ void ShaderGraphEditorPlugin::make_visible(bool p_visible) {
}
-ShaderGraphEditorPlugin::ShaderGraphEditorPlugin(EditorNode *p_node) {
+ShaderGraphEditorPlugin::ShaderGraphEditorPlugin(EditorNode *p_node, bool p_2d) {
+ _2d=p_2d;
editor=p_node;
- shader_editor = memnew( ShaderGraphEditor );
+ shader_editor = memnew( ShaderGraphEditor(p_2d) );
shader_editor->hide();
- SpatialEditor::get_singleton()->get_shader_split()->add_child(shader_editor);
+ if (p_2d)
+ CanvasItemEditor::get_singleton()->get_bottom_split()->add_child(shader_editor);
+ else
+ SpatialEditor::get_singleton()->get_shader_split()->add_child(shader_editor);
// editor->get_viewport()->add_child(shader_editor);
diff --git a/tools/editor/plugins/shader_graph_editor_plugin.h b/tools/editor/plugins/shader_graph_editor_plugin.h
index 26dbd1ac6e..1726302e90 100644
--- a/tools/editor/plugins/shader_graph_editor_plugin.h
+++ b/tools/editor/plugins/shader_graph_editor_plugin.h
@@ -45,6 +45,77 @@
*/
+class GraphColorRampEdit : public Control {
+
+ OBJ_TYPE(GraphColorRampEdit,Control);
+
+
+ struct Point {
+
+ float offset;
+ Color color;
+ bool operator<(const Point& p_ponit) const {
+ return offset<p_ponit.offset;
+ }
+ };
+
+ PopupPanel *popup;
+ ColorPicker *picker;
+
+
+ bool grabbing;
+ int grabbed;
+ float grabbed_at;
+ Vector<Point> points;
+
+ void _color_changed(const Color& p_color);
+
+protected:
+ void _input_event(const InputEvent& p_event);
+ void _notification(int p_what);
+ static void _bind_methods();
+public:
+
+ void set_ramp(const Vector<float>& p_offsets,const Vector<Color>& p_colors);
+ Vector<float> get_offsets() const;
+ Vector<Color> get_colors() const;
+ virtual Size2 get_minimum_size() const;
+ GraphColorRampEdit();
+};
+
+
+class GraphCurveMapEdit : public Control {
+
+ OBJ_TYPE(GraphCurveMapEdit,Control);
+
+
+ struct Point {
+
+ float offset;
+ float height;
+ bool operator<(const Point& p_ponit) const {
+ return offset<p_ponit.offset;
+ }
+ };
+
+
+ bool grabbing;
+ int grabbed;
+ Vector<Point> points;
+
+ void _plot_curve(const Vector2& p_a,const Vector2& p_b,const Vector2& p_c,const Vector2& p_d);
+protected:
+ void _input_event(const InputEvent& p_event);
+ void _notification(int p_what);
+ static void _bind_methods();
+public:
+
+ void set_points(const Vector<Vector2>& p_points);
+ Vector<Vector2> get_points() const;
+ virtual Size2 get_minimum_size() const;
+ GraphCurveMapEdit();
+};
+
class ShaderGraphView : public Node {
OBJ_TYPE(ShaderGraphView,Node);
@@ -54,6 +125,7 @@ class ShaderGraphView : public Node {
CustomPropertyEditor *ped_popup;
bool block_update;
+ Label *status;
GraphEdit *graph_edit;
Ref<ShaderGraph> graph;
int edited_id;
@@ -66,6 +138,8 @@ class ShaderGraphView : public Node {
void _connection_request(const String& p_from, int p_from_slot,const String& p_to,int p_to_slot);
+ void _disconnection_request(const String& p_from, int p_from_slot,const String& p_to,int p_to_slot);
+
void _node_removed(int p_id);
void _node_moved(const Vector2& p_from, const Vector2& p_to,int p_id);
void _move_node(int p_id,const Vector2& p_to);
@@ -92,8 +166,9 @@ class ShaderGraphView : public Node {
void _cube_edited(int p_id,Node* p_button);
void _variant_edited();
void _comment_edited(int p_id,Node* p_button);
-
-
+ void _color_ramp_changed(int p_id,Node* p_ramp);
+ void _curve_changed(int p_id,Node* p_curve);
+ void _sg_updated();
Map<int,GraphNode*> node_map;
protected:
void _notification(int p_what);
@@ -116,6 +191,7 @@ class ShaderGraphEditor : public VBoxContainer {
ShaderGraphView *graph_edits[ShaderGraph::SHADER_TYPE_MAX];
static const char* node_names[ShaderGraph::NODE_TYPE_MAX];
+ bool _2d;
void _add_node(int p_type);
protected:
void _notification(int p_what);
@@ -123,13 +199,14 @@ protected:
public:
void edit(Ref<ShaderGraph> p_shader);
- ShaderGraphEditor();
+ ShaderGraphEditor(bool p_2d);
};
class ShaderGraphEditorPlugin : public EditorPlugin {
OBJ_TYPE( ShaderGraphEditorPlugin, EditorPlugin );
+ bool _2d;
ShaderGraphEditor *shader_editor;
EditorNode *editor;
@@ -141,7 +218,7 @@ public:
virtual bool handles(Object *p_node) const;
virtual void make_visible(bool p_visible);
- ShaderGraphEditorPlugin(EditorNode *p_node);
+ ShaderGraphEditorPlugin(EditorNode *p_node,bool p_2d);
~ShaderGraphEditorPlugin();
};
diff --git a/tools/editor/plugins/tile_map_editor_plugin.cpp b/tools/editor/plugins/tile_map_editor_plugin.cpp
index a7e6a0d1f9..ce5ea58124 100644
--- a/tools/editor/plugins/tile_map_editor_plugin.cpp
+++ b/tools/editor/plugins/tile_map_editor_plugin.cpp
@@ -73,6 +73,18 @@ int TileMapEditor::get_selected_tile() const {
return item->get_metadata(0);
}
+void TileMapEditor::set_selected_tile(int p_tile) {
+ TreeItem *item = palette->get_root()->get_children();
+ while (item) {
+ if ((int)item->get_metadata(0) == p_tile) {
+ item->select(0);
+ palette->ensure_cursor_is_visible();
+ break;
+ }
+ item = item->get_next();
+ }
+}
+
void TileMapEditor::_set_cell(const Point2i& p_pos,int p_value,bool p_flip_h, bool p_flip_v,bool p_with_undo) {
ERR_FAIL_COND(!node);
@@ -224,28 +236,25 @@ bool TileMapEditor::forward_input_event(const InputEvent& p_event) {
canvas_item_editor->update();
return true;
+ } else if (mb.mod.control) {
+ tool=TOOL_PICKING;
+ set_selected_tile(node->get_cell(over_tile.x, over_tile.y));
+ canvas_item_editor->update();
+ return true;
} else {
int id = get_selected_tile();
if (id!=TileMap::INVALID_CELL) {
tool=TOOL_PAINTING;
Point2i local =node->world_to_map((xform_inv.xform(Point2(mb.x,mb.y))));
paint_undo.clear();
- CellOp op;
- op.idx = node->get_cell(local.x,local.y);
- if (op.idx>=0) {
- if (node->is_cell_x_flipped(local.x,local.y))
- op.xf=true;
- if (node->is_cell_y_flipped(local.x,local.y))
- op.yf=true;
- }
- paint_undo[local]=op;
+ paint_undo[local]=_get_op_from_cell(local);
node->set_cell(local.x,local.y,id,mirror_x->is_pressed(),mirror_y->is_pressed());
return true;
}
}
} else {
- if (tool==TOOL_PAINTING || tool == TOOL_SELECTING) {
+ if (tool==TOOL_PAINTING || tool == TOOL_SELECTING || tool == TOOL_PICKING) {
if (tool==TOOL_PAINTING) {
@@ -279,15 +288,7 @@ bool TileMapEditor::forward_input_event(const InputEvent& p_event) {
tool=TOOL_ERASING;
Point2i local =node->world_to_map(xform_inv.xform(Point2(mb.x,mb.y)));
paint_undo.clear();
- CellOp op;
- op.idx = node->get_cell(local.x,local.y);
- if (op.idx>=0) {
- if (node->is_cell_x_flipped(local.x,local.y))
- op.xf=true;
- if (node->is_cell_y_flipped(local.x,local.y))
- op.yf=true;
- }
- paint_undo[local]=op;
+ paint_undo[local]=_get_op_from_cell(local);
//node->set_cell(local.x,local.y,id,mirror_x->is_pressed(),mirror_y->is_pressed());
//return true;
_set_cell(local,TileMap::INVALID_CELL);
@@ -337,15 +338,7 @@ bool TileMapEditor::forward_input_event(const InputEvent& p_event) {
if (!paint_undo.has(over_tile)) {
- CellOp op;
- op.idx = node->get_cell(over_tile.x,over_tile.y);
- if (op.idx>=0) {
- if (node->is_cell_x_flipped(over_tile.x,over_tile.y))
- op.xf=true;
- if (node->is_cell_y_flipped(over_tile.x,over_tile.y))
- op.yf=true;
- }
- paint_undo[over_tile]=op;
+ paint_undo[over_tile]=_get_op_from_cell(over_tile);
}
node->set_cell(over_tile.x,over_tile.y,id,mirror_x->is_pressed(),mirror_y->is_pressed());
@@ -374,25 +367,22 @@ bool TileMapEditor::forward_input_event(const InputEvent& p_event) {
return true;
}
+
if (tool==TOOL_ERASING) {
Point2i local =over_tile;
if (!paint_undo.has(over_tile)) {
-
- CellOp op;
- op.idx = node->get_cell(over_tile.x,over_tile.y);
- if (op.idx>=0) {
- if (node->is_cell_x_flipped(over_tile.x,over_tile.y))
- op.xf=true;
- if (node->is_cell_y_flipped(over_tile.x,over_tile.y))
- op.yf=true;
- }
- paint_undo[over_tile]=op;
+ paint_undo[over_tile]=_get_op_from_cell(over_tile);
}
//node->set_cell(over_tile.x,over_tile.y,id,mirror_x->is_pressed(),mirror_y->is_pressed());
_set_cell(local,TileMap::INVALID_CELL);
return true;
}
+ if (tool==TOOL_PICKING) {
+ set_selected_tile(node->get_cell(over_tile.x, over_tile.y));
+ canvas_item_editor->update();
+ return true;
+ }
} break;
case InputEvent::KEY: {
@@ -710,6 +700,19 @@ void TileMapEditor::_bind_methods() {
}
+TileMapEditor::CellOp TileMapEditor::_get_op_from_cell(const Point2i& p_pos)
+{
+ CellOp op;
+ op.idx = node->get_cell(p_pos.x,p_pos.y);
+ if (op.idx>=0) {
+ if (node->is_cell_x_flipped(p_pos.x,p_pos.y))
+ op.xf=true;
+ if (node->is_cell_y_flipped(p_pos.x,p_pos.y))
+ op.yf=true;
+ }
+ return op;
+}
+
TileMapEditor::TileMapEditor(EditorNode *p_editor) {
node=NULL;
diff --git a/tools/editor/plugins/tile_map_editor_plugin.h b/tools/editor/plugins/tile_map_editor_plugin.h
index ef869591bd..f3c590e228 100644
--- a/tools/editor/plugins/tile_map_editor_plugin.h
+++ b/tools/editor/plugins/tile_map_editor_plugin.h
@@ -51,7 +51,8 @@ class TileMapEditor : public VBoxContainer {
TOOL_PAINTING,
TOOL_SELECTING,
TOOL_ERASING,
- TOOL_DUPLICATING
+ TOOL_DUPLICATING,
+ TOOL_PICKING
};
Tool tool;
@@ -81,11 +82,13 @@ class TileMapEditor : public VBoxContainer {
bool xf;
bool yf;
CellOp() { idx=-1; xf=false; yf=false; }
+ CellOp(const CellOp& p_other) : idx(p_other.idx), xf(p_other.xf), yf(p_other.yf) {}
};
Map<Point2i,CellOp> paint_undo;
int get_selected_tile() const;
+ void set_selected_tile(int p_tile);
void _update_palette();
void _canvas_draw();
@@ -102,6 +105,7 @@ protected:
void _notification(int p_what);
void _node_removed(Node *p_node);
static void _bind_methods();
+ CellOp _get_op_from_cell(const Point2i& p_pos);
public:
HBoxContainer *get_canvas_item_editor_hb() const { return canvas_item_editor_hb; }
diff --git a/tools/editor/project_manager.cpp b/tools/editor/project_manager.cpp
index cf94758ad6..0af4a23547 100644
--- a/tools/editor/project_manager.cpp
+++ b/tools/editor/project_manager.cpp
@@ -65,7 +65,7 @@ class NewProjectDialog : public ConfirmationDialog {
error->set_text("");
get_ok()->set_disabled(true);
DirAccess *d = DirAccess::create(DirAccess::ACCESS_FILESYSTEM);
- if (d->change_dir(project_path->get_text())!=OK) {
+ if (project_path->get_text() != "" && d->change_dir(project_path->get_text())!=OK) {
error->set_text("Invalid Path for Project, Path Must Exist!");
memdelete(d);
return false;
@@ -82,7 +82,7 @@ class NewProjectDialog : public ConfirmationDialog {
} else {
- if (!d->file_exists("engine.cfg")) {
+ if (project_path->get_text() != "" && !d->file_exists("engine.cfg")) {
error->set_text("Invalid Project Path (engine.cfg must exist).");
memdelete(d);
diff --git a/tools/editor/scene_tree_dock.cpp b/tools/editor/scene_tree_dock.cpp
index f5d9e83bf8..cff3913579 100644
--- a/tools/editor/scene_tree_dock.cpp
+++ b/tools/editor/scene_tree_dock.cpp
@@ -100,6 +100,16 @@ Node* SceneTreeDock::instance(const String& p_file) {
}
+static String _get_name_num_separator() {
+ switch(EditorSettings::get_singleton()->get("scenetree_editor/duplicate_node_name_num_separator").operator int()) {
+ case 0: return "";
+ case 1: return " ";
+ case 2: return "_";
+ case 3: return "-";
+ }
+ return " ";
+}
+
void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
current_option=p_tool;
@@ -318,17 +328,21 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
}
int num=nums.to_int();
- if (num<2)
- num=2;
+ if (num<1)
+ num=1;
else
num++;
- name=name.substr(0,name.length()-nums.length()).strip_edges();
- String attempt=name+" "+itos(num);
+ String nnsep = _get_name_num_separator();
+ name = name.substr(0,name.length()-nums.length()).strip_edges();
+ if ( name.substr(name.length()-nnsep.length(),nnsep.length()) == nnsep) {
+ name = name.substr(0,name.length()-nnsep.length());
+ }
+ String attempt = (name + nnsep + itos(num)).strip_edges();
while(parent->has_node(attempt)) {
num++;
- attempt=name+" "+itos(num);
+ attempt = (name + nnsep + itos(num)).strip_edges();
}
dup->set_name(attempt);
diff --git a/tools/editor/script_editor_debugger.cpp b/tools/editor/script_editor_debugger.cpp
index 024377ad18..5043c5cdcd 100644
--- a/tools/editor/script_editor_debugger.cpp
+++ b/tools/editor/script_editor_debugger.cpp
@@ -478,8 +478,6 @@ void ScriptEditorDebugger::_notification(int p_what) {
if (!connection->is_connected()) {
stop();
editor->notify_child_process_exited(); //somehow, exited
- msgdialog->set_text("Process being debugged exited.");
- msgdialog->popup_centered(Size2(250,100));
break;
};
diff --git a/tools/export/blender25/godot_export_manager.py b/tools/export/blender25/godot_export_manager.py
new file mode 100644
index 0000000000..31db2c9e94
--- /dev/null
+++ b/tools/export/blender25/godot_export_manager.py
@@ -0,0 +1,474 @@
+# ##### BEGIN GPL LICENSE BLOCK #####
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# ##### END GPL LICENSE BLOCK #####
+
+# Script copyright (c) Andreas Esau
+
+bl_info = {
+ "name": "Godot Export Manager",
+ "author": "Andreas Esau",
+ "version": (1, 0),
+ "blender": (2, 7, 0),
+ "location": "Scene Properties > Godot Export Manager",
+ "description": "Godot Export Manager uses the Better Collada Exporter to manage Export Groups and automatically export the objects groups to Collada Files.",
+ "warning": "",
+ "wiki_url": ("http://www.godotengine.org"),
+ "tracker_url": "",
+ "category": "Import-Export"}
+
+import bpy
+from bpy.props import StringProperty, BoolProperty, EnumProperty, FloatProperty, FloatVectorProperty, IntProperty, CollectionProperty, PointerProperty
+import os
+from bpy.app.handlers import persistent
+from mathutils import Vector, Matrix
+
+class godot_export_manager(bpy.types.Panel):
+ bl_label = "Godot Export Manager"
+ bl_space_type = 'PROPERTIES'
+ bl_region_type = 'WINDOW'
+ bl_context = "scene"
+
+ bpy.types.Scene.godot_export_on_save = BoolProperty(default=False)
+
+ ### draw function for all ui elements
+ def draw(self, context):
+ layout = self.layout
+ split = self.layout.split()
+ scene = bpy.data.scenes[0]
+ ob = context.object
+ scene = context.scene
+
+ row = layout.row()
+ col = row.column()
+ col.prop(scene,"godot_export_on_save",text="Export Groups on save")
+
+ row = layout.row()
+ col = row.column(align=True)
+ op = col.operator("scene.godot_add_objects_to_group",text="Add selected objects to Group",icon="COPYDOWN")
+
+ op = col.operator("scene.godot_delete_objects_from_group",text="Delete selected objects from Group",icon="PASTEDOWN")
+
+
+
+ row = layout.row()
+ col = row.column()
+ col.label(text="Export Groups:")
+
+
+ row = layout.row()
+ col = row.column()
+
+ col.template_list("UI_List_Godot","dummy",scene, "godot_export_groups", scene, "godot_export_groups_index",rows=1,maxrows=10,type='DEFAULT')
+
+ col = row.column(align=True)
+ col.operator("scene.godot_add_export_group",text="",icon="ZOOMIN")
+ col.operator("scene.godot_delete_export_group",text="",icon="ZOOMOUT")
+ col.operator("scene.godot_export_all_groups",text="",icon="EXPORT")
+
+ if len(scene.godot_export_groups) > 0:
+ row = layout.row()
+ col = row.column()
+ group = scene.godot_export_groups[scene.godot_export_groups_index]
+ col.prop(group,"name",text="Group Name")
+ col.prop(group,"export_name",text="Export Name")
+ col.prop(group,"export_path",text="Export Filepath")
+
+ row = layout.row()
+ col = row.column()
+ row = layout.row()
+ col = row.column()
+ col.label(text="Export Settings:")
+
+ col = col.row(align=True)
+ col.prop(group,"apply_loc",toggle=True,icon="MAN_TRANS")
+ col.prop(group,"apply_rot",toggle=True,icon="MAN_ROT")
+ col.prop(group,"apply_scale",toggle=True,icon="MAN_SCALE")
+
+ row = layout.row()
+ col = row.column()
+
+ col.prop(group,"use_include_particle_duplicates")
+ col.prop(group,"use_mesh_modifiers")
+ col.prop(group,"use_tangent_arrays")
+ col.prop(group,"use_triangles")
+ col.prop(group,"use_copy_images")
+ col.prop(group,"use_active_layers")
+ col.prop(group,"use_exclude_ctrl_bones")
+ col.prop(group,"use_anim")
+ col.prop(group,"use_anim_action_all")
+ col.prop(group,"use_anim_skip_noexp")
+ col.prop(group,"use_anim_optimize")
+ col.prop(group,"anim_optimize_precision")
+ col.prop(group,"use_metadata")
+
+### Custom template_list look
+class UI_List_Godot(bpy.types.UIList):
+ def draw_item(self, context, layout, data, item, icon, active_data, active_propname, index):
+ ob = data
+ slot = item
+ col = layout.row(align=True)
+
+ col.label(text=item.name,icon="GROUP")
+ col.prop(item,"active",text="")
+
+ op = col.operator("scene.godot_select_group_objects",text="",emboss=False,icon="RESTRICT_SELECT_OFF")
+ op.idx = index
+ op = col.operator("scene.godot_export_group",text="",emboss=False,icon="EXPORT")
+ op.idx = index
+
+class add_objects_to_group(bpy.types.Operator):
+ bl_idname = "scene.godot_add_objects_to_group"
+ bl_label = "Add Objects to Group"
+ bl_description = "Adds the selected Objects to the active group below."
+
+ undo = BoolProperty(default=True)
+
+ def execute(self,context):
+ scene = context.scene
+
+ objects_str = ""
+ if len(scene.godot_export_groups) > 0:
+ for i,object in enumerate(context.selected_objects):
+ if object.name not in scene.godot_export_groups[scene.godot_export_groups_index].nodes:
+ node = scene.godot_export_groups[scene.godot_export_groups_index].nodes.add()
+ node.name = object.name
+ if i == 0:
+ objects_str += object.name
+ else:
+ objects_str += ", "+object.name
+
+
+ self.report({'INFO'}, objects_str + " added to group." )
+ if self.undo:
+ bpy.ops.ed.undo_push(message="Objects added to group")
+ else:
+ self.report({'WARNING'}, "Create a group first." )
+ return{'FINISHED'}
+
+class del_objects_from_group(bpy.types.Operator):
+ bl_idname = "scene.godot_delete_objects_from_group"
+ bl_label = "Delete Objects from Group"
+ bl_description = "Delets the selected Objects from the active group below."
+
+ def execute(self,context):
+ scene = context.scene
+
+ if len(scene.godot_export_groups) > 0:
+
+ selected_objects = []
+ for object in context.selected_objects:
+ selected_objects.append(object.name)
+
+ objects_str = ""
+ j = 0
+ for i,node in enumerate(scene.godot_export_groups[scene.godot_export_groups_index].nodes):
+ if node.name in selected_objects:
+ scene.godot_export_groups[scene.godot_export_groups_index].nodes.remove(i)
+
+
+ if j == 0:
+ objects_str += object.name
+ else:
+ objects_str += ", "+object.name
+ j+=1
+
+
+ self.report({'INFO'}, objects_str + " deleted from group." )
+ bpy.ops.ed.undo_push(message="Objects deleted from group")
+ else:
+ self.report({'WARNING'}, "There is no group to delete from." )
+ return{'FINISHED'}
+
+class select_group_objects(bpy.types.Operator):
+ bl_idname = "scene.godot_select_group_objects"
+ bl_label = "Select Group Objects"
+ bl_description = "Will select all group Objects in the scene."
+
+ idx = IntProperty()
+
+ def execute(self,context):
+ scene = context.scene
+ for object in context.scene.objects:
+ object.select = False
+ for node in scene.godot_export_groups[self.idx].nodes:
+ if node.name in bpy.data.objects:
+ bpy.data.objects[node.name].select = True
+ context.scene.objects.active = bpy.data.objects[node.name]
+ return{'FINISHED'}
+
+class export_groups_autosave(bpy.types.Operator):
+ bl_idname = "scene.godot_export_groups_autosave"
+ bl_label = "Export All Groups"
+ bl_description = "Exports all groups to Collada."
+
+ def execute(self,context):
+ scene = context.scene
+ if scene.godot_export_on_save:
+ for i in range(len(scene.godot_export_groups)):
+ if scene.godot_export_groups[i].active:
+ bpy.ops.scene.godot_export_group(idx=i)
+ self.report({'INFO'}, "All Groups exported." )
+ bpy.ops.ed.undo_push(message="Export all Groups")
+ return{'FINISHED'}
+
+class export_all_groups(bpy.types.Operator):
+ bl_idname = "scene.godot_export_all_groups"
+ bl_label = "Export All Groups"
+ bl_description = "Exports all groups to Collada."
+
+ def execute(self,context):
+ scene = context.scene
+
+ for i in range(0,len(scene.godot_export_groups)):
+ bpy.ops.scene.godot_export_group(idx=i,export_all=True)
+
+ self.report({'INFO'}, "All Groups exported." )
+ return{'FINISHED'}
+
+
+class export_group(bpy.types.Operator):
+ bl_idname = "scene.godot_export_group"
+ bl_label = "Export Group"
+ bl_description = "Exports the active group to destination folder as Collada file."
+
+ idx = IntProperty(default=0)
+ export_all = BoolProperty(default=False)
+
+
+ def copy_object_recursive(self,ob,parent,single_user = True):
+ new_ob = bpy.data.objects[ob.name].copy()
+ if single_user or ob.type=="ARMATURE":
+ new_mesh_data = new_ob.data.copy()
+ new_ob.data = new_mesh_data
+ bpy.context.scene.objects.link(new_ob)
+
+ if ob != parent:
+ new_ob.parent = parent
+ else:
+ new_ob.parent = None
+
+ for child in ob.children:
+ self.copy_object_recursive(child,new_ob,single_user)
+ new_ob.select = True
+ return new_ob
+
+ def delete_object(self,ob):
+ if ob != None:
+ for child in ob.children:
+ self.delete_object(child)
+ bpy.context.scene.objects.unlink(ob)
+ bpy.data.objects.remove(ob)
+
+ def convert_group_to_node(self,group):
+ if group.dupli_group != None:
+ for object in group.dupli_group.objects:
+ if object.parent == None:
+ object = self.copy_object_recursive(object,object,True)
+ matrix = Matrix(object.matrix_local)
+ object.matrix_local = Matrix()
+ object.matrix_local *= group.matrix_local
+ object.matrix_local *= matrix
+
+ self.delete_object(group)
+
+ def execute(self,context):
+
+ scene = context.scene
+ group = context.scene.godot_export_groups
+
+ if not group[self.idx].active and self.export_all:
+ return{'FINISHED'}
+
+ for i,object in enumerate(group[self.idx].nodes):
+ if object.name in bpy.data.objects:
+ pass
+ else:
+ group[self.idx].nodes.remove(i)
+ bpy.ops.ed.undo_push(message="Clear not existent Group Nodes.")
+
+ path = group[self.idx].export_path
+ if (path.find("//")==0 or path.find("\\\\")==0):
+ #if relative, convert to absolute
+ path = bpy.path.abspath(path)
+ path = path.replace("\\","/")
+
+ ### if path exists and group export name is set the group will be exported
+ if os.path.exists(path) and group[self.idx].export_name != "":
+
+ context.scene.layers = [True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True]
+
+
+ if group[self.idx].export_name.endswith(".dae"):
+ path = os.path.join(path,group[self.idx].export_name)
+ else:
+ path = os.path.join(path,group[self.idx].export_name+".dae")
+
+ hide_select = []
+ for object in context.scene.objects:
+ hide_select.append(object.hide_select)
+ object.hide_select = False
+ object.select = False
+ context.scene.objects.active = None
+
+ ### make particle duplicates, parent and select them
+ nodes_to_be_added = []
+ if group[self.idx].use_include_particle_duplicates:
+ for i,object in enumerate(group[self.idx].nodes):
+ if bpy.data.objects[object.name].type != "EMPTY":
+ context.scene.objects.active = bpy.data.objects[object.name]
+ bpy.data.objects[object.name].select = True
+ bpy.ops.object.duplicates_make_real()
+ for object in context.selected_objects:
+ nodes_to_be_added.append(object)
+ bpy.ops.object.parent_set(type="OBJECT", keep_transform=False)
+
+ for object in context.selected_objects:
+ object.select = False
+ bpy.data.objects[object.name].select = False
+ context.scene.objects.active = None
+ for object in nodes_to_be_added:
+ object.select = True
+
+ ### select all other nodes from the group
+ for i,object in enumerate(group[self.idx].nodes):
+ if bpy.data.objects[object.name].type == "EMPTY":
+ self.convert_group_to_node(bpy.data.objects[object.name])
+ else:
+ bpy.data.objects[object.name].select = True
+
+ bpy.ops.object.transform_apply(location=group[self.idx].apply_loc, rotation=group[self.idx].apply_rot, scale=group[self.idx].apply_scale)
+ bpy.ops.export_scene.dae(check_existing=True, filepath=path, filter_glob="*.dae", object_types=group[self.idx].object_types, use_export_selected=group[self.idx].use_export_selected, use_mesh_modifiers=group[self.idx].use_mesh_modifiers, use_tangent_arrays=group[self.idx].use_tangent_arrays, use_triangles=group[self.idx].use_triangles, use_copy_images=group[self.idx].use_copy_images, use_active_layers=group[self.idx].use_active_layers, use_exclude_ctrl_bones=group[self.idx].use_exclude_ctrl_bones, use_anim=group[self.idx].use_anim, use_anim_action_all=group[self.idx].use_anim_action_all, use_anim_skip_noexp=group[self.idx].use_anim_skip_noexp, use_anim_optimize=group[self.idx].use_anim_optimize, anim_optimize_precision=group[self.idx].anim_optimize_precision, use_metadata=group[self.idx].use_metadata)
+
+ self.report({'INFO'}, '"'+group[self.idx].name+'"' + " Group exported." )
+ msg = "Export Group "+group[self.idx].name
+
+ bpy.ops.ed.undo_push(message="")
+ bpy.ops.ed.undo()
+ bpy.ops.ed.undo_push(message=msg)
+
+ else:
+ self.report({'INFO'}, "Define Export Name and Export Path." )
+ return{'FINISHED'}
+
+class add_export_group(bpy.types.Operator):
+ bl_idname = "scene.godot_add_export_group"
+ bl_label = "Adds a new export Group"
+ bl_description = "Creates a new Export Group with the selected Objects assigned to it."
+
+ def execute(self,context):
+ scene = context.scene
+
+ item = scene.godot_export_groups.add()
+ item.name = "New Group"
+ for object in context.selected_objects:
+ node = item.nodes.add()
+ node.name = object.name
+ scene.godot_export_groups_index = len(scene.godot_export_groups)-1
+ bpy.ops.ed.undo_push(message="Create New Export Group")
+ return{'FINISHED'}
+
+class del_export_group(bpy.types.Operator):
+ bl_idname = "scene.godot_delete_export_group"
+ bl_label = "Delets the selected export Group"
+ bl_description = "Delets the active Export Group."
+
+ def invoke(self, context, event):
+ wm = context.window_manager
+ return wm.invoke_confirm(self,event)
+
+ def execute(self,context):
+ scene = context.scene
+
+ scene.godot_export_groups.remove(scene.godot_export_groups_index)
+ if scene.godot_export_groups_index > 0:
+ scene.godot_export_groups_index -= 1
+ bpy.ops.ed.undo_push(message="Delete Export Group")
+ return{'FINISHED'}
+
+class godot_node_list(bpy.types.PropertyGroup):
+ name = StringProperty()
+
+class godot_export_groups(bpy.types.PropertyGroup):
+ name = StringProperty(name="Group Name")
+ export_name = StringProperty(name="scene_name")
+ nodes = CollectionProperty(type=godot_node_list)
+ export_path = StringProperty(subtype="DIR_PATH")
+ active = BoolProperty(default=True,description="Export Group")
+
+ object_types = EnumProperty(name="Object Types",options={'ENUM_FLAG'},items=(('EMPTY', "Empty", ""),('CAMERA', "Camera", ""),('LAMP', "Lamp", ""),('ARMATURE', "Armature", ""),('MESH', "Mesh", ""),('CURVE', "Curve", ""),),default={'EMPTY', 'CAMERA', 'LAMP', 'ARMATURE', 'MESH','CURVE'})
+
+ apply_scale = BoolProperty(name="Apply Scale",description="Apply Scale before export.",default=False)
+ apply_rot = BoolProperty(name="Apply Rotation",description="Apply Rotation before export.",default=False)
+ apply_loc = BoolProperty(name="Apply Location",description="Apply Location before export.",default=False)
+
+ use_export_selected = BoolProperty(name="Selected Objects",description="Export only selected objects (and visible in active layers if that applies).",default=True)
+ use_mesh_modifiers = BoolProperty(name="Apply Modifiers",description="Apply modifiers to mesh objects (on a copy!).",default=True)
+ use_tangent_arrays = BoolProperty(name="Tangent Arrays",description="Export Tangent and Binormal arrays (for normalmapping).",default=False)
+ use_triangles = BoolProperty(name="Triangulate",description="Export Triangles instead of Polygons.",default=False)
+
+ use_copy_images = BoolProperty(name="Copy Images",description="Copy Images (create images/ subfolder)",default=False)
+ use_active_layers = BoolProperty(name="Active Layers",description="Export only objects on the active layers.",default=True)
+ use_exclude_ctrl_bones = BoolProperty(name="Exclude Control Bones",description="Exclude skeleton bones with names that begin with 'ctrl'.",default=True)
+ use_anim = BoolProperty(name="Export Animation",description="Export keyframe animation",default=False)
+ use_anim_action_all = BoolProperty(name="All Actions",description=("Export all actions for the first armature found in separate DAE files"),default=False)
+ use_anim_skip_noexp = BoolProperty(name="Skip (-noexp) Actions",description="Skip exporting of actions whose name end in (-noexp). Useful to skip control animations.",default=True)
+ use_anim_optimize = BoolProperty(name="Optimize Keyframes",description="Remove double keyframes",default=True)
+
+ anim_optimize_precision = FloatProperty(name="Precision",description=("Tolerence for comparing double keyframes (higher for greater accuracy)"),min=1, max=16,soft_min=1, soft_max=16,default=6.0)
+
+ use_metadata = BoolProperty(name="Use Metadata",default=True,options={'HIDDEN'})
+ use_include_particle_duplicates = BoolProperty(name="Include Particle Duplicates",default=True)
+
+def register():
+ bpy.utils.register_class(godot_export_manager)
+ bpy.utils.register_class(godot_node_list)
+ bpy.utils.register_class(godot_export_groups)
+ bpy.utils.register_class(add_export_group)
+ bpy.utils.register_class(del_export_group)
+ bpy.utils.register_class(export_all_groups)
+ bpy.utils.register_class(export_groups_autosave)
+ bpy.utils.register_class(export_group)
+ bpy.utils.register_class(add_objects_to_group)
+ bpy.utils.register_class(del_objects_from_group)
+ bpy.utils.register_class(select_group_objects)
+ bpy.utils.register_class(UI_List_Godot)
+
+ bpy.types.Scene.godot_export_groups = CollectionProperty(type=godot_export_groups)
+ bpy.types.Scene.godot_export_groups_index = IntProperty(default=0,min=0)
+
+def unregister():
+ bpy.utils.unregister_class(godot_export_manager)
+ bpy.utils.unregister_class(godot_node_list)
+ bpy.utils.unregister_class(godot_export_groups)
+ bpy.utils.unregister_class(export_groups_autosave)
+ bpy.utils.unregister_class(add_export_group)
+ bpy.utils.unregister_class(del_export_group)
+ bpy.utils.unregister_class(export_all_groups)
+ bpy.utils.unregister_class(export_group)
+ bpy.utils.unregister_class(add_objects_to_group)
+ bpy.utils.unregister_class(del_objects_from_group)
+ bpy.utils.unregister_class(select_group_objects)
+ bpy.utils.unregister_class(UI_List_Godot)
+
+@persistent
+def auto_export(dummy):
+ bpy.ops.scene.godot_export_groups_autosave()
+
+bpy.app.handlers.save_post.append(auto_export)
+
+if __name__ == "__main__":
+ register()
diff --git a/tools/export/blender25/io_scene_dae/export_dae.py b/tools/export/blender25/io_scene_dae/export_dae.py
index 4e1635429b..8161f05bf8 100644
--- a/tools/export/blender25/io_scene_dae/export_dae.py
+++ b/tools/export/blender25/io_scene_dae/export_dae.py
@@ -162,37 +162,61 @@ class DaeExporter:
def export_image(self,image):
-
if (image in self.image_cache):
return self.image_cache[image]
-
+
imgpath = image.filepath
if (imgpath.find("//")==0 or imgpath.find("\\\\")==0):
#if relative, convert to absolute
imgpath = bpy.path.abspath(imgpath)
#path is absolute, now do something!
-
+
if (self.config["use_copy_images"]):
#copy image
basedir = os.path.dirname(self.path)+"/images"
if (not os.path.isdir(basedir)):
os.makedirs(basedir)
- dstfile=basedir+"/"+os.path.basename(imgpath)
- if (not os.path.isfile(dstfile)):
- shutil.copy(imgpath,dstfile)
- imgpath="images/"+os.path.basename(imgpath)
+
+ if os.path.isfile(imgpath):
+ dstfile=basedir+"/"+os.path.basename(imgpath)
+
+ if (not os.path.isfile(dstfile)):
+ shutil.copy(imgpath,dstfile)
+ imgpath="images/"+os.path.basename(imgpath)
+ else:
+ ### if file is not found save it as png file in the destination folder
+ img_tmp_path = image.filepath
+ if img_tmp_path.endswith((".bmp",".rgb",".png",".jpeg",".jpg",".jp2",".tga",".cin",".dpx",".exr",".hdr",".tif")):
+ image.filepath = basedir+"/"+os.path.basename(img_tmp_path)
+ else:
+ image.filepath = basedir+"/"+image.name+".png"
+
+ dstfile=basedir+"/"+os.path.basename(image.filepath)
+
+ if (not os.path.isfile(dstfile)):
+
+ image.save()
+ imgpath="images/"+os.path.basename(image.filepath)
+ image.filepath = img_tmp_path
else:
#export relative, always, no one wants absolute paths.
try:
imgpath = os.path.relpath(imgpath,os.path.dirname(self.path)).replace("\\","/") # export unix compatible always
+
except:
pass #fails sometimes, not sure why
-
-
+
imgid = self.new_id("image")
+
+ if (not os.path.isfile(imgpath)):
+ if img_tmp_path.endswith((".bmp",".rgb",".png",".jpeg",".jpg",".jp2",".tga",".cin",".dpx",".exr",".hdr",".tif")):
+ imgpath="images/"+os.path.basename(img_tmp_path)
+ else:
+ imgpath="images/"+image.name+".png"
+
self.writel(S_IMGS,1,'<image id="'+imgid+'" name="'+image.name+'">')
self.writel(S_IMGS,2,'<init_from>'+imgpath+'</init_from>"/>')
self.writel(S_IMGS,1,'</image>')
@@ -1176,6 +1200,7 @@ class DaeExporter:
def export_node(self,node,il):
if (not node in self.valid_nodes):
return
+ prev_node = bpy.context.scene.objects.active
bpy.context.scene.objects.active = node
self.writel(S_NODES,il,'<node id="'+self.validate_id(node.name)+'" name="'+node.name+'" type="NODE">')
@@ -1199,6 +1224,7 @@ class DaeExporter:
il-=1
self.writel(S_NODES,il,'</node>')
+ bpy.context.scene.objects.active = prev_node #make previous node active again
def is_node_valid(self,node):
if (not node.type in self.config["object_types"]):
@@ -1441,12 +1467,13 @@ class DaeExporter:
return tcn
def export_animations(self):
- tmp_mat = [] # workaround by ndee
- for s in self.skeletons: # workaround by ndee
- tmp_bone_mat = [] # workaround by ndee
- for bone in s.pose.bones: # workaround by ndee
- tmp_bone_mat.append(Matrix(bone.matrix_basis)) # workaround by ndee
- tmp_mat.append([Matrix(s.matrix_local),tmp_bone_mat]) # workaround by ndee -> stores skeleton and bone transformations
+ tmp_mat = []
+ for s in self.skeletons:
+ tmp_bone_mat = []
+ for bone in s.pose.bones:
+ tmp_bone_mat.append(Matrix(bone.matrix_basis))
+ bone.matrix_basis = Matrix()
+ tmp_mat.append([Matrix(s.matrix_local),tmp_bone_mat])
self.writel(S_ANIM,0,'<library_animations>')
@@ -1481,7 +1508,7 @@ class DaeExporter:
bones.append(dp)
allowed_skeletons=[]
- for i,y in enumerate(self.skeletons): # workaround by ndee
+ for i,y in enumerate(self.skeletons):
if (y.animation_data):
for z in y.pose.bones:
if (z.bone.name in bones):
@@ -1489,9 +1516,9 @@ class DaeExporter:
allowed_skeletons.append(y)
y.animation_data.action=x;
- y.matrix_local = tmp_mat[i][0] # workaround by ndee -> resets the skeleton transformation.
- for j,bone in enumerate(s.pose.bones): # workaround by ndee
- bone.matrix_basis = Matrix() # workaround by ndee -> resets the bone transformations. Important if bones in follwing actions miss keyframes
+ y.matrix_local = tmp_mat[i][0]
+ for j,bone in enumerate(s.pose.bones):
+ bone.matrix_basis = Matrix()
print("allowed skeletons "+str(allowed_skeletons))
@@ -1511,15 +1538,15 @@ class DaeExporter:
self.writel(S_ANIM_CLIPS,0,'</library_animation_clips>')
- for i,s in enumerate(self.skeletons): # workaround by ndee
+ for i,s in enumerate(self.skeletons):
if (s.animation_data==None):
continue
if s in cached_actions:
s.animation_data.action = bpy.data.actions[cached_actions[s]]
else:
s.animation_data.action = None
- for j,bone in enumerate(s.pose.bones): # workaround by ndee
- bone.matrix_basis = tmp_mat[i][1][j] # workaround by ndee -> resets the bone transformation to what they were before exporting.
+ for j,bone in enumerate(s.pose.bones):
+ bone.matrix_basis = tmp_mat[i][1][j]
else:
self.export_animation(self.scene.frame_start,self.scene.frame_end)