summaryrefslogtreecommitdiffstats
path: root/editor/editor_resource_preview.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Rename `instance()`->`instantiate()` when it's a verbLightning_A2021-06-191-5/+5
|
* Consistently prefix bound virtual methods with _kobewi2021-06-121-17/+17
|
* Core: Move DirAccess and FileAccess to `core/io`Rémi Verschelde2021-06-111-1/+1
| | | | | File handling APIs are typically considered part of I/O, and we did have most `FileAccess` implementations in `core/io` already.
* Implement shader cachingreduz2021-05-311-1/+1
| | | | | | | | | | | | * Shader compilation is now cached. Subsequent loads take less than a millisecond. * Improved game, editor and project manager startup time. * Editor uses .godot/shader_cache to store shaders. * Game uses user://shader_cache * Project manager uses $config_dir/shader_cache * Options to tweak shader caching in project settings. * Editor path configuration moved from EditorSettings to new class, EditorPaths, so it can be available early on (before shaders are compiled). * Reworked ShaderCompilerRD to ensure deterministic shader code creation (else shader may change and cache will be invalidated). * Added shader compression with SMOLV: https://github.com/aras-p/smol-v
* Rename Texture.get_data() to get_image()Marcel Admiraal2021-03-281-1/+1
|
* Modernize atomicsPedro J. Estébanez2021-02-181-7/+5
| | | | | | | | | | - Based on C++11's `atomic` - Reworked `SafeRefCount` (based on the rewrite by @hpvb) - Replaced free atomic functions by the new `SafeNumeric<T>` - Replaced wrong cases of `volatile bool` by the new `SafeFlag` - Platform-specific implementations no longer needed Co-authored-by: Hein-Pieter van Braam-Stewart <hp@tmm.cx>
* Modernize ThreadPedro J. Estébanez2021-01-291-7/+4
| | | | | | | | | - Based on C++11's `thread` and `thread_local` - No more need to allocate-deallocate or check for null - No pointer anymore, just a member variable - Platform-specific implementations no longer needed (except for the few cases of non-portable functions) - Simpler for `NO_THREADS` - Thread ids are now the same across platforms (main is 1; others follow)
* Update copyright statements to 2021Rémi Verschelde2021-01-011-2/+2
| | | | | | | | | | | | | | Happy new year to the wonderful Godot community! 2020 has been a tough year for most of us personally, but a good year for Godot development nonetheless with a huge amount of work done towards Godot 4.0 and great improvements backported to the long-lived 3.2 branch. We've had close to 400 contributors to engine code this year, authoring near 7,000 commit! (And that's only for the `master` branch and for the engine code, there's a lot more when counting docs, demos and other first-party repos.) Here's to a great year 2021 for all Godot users 🎆
* Reorganized core/ directory, it was too fatty alreadyreduz2020-11-071-2/+2
| | | | | | -Removed FuncRef, since Callable makes it obsolete -Removed int_types.h as its obsolete in c++11+ -Changed color names code
* Refactor MethodBind to use variadic templatesreduz2020-10-181-2/+0
| | | | Removed make_binders and the old style generated binders.
* Fixes FileSystem tree preview icon size on HiDPIHaoyu Qiu2020-09-301-1/+0
|
* Remove 32-bit String to_int methodAaron Franke2020-06-031-3/+3
|
* Style: Enforce braces around if blocks and loopsRémi Verschelde2020-05-141-4/+7
| | | | | Using clang-tidy's `readability-braces-around-statements`. https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
* Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde2020-05-141-32/+0
| | | | | | | | | | | | | | Which means that reduz' beloved style which we all became used to will now be changed automatically to remove the first empty line. This makes us lean closer to 1TBS (the one true brace style) instead of hybridating it with some Allman-inspired spacing. There's still the case of braces around single-statement blocks that needs to be addressed (but clang-format can't help with that, but clang-tidy may if we agree about it). Part of #33027.
* Replace NULL with nullptrlupoDharkael2020-04-021-3/+3
|
* Renaming of servers for coherency.Juan Linietsky2020-03-271-1/+1
| | | | | | | | | | VisualServer -> RenderingServer PhysicsServer -> PhysicsServer3D Physics2DServer -> PhysicsServer2D NavigationServer -> NavigationServer3D Navigation2DServer -> NavigationServer2D Also renamed corresponding files.
* Popups are now windows also (broken!)Juan Linietsky2020-03-261-1/+1
|
* Fix bad uses of mutex causing deadlocksPedro J. Estébanez2020-03-131-4/+4
|
* Drop old semaphore implementationPedro J. Estébanez2020-03-031-6/+4
| | | | | | | | | | | | - Removed platform-specific implementations. - Now all semaphores are in-object, unless they need to be conditionally created. - Similarly to `Mutex`, provided a dummy implementation for when `NO_THREADS` is defined. - Similarly to `Mutex`, methods are made `const` for easy use in such contexts. - Language bindings updated: `wait()` and `post()` are now `void`. - Language bindings updated: `try_wait()` added. Bonus: - Rewritten the `#ifdef` in `mutex.h` to meet the code style.
* Reimplement Mutex with C++'s <mutex>Pedro J. Estébanez2020-02-261-65/+64
| | | | | | | | | | | | | | | | Main: - It's now implemented thanks to `<mutex>`. No more platform-specific implementations. - `BinaryMutex` (non-recursive) is added, as an alternative for special cases. - Doesn't need allocation/deallocation anymore. It can live in the stack and be part of other classes. - Because of that, it's methods are now `const` and the inner mutex is `mutable` so it can be easily used in `const` contexts. - A no-op implementation is provided if `NO_THREADS` is defined. No more need to add `#ifdef NO_THREADS` just for this. - `MutexLock` now takes a reference. At this point the cases of null `Mutex`es are rare. If you ever need that, just don't use `MutexLock`. - Thread-safe utilities are therefore simpler now. Misc.: - `ScopedMutexLock` is dropped and replaced by `MutexLock`, because they were pretty much the same. - Every case of lock, do-something, unlock is replaced by `MutexLock` (complex cases where it's not straightfoward are kept as as explicit lock and unlock). - `ShaderRD` contained an `std::mutex`, which has been replaced by `Mutex`.
* Added a spinlock template as well as a thread work pool class.Juan Linietsky2020-02-111-1/+1
| | | | Also, optimized shader compilation to happen on threads.
* Texture refactorJuan Linietsky2020-02-111-10/+10
| | | | | | | | -Texture renamed to Texture2D -TextureLayered as base now inherits 2Darray, cubemap and cubemap array -Removed all references to flags in textures (they will go in the shader) -Texture3D gone for now (will come back later done properly) -Create base rasterizer for RenderDevice, RasterizerRD
* Remove duplicate ERR_PRINT macro.Marcel Admiraal2020-02-051-1/+1
|
* Export: Properly disable resource preview threadRémi Verschelde2020-01-141-2/+0
| | | | | | Fixes #26857. Fixes #34433. Fixes #34826.
* Update copyright statements to 2020Rémi Verschelde2020-01-011-2/+2
| | | | | | | | | | | Happy new year to the wonderful Godot community! We're starting a new decade with a well-established, non-profit, free and open source game engine, and tons of further improvements in the pipeline from hundreds of contributors. Godot will keep getting better, and we're looking forward to all the games that the community will keep developing and releasing with it.
* Memory leak and crash fixesRafał Mikrut2019-11-101-0/+1
|
* Prevent crash when we can't write to editor cache or config pathRémi Verschelde2019-10-311-8/+13
| | | | | | | | | | | | | This can happen if users somehow got wrong user permissions assigned to their Godot cache, config or data paths (e.g. `~/.config/godot`). The error messages should give them a hint as to what the issue may be. Fixes #33199. There may be other situations that still lead to a crash, we need to review all uses of `FileAccess::open` with `FileAccess::WRITE` mode to ensure that proper pointer validation is done.
* Merge pull request #32051 from qarmin/some_error_explanationRémi Verschelde2019-09-251-2/+2
|\ | | | | Added some obvious errors explanations
| * Added some obvious errors explanationsqarmin2019-09-251-2/+2
| |
* | Fix int overflow in EditorResourcePreview::_preview_readyqarmin2019-09-131-1/+1
|/
* Fixed order of parameters when updating resource cache file (fixes #31930)PouleyKetchoupp2019-09-041-1/+2
|
* Replace 'ERR_EXPLAIN' with 'ERR_FAIL_*_MSG' in 'core/' and 'editor/'Braden Bodily2019-08-171-4/+2
| | | | | | | | | Condensed some if and ERR statements. Added dots to end of error messages Couldn't figure out EXPLAINC. These files gave me trouble: core/error_macros.h, core/io/file_access_buffered_fa.h (where is it?), core/os/memory.cpp, drivers/png/png_driver_common.cpp, drivers/xaudio2/audio_driver_xaudio2.cpp (where is it?)
* Use reference to constant in functionsqarmin2019-07-101-2/+2
|
* Make sure that the resource previewer does not hang on exitHein-Pieter van Braam-Stewart2019-06-261-1/+2
|
* Check error code before using FileAccess to create a preview and crashing.K. S. Ernest (iFIre) Lee2019-05-301-1/+3
|
* Renamed EditorResourcePreviewGenerator.should_generate_small_preview() to ↵MrCdK2019-05-201-4/+31
| | | | | | | generate_small_preview_automatically() Added can_generate_small_preview() so the generator uses generate() or generate_from_path() if it returns true Added can_generate_small_preview() and generate_small_preview_automatically() to the scripting languages
* Removed the resource preview thread from the server buildIlaria Cislaghi2019-03-061-1/+2
|
* Flush stuff pending on visual server thread when exiting, fixes #24669Juan Linietsky2019-03-011-0/+8
|
* -Fix problem of order of import plugins, closes #26340Juan Linietsky2019-02-271-2/+5
| | | | -Ensure resource previewer does not start until first import is done
* Fix typos with codespellRémi Verschelde2019-02-131-1/+1
| | | | | | | | | | | | | | | | | | | | Using codespell 1.14.0. Method: ``` $ cat > ../godot-word-whitelist.txt << EOF ang doubleclick lod nd numer que te unselect EOF $ codespell -w -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po" $ git diff // undo unwanted changes ```
* Fix pixelized previews, but also instances of breaking ImageTexture cache. ↵Juan Linietsky2019-01-271-0/+1
| | | | Closes #25378.
* Perform a cleaner exit for resource preview, fixes #24206Juan Linietsky2019-01-171-4/+11
|
* Update copyright statements to 2019Rémi Verschelde2019-01-011-2/+2
| | | | Happy new year to the wonderful Godot community!
* Make thumbnail cache less tasking on the message queueBojidar Marinov2018-12-061-2/+2
| | | | Fixes #23567
* Bugfixes on the filesystem dockgroud2018-09-141-1/+1
|
* Add thumnails to the tree viewgroud2018-09-141-35/+74
|
* Make core/ includes absolute, remove subfolders from include pathRémi Verschelde2018-09-121-5/+5
| | | | | | 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.
* Make some debug prints verbose-only, remove othersRémi Verschelde2018-08-241-2/+0
|
* Reduce unnecessary COW on Vector by make writing explicitHein-Pieter van Braam2018-07-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | | 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.
* Clean up some bad words from code commentsArtem Varaksa2018-02-171-1/+0
|