summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorYuri Roubinsky <chaosus89@gmail.com>2022-01-10 21:46:41 +0300
committerYuri Roubinsky <chaosus89@gmail.com>2022-01-12 14:19:12 +0300
commit422f7b280f8ee7b3f737b1e87e4c1de912e62f8a (patch)
treeecf24dcf58ce15579791c243a9406938f6147662 /editor
parentd9f6e33663f365478150550acc3ec64aa9bb347c (diff)
Optimize include files to improve `shader_language.h` compilation speed
Diffstat (limited to 'editor')
-rw-r--r--editor/plugins/shader_editor_plugin.cpp2
-rw-r--r--editor/plugins/shader_editor_plugin.h2
-rw-r--r--editor/plugins/visual_shader_editor_plugin.cpp2
-rw-r--r--editor/shader_globals_editor.cpp1
4 files changed, 4 insertions, 3 deletions
diff --git a/editor/plugins/shader_editor_plugin.cpp b/editor/plugins/shader_editor_plugin.cpp
index e8bbeb0834..afecada1db 100644
--- a/editor/plugins/shader_editor_plugin.cpp
+++ b/editor/plugins/shader_editor_plugin.cpp
@@ -205,7 +205,7 @@ void ShaderTextEditor::_check_shader_mode() {
static ShaderLanguage::DataType _get_global_variable_type(const StringName &p_variable) {
RS::GlobalVariableType gvt = RS::get_singleton()->global_variable_get_type(p_variable);
- return RS::global_variable_type_get_shader_datatype(gvt);
+ return (ShaderLanguage::DataType)RS::global_variable_type_get_shader_datatype(gvt);
}
void ShaderTextEditor::_code_complete_script(const String &p_code, List<ScriptCodeCompletionOption> *r_options) {
diff --git a/editor/plugins/shader_editor_plugin.h b/editor/plugins/shader_editor_plugin.h
index cc90d381a5..db2d1438b3 100644
--- a/editor/plugins/shader_editor_plugin.h
+++ b/editor/plugins/shader_editor_plugin.h
@@ -40,7 +40,7 @@
#include "scene/gui/text_edit.h"
#include "scene/main/timer.h"
#include "scene/resources/shader.h"
-#include "servers/rendering/shader_language.h"
+#include "servers/rendering/shader_warnings.h"
class ShaderTextEditor : public CodeTextEditor {
GDCLASS(ShaderTextEditor, CodeTextEditor);
diff --git a/editor/plugins/visual_shader_editor_plugin.cpp b/editor/plugins/visual_shader_editor_plugin.cpp
index 43997d489a..80419bb7da 100644
--- a/editor/plugins/visual_shader_editor_plugin.cpp
+++ b/editor/plugins/visual_shader_editor_plugin.cpp
@@ -3914,7 +3914,7 @@ void VisualShaderEditor::_preview_size_changed() {
static ShaderLanguage::DataType _get_global_variable_type(const StringName &p_variable) {
RS::GlobalVariableType gvt = RS::get_singleton()->global_variable_get_type(p_variable);
- return RS::global_variable_type_get_shader_datatype(gvt);
+ return (ShaderLanguage::DataType)RS::global_variable_type_get_shader_datatype(gvt);
}
void VisualShaderEditor::_update_preview() {
diff --git a/editor/shader_globals_editor.cpp b/editor/shader_globals_editor.cpp
index f97ffcae65..2f3867a58c 100644
--- a/editor/shader_globals_editor.cpp
+++ b/editor/shader_globals_editor.cpp
@@ -30,6 +30,7 @@
#include "shader_globals_editor.h"
#include "editor_node.h"
+#include "servers/rendering/shader_language.h"
static const char *global_var_type_names[RS::GLOBAL_VAR_TYPE_MAX] = {
"bool",