summaryrefslogtreecommitdiff
path: root/servers/rendering/renderer_storage.h
diff options
context:
space:
mode:
authorBastiaan Olij <mux213@gmail.com>2022-03-21 22:25:25 +1100
committerBastiaan Olij <mux213@gmail.com>2022-03-31 21:49:42 +1100
commit36defd1179c3600b824feb1362a3216c353c01aa (patch)
tree1d65a856d5e6808cdb3bb6449602a00930f09991 /servers/rendering/renderer_storage.h
parentfc4e9d6299593794489a0271bebf2c528aadcc74 (diff)
Extract global variable, shader and material storage
Diffstat (limited to 'servers/rendering/renderer_storage.h')
-rw-r--r--servers/rendering/renderer_storage.h60
1 files changed, 0 insertions, 60 deletions
diff --git a/servers/rendering/renderer_storage.h b/servers/rendering/renderer_storage.h
index 69659aa62c..b9cd1f55ba 100644
--- a/servers/rendering/renderer_storage.h
+++ b/servers/rendering/renderer_storage.h
@@ -65,7 +65,6 @@ public:
Map<DependencyTracker *, uint32_t> instances;
};
-public:
struct DependencyTracker {
void *userdata = nullptr;
typedef void (*ChangedCallback)(DependencyChangedNotification, DependencyTracker *);
@@ -120,47 +119,6 @@ public:
Set<Dependency *> dependencies;
};
- /* SHADER API */
-
- virtual RID shader_allocate() = 0;
- virtual void shader_initialize(RID p_rid) = 0;
-
- virtual void shader_set_code(RID p_shader, const String &p_code) = 0;
- virtual String shader_get_code(RID p_shader) const = 0;
- virtual void shader_get_param_list(RID p_shader, List<PropertyInfo> *p_param_list) const = 0;
-
- virtual void shader_set_default_texture_param(RID p_shader, const StringName &p_name, RID p_texture, int p_index) = 0;
- virtual RID shader_get_default_texture_param(RID p_shader, const StringName &p_name, int p_index) const = 0;
- virtual Variant shader_get_param_default(RID p_material, const StringName &p_param) const = 0;
-
- virtual RS::ShaderNativeSourceCode shader_get_native_source_code(RID p_shader) const = 0;
-
- /* COMMON MATERIAL API */
-
- virtual RID material_allocate() = 0;
- virtual void material_initialize(RID p_rid) = 0;
-
- virtual void material_set_render_priority(RID p_material, int priority) = 0;
- virtual void material_set_shader(RID p_shader_material, RID p_shader) = 0;
-
- virtual void material_set_param(RID p_material, const StringName &p_param, const Variant &p_value) = 0;
- virtual Variant material_get_param(RID p_material, const StringName &p_param) const = 0;
-
- virtual void material_set_next_pass(RID p_material, RID p_next_material) = 0;
-
- virtual bool material_is_animated(RID p_material) = 0;
- virtual bool material_casts_shadows(RID p_material) = 0;
-
- struct InstanceShaderParam {
- PropertyInfo info;
- int index;
- Variant default_value;
- };
-
- virtual void material_get_instance_shader_parameters(RID p_material, List<InstanceShaderParam> *r_parameters) = 0;
-
- virtual void material_update_dependency(RID p_material, DependencyTracker *p_instance) = 0;
-
/* MESH API */
virtual RID mesh_allocate() = 0;
@@ -491,24 +449,6 @@ public:
virtual void particles_collision_instance_set_transform(RID p_collision_instance, const Transform3D &p_transform) = 0;
virtual void particles_collision_instance_set_active(RID p_collision_instance, bool p_active) = 0;
- /* GLOBAL VARIABLES */
-
- virtual void global_variable_add(const StringName &p_name, RS::GlobalVariableType p_type, const Variant &p_value) = 0;
- virtual void global_variable_remove(const StringName &p_name) = 0;
- virtual Vector<StringName> global_variable_get_list() const = 0;
-
- virtual void global_variable_set(const StringName &p_name, const Variant &p_value) = 0;
- virtual void global_variable_set_override(const StringName &p_name, const Variant &p_value) = 0;
- virtual Variant global_variable_get(const StringName &p_name) const = 0;
- virtual RS::GlobalVariableType global_variable_get_type(const StringName &p_name) const = 0;
-
- virtual void global_variables_load_settings(bool p_load_textures = true) = 0;
- virtual void global_variables_clear() = 0;
-
- virtual int32_t global_variables_instance_allocate(RID p_instance) = 0;
- virtual void global_variables_instance_free(RID p_instance) = 0;
- virtual void global_variables_instance_update(RID p_instance, int p_index, const Variant &p_value) = 0;
-
/* RENDER TARGET */
enum RenderTargetFlags {