summaryrefslogtreecommitdiff
path: root/servers/visual
AgeCommit message (Collapse)Author
2018-09-27Fix warnings about unhandled enum value in switch [-Wswitch]Rémi Verschelde
Fixes GCC 5 warnings of the form: core/io/http_client.cpp:288:9: warning: enumeration value 'STATUS_SSL_HANDSHAKE_ERROR' not handled in switch [-Wswitch] core/io/marshalls.cpp:806:9: warning: enumeration value 'AABB' not handled in switch [-Wswitch] Those can be trivial cases where adding a default fallback is the solution, or more complex issues/hidden bugs where missed values are actually meant to be handled.
2018-09-27Fix warnings about set but unused variables [-Wunused-but-set-variable]Rémi Verschelde
Fixes the following GCC 5 warnings: ``` drivers/gles2/rasterizer_canvas_gles2.cpp:814:8: warning: variable 'rt_size' set but not used [-Wunused-but-set-variable] drivers/gles2/rasterizer_scene_gles2.cpp:2270:11: warning: variable 'vp_height' set but not used [-Wunused-but-set-variable] drivers/gles2/rasterizer_scene_gles2.cpp:2673:22: warning: variable 'e' set but not used [-Wunused-but-set-variable] drivers/gles2/rasterizer_scene_gles2.cpp:715:7: warning: variable 'no_cull' set but not used [-Wunused-but-set-variable] drivers/gles2/shader_gles2.cpp:693:14: warning: variable 'cc' set but not used [-Wunused-but-set-variable] drivers/gles3/rasterizer_canvas_gles3.cpp:1226:8: warning: variable 'rt_size' set but not used [-Wunused-but-set-variable] drivers/gles3/rasterizer_scene_gles3.cpp:3039:10: warning: variable 'contrib' set but not used [-Wunused-but-set-variable] drivers/gles3/rasterizer_scene_gles3.cpp:4504:32: warning: variable 'vp_height' set but not used [-Wunused-but-set-variable] editor/editor_inspector.cpp:272:9: warning: variable 'guide_color' set but not used [-Wunused-but-set-variable] editor/editor_themes.cpp:1067:14: warning: variable 'alpha3' set but not used [-Wunused-but-set-variable] editor/editor_themes.cpp:263:8: warning: variable 'script_bg_color' set but not used [-Wunused-but-set-variable] editor/plugins/collision_shape_2d_editor_plugin.cpp:326:11: warning: variable 'cpoint' set but not used [-Wunused-but-set-variable] editor/plugins/mesh_editor_plugin.cpp:72:9: warning: variable 'size' set but not used [-Wunused-but-set-variable] editor/plugins/shader_editor_plugin.cpp:471:12: warning: variable 'mpos' set but not used [-Wunused-but-set-variable] editor/plugins/shader_editor_plugin.cpp:89:8: warning: variable 'basetype_color' set but not used [-Wunused-but-set-variable] editor/plugins/shader_editor_plugin.cpp:90:8: warning: variable 'type_color' set but not used [-Wunused-but-set-variable] editor/plugins/shader_editor_plugin.cpp:92:8: warning: variable 'string_color' set but not used [-Wunused-but-set-variable] modules/visual_script/visual_script_editor.cpp:2521:7: warning: variable 'seq_connect' set but not used [-Wunused-but-set-variable] platform/android/export/export.cpp:580:12: warning: variable 'styles_count' set but not used [-Wunused-but-set-variable] platform/android/export/export.cpp:584:12: warning: variable 'styles_offset' set but not used [-Wunused-but-set-variable] platform/osx/export/export.cpp:464:9: warning: variable 'zerr' set but not used [-Wunused-but-set-variable] scene/2d/tile_map.cpp:260:10: warning: variable 'tcenter' set but not used [-Wunused-but-set-variable] scene/3d/light.cpp:166:7: warning: variable 'editor_ok' set but not used [-Wunused-but-set-variable] scene/3d/navigation.cpp:566:11: warning: variable 'closest_navmesh' set but not used [-Wunused-but-set-variable] scene/gui/rich_text_label.cpp:869:8: warning: variable 'size' set but not used [-Wunused-but-set-variable] scene/main/viewport.cpp:705:14: warning: variable 'xform' set but not used [-Wunused-but-set-variable] scene/main/viewport.cpp:706:8: warning: variable 'ss' set but not used [-Wunused-but-set-variable] scene/main/viewport.cpp:726:14: warning: variable 'xform' set but not used [-Wunused-but-set-variable] scene/main/viewport.cpp:727:8: warning: variable 'ss' set but not used [-Wunused-but-set-variable] scene/resources/material.cpp:430:7: warning: variable 'using_world' set but not used [-Wunused-but-set-variable] servers/visual/shader_language.cpp:2026:7: warning: variable 'all_const' set but not used [-Wunused-but-set-variable] servers/visual/visual_server_scene.cpp:1383:28: warning: variable 'z_max_cam' set but not used [-Wunused-but-set-variable] ``` Also fixes two [-Wunused-value] warnings: ``` scene/gui/text_edit.cpp:4405:20: warning: statement has no effect [-Wunused-value] servers/visual/visual_server_scene.cpp:905:48: warning: value computed is not used [-Wunused-value] ``` Some of those are bugs and need further work, they are identified with `// FIXME` comments.
2018-09-27Fix warnings about unused variables [-Wunused-variable]Rémi Verschelde
Fixes the following GCC 5 warnings: ``` drivers/gles2/rasterizer_scene_gles2.cpp:1139:15: warning: unused variable 'offset' [-Wunused-variable] drivers/gles2/rasterizer_scene_gles2.cpp:1205:39: warning: unused variable 'multi_mesh' [-Wunused-variable] drivers/gles2/rasterizer_storage_gles2.cpp:359:7: warning: unused variable 'srgb' [-Wunused-variable] drivers/gles2/shader_gles2.cpp:1016:45: warning: unused variable 'texture_hints' [-Wunused-variable] editor/animation_track_editor.cpp:776:9: warning: unused variable 'keys_to' [-Wunused-variable] editor/editor_inspector.cpp:273:7: warning: unused variable 'vs_height' [-Wunused-variable] editor/editor_themes.cpp:202:10: warning: unused variable 'begin_time' [-Wunused-variable] editor/editor_themes.cpp:239:10: warning: unused variable 'end_time' [-Wunused-variable] editor/plugins/animation_blend_tree_editor_plugin.cpp:726:17: warning: unused variable 'an' [-Wunused-variable] editor/plugins/script_text_editor.cpp:1278:8: warning: unused variable 'fold_state' [-Wunused-variable] main/main.cpp:132:13: warning: 'use_vsync' defined but not used [-Wunused-variable] modules/cvtt/image_compress_cvtt.cpp:231:8: warning: unused variable 'y_end' [-Wunused-variable] modules/cvtt/image_compress_cvtt.cpp:311:6: warning: unused variable 'shift' [-Wunused-variable] modules/gdscript/gdscript_editor.cpp:58:7: warning: unused variable 'th' [-Wunused-variable] modules/gridmap/grid_map.cpp:1084:6: warning: unused variable 'ofs' [-Wunused-variable] modules/theora/video_stream_theora.cpp:442:9: warning: unused variable 'tr' [-Wunused-variable] modules/visual_script/visual_script_editor.cpp:2606:6: warning: unused variable 'count' [-Wunused-variable] modules/visual_script/visual_script_editor.cpp:2829:6: warning: unused variable 'seq_count' [-Wunused-variable] modules/visual_script/visual_script_editor.cpp:2844:24: warning: unused variable 'vnode_function' [-Wunused-variable] modules/websocket/lws_peer.cpp:122:12: warning: unused variable 'peer_data' [-Wunused-variable] modules/websocket/lws_peer.cpp:135:12: warning: unused variable 'peer_data' [-Wunused-variable] modules/websocket/lws_peer.cpp:63:12: warning: unused variable 'peer_data' [-Wunused-variable] modules/websocket/lws_peer.cpp:91:12: warning: unused variable 'peer_data' [-Wunused-variable] platform/android/export/export.cpp:763:16: warning: unused variable 'node_size' [-Wunused-variable] scene/gui/rich_text_label.cpp:850:10: warning: unused variable 'x_ofs' [-Wunused-variable] scene/gui/text_edit.cpp:653:8: warning: unused variable 'tab_w' [-Wunused-variable] scene/resources/bit_mask.cpp:186:6: warning: unused variable 'i' [-Wunused-variable] scene/resources/mesh.cpp:549:20: warning: '_array_name' defined but not used [-Wunused-variable] servers/audio/audio_rb_resampler.cpp:107:10: warning: unused variable 'v2' [-Wunused-variable] servers/audio/audio_rb_resampler.cpp:108:10: warning: unused variable 'v3' [-Wunused-variable] servers/audio/audio_rb_resampler.cpp:109:10: warning: unused variable 'v4' [-Wunused-variable] servers/audio/audio_rb_resampler.cpp:110:10: warning: unused variable 'v5' [-Wunused-variable] servers/audio/audio_rb_resampler.cpp:111:10: warning: unused variable 'v0n' [-Wunused-variable] servers/audio/audio_rb_resampler.cpp:112:10: warning: unused variable 'v1n' [-Wunused-variable] servers/audio/audio_rb_resampler.cpp:113:10: warning: unused variable 'v2n' [-Wunused-variable] servers/audio/audio_rb_resampler.cpp:114:10: warning: unused variable 'v3n' [-Wunused-variable] servers/audio/audio_rb_resampler.cpp:115:10: warning: unused variable 'v4n' [-Wunused-variable] servers/audio/audio_rb_resampler.cpp:116:10: warning: unused variable 'v5n' [-Wunused-variable] servers/visual/default_mouse_cursor.xpm:2:21: warning: 'default_mouse_cursor_xpm' defined but not used [-Wunused-variable] ```
2018-09-23-Rewrote GLES2 lighting and shadows and optimized state changes, did many ↵Juan Linietsky
optimizations, added vertex lighting. -Did some fixes to GLES3 too
2018-09-21Added missed min/max shader overloadsChaosus
2018-09-19Fixed an access after free in ShaderLanguage::_reduce_expression.Ibrahn Sahir
Passing an element reference of a vector to a push_back call to that same vector can cause an access after free. This is because push_back will resize the vector, reallocating if necessary, leaving the reference referring to the freed memory. Removed an instance of this usage here.
2018-09-13Set uniform default values in inspectorJFonS
2018-09-13Merge pull request #21982 from luzpaz/misc-typosRémi Verschelde
Misc. typos
2018-09-12Misc. typosluz.paz
Found via `codespell -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po"`
2018-09-12Make core/ includes absolute, remove subfolders from include pathRémi Verschelde
This allows more consistency in the manner we include core headers, where previously there would be a mix of absolute, relative and include path-dependent includes.
2018-08-31Fix handling of shader constants that caused crash, closes #15166JFonS
2018-08-29Ported CPU particles to 2DJuan Linietsky
2018-08-24Make some debug prints verbose-only, remove othersRémi Verschelde
2018-08-20Added FRAGCOORD to spatial light processingChaosus
2018-08-19Allow matrixes in varyingsChaosus
2018-08-10Merge pull request #20149 from Overblob/shader_float_typingJuan Linietsky
Shader language - Add optional float typings
2018-07-30add 3D texturesThomas Herzog
2018-07-29Remove pointless check for no texture, fixes #7298Juan Linietsky
2018-07-29Clear color was not correctly being set, fixes #4939Juan Linietsky
2018-07-29Manually fix, merge and close #15168Juan Linietsky
2018-07-27Rename flag to better nameJuan Linietsky
2018-07-26Reduce unnecessary COW on Vector by make writing explicitHein-Pieter van Braam
This commit makes operator[] on Vector const and adds a write proxy to it. From now on writes to Vectors need to happen through the .write proxy. So for instance: Vector<int> vec; vec.push_back(10); std::cout << vec[0] << std::endl; vec.write[0] = 20; Failing to use the .write proxy will cause a compilation error. In addition COWable datatypes can now embed a CowData pointer to their data. This means that String, CharString, and VMap no longer use or derive from Vector. _ALWAYS_INLINE_ and _FORCE_INLINE_ are now equivalent for debug and non-debug builds. This is a lot faster for Vector in the editor and while running tests. The reason why this difference used to exist is because force-inlined methods used to give a bad debugging experience. After extensive testing with modern compilers this is no longer the case.
2018-07-26allow comments and whitespace before shader_type declarationTodd Ross
2018-07-25Merge pull request #18368 from Gamblify/RasterizerEngineSyncRémi Verschelde
sync rasterizers with engine
2018-07-25Added conversions between matrixes in shadersChaosus
2018-07-23Merge pull request #12678 from AndreaCatania/softJuan Linietsky
Soft body
2018-07-23Implemented Soft bodyAndreaCatania
- Soft Body Physics node - Soft Body Rendering - Soft body Editor - Soft body importer
2018-07-23Fix issues with CPUParticles and related conversion from Particles. Closes ↵Juan Linietsky
#20126
2018-07-23Added some API to visual server so from control VRAM buffer is more easyAndreaCatania
2018-07-21-Fix disable_3d flagJuan Linietsky
-Add extra flag optimize=[size,speed] to be able to prioritize size
2018-07-17Add disable ambient light flag to shaders and materialsAlex Roman
2018-07-17Revert "Fix #19507 Not emitted particles affects performance"Max Hilbrunner
2018-07-17Merge pull request #19764 from malbach/godot_malbachMax Hilbrunner
Fix #19507 Not emitted particles affects performance
2018-07-17Merge pull request #20158 from Overblob/Fixed_shader_parsing_error_logRémi Verschelde
Fixed shader parsing error log
2018-07-16Finally figured out how to implement AnimatedTexture properly.Juan Linietsky
2018-07-15* Small hex/float/integer parsing refactoringOverblob
* Potential bug fix on hex (cannot be used atm) * Added optional typing for floats, eg: "1f" -> "1.0" "1.f" -> "1.0" "1.99f" -> "1.99" "1." -> "1.0"
2018-07-14Visual Shaders are back.Juan Linietsky
2018-07-14Fixed error due to bad cursor handling when parsing shader codeOverblob
Fixed completion error log thrown on "no auto-completion found" for typings with no completion.
2018-07-07Changed minimum visible viewport sizeJosh Taylor
When the viewport's size.y becomes lower than 2, the storage->frame.current_rt->effects.mip_maps[0].sizes Vector during rendering becomes empty, resulting in crashes in at least GLES3. This is a temporary fix to stop rendering a viewport when its size is below 2 rather than below 1.
2018-07-06Support for CPU based particles, which aids compatibility with OpenGL ES 2.0Juan Linietsky
2018-07-04Merge pull request #19786 from JFonS/correct_normal_scalingRémi Verschelde
Add render mode to ensure correct normals when using non-uniform scaling
2018-07-03Hacked around duplication bug. I think duplicate needs to be even smarter, ↵Juan Linietsky
maybe pass two bools? (containers and/or resources)
2018-07-02Added ability for SSAO to affect AO textures tooJuan Linietsky
2018-06-25Fix #19507 Not emitted particles affects performancemalbach
2018-06-23Fix typo in y shiftBastiaan Olij
2018-06-21Add render mode to ensure correct normals when using non-uniform scalingJFonS
2018-06-11Moved culling, updated lights and shadows into a prepare function so it is ↵Bastiaan Olij
only called once for stereo rendering
2018-06-05Rasterizers are now in sync with engineGustav Lund
The rasterisers (both GLES3 and GLES2) were calculating their own frame delta time This fix lets the rasterizers get the frame delta through the draw call That way any regulations to the frame step from the main script will not cause particle systems to process at a different step than the rest of the Engine. Remove unused rasterizer storage variable frame.prev_tick variable were not used anywhere and has been removed
2018-06-01Fix return type of isnan and isinf in the shader languageOliver Rausch
2018-05-16Fix bad operator check in `ShaderLanguage::_validate_assign`nemerle