summaryrefslogtreecommitdiff
path: root/scene/resources/shader.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/resources/shader.cpp')
-rw-r--r--scene/resources/shader.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/scene/resources/shader.cpp b/scene/resources/shader.cpp
index 47f6d673ae..a62e7ded16 100644
--- a/scene/resources/shader.cpp
+++ b/scene/resources/shader.cpp
@@ -31,8 +31,8 @@
#include "shader.h"
#include "core/os/file_access.h"
#include "scene/scene_string_names.h"
-#include "servers/visual/shader_language.h"
-#include "servers/visual_server.h"
+#include "servers/rendering/shader_language.h"
+#include "servers/rendering_server.h"
#include "texture.h"
Shader::Mode Shader::get_mode() const {
@@ -54,7 +54,7 @@ void Shader::set_code(const String &p_code) {
mode = MODE_SPATIAL;
}
- VisualServer::get_singleton()->shader_set_code(shader, p_code);
+ RenderingServer::get_singleton()->shader_set_code(shader, p_code);
params_cache_dirty = true;
emit_changed();
@@ -63,7 +63,7 @@ void Shader::set_code(const String &p_code) {
String Shader::get_code() const {
_update_shader();
- return VisualServer::get_singleton()->shader_get_code(shader);
+ return RenderingServer::get_singleton()->shader_get_code(shader);
}
void Shader::get_param_list(List<PropertyInfo> *p_params) const {
@@ -71,7 +71,7 @@ void Shader::get_param_list(List<PropertyInfo> *p_params) const {
_update_shader();
List<PropertyInfo> local;
- VisualServer::get_singleton()->shader_get_param_list(shader, &local);
+ RenderingServer::get_singleton()->shader_get_param_list(shader, &local);
params_cache.clear();
params_cache_dirty = false;
@@ -104,10 +104,10 @@ void Shader::set_default_texture_param(const StringName &p_param, const Ref<Text
if (p_texture.is_valid()) {
default_textures[p_param] = p_texture;
- VS::get_singleton()->shader_set_default_texture_param(shader, p_param, p_texture->get_rid());
+ RS::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());
+ RS::get_singleton()->shader_set_default_texture_param(shader, p_param, RID());
}
emit_changed();
@@ -166,13 +166,13 @@ void Shader::_bind_methods() {
Shader::Shader() {
mode = MODE_SPATIAL;
- shader = VisualServer::get_singleton()->shader_create();
+ shader = RenderingServer::get_singleton()->shader_create();
params_cache_dirty = true;
}
Shader::~Shader() {
- VisualServer::get_singleton()->free(shader);
+ RenderingServer::get_singleton()->free(shader);
}
////////////