You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-12 13:20:55 +00:00
CompositorEffect should use GDVIRTUAL_CALL() so it works with GDExtension
This commit is contained in:
@@ -85,6 +85,10 @@ void CompositorEffect::_validate_property(PropertyInfo &p_property) const {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CompositorEffect::_call_render_callback(int p_effect_callback_type, const RenderData *p_render_data) {
|
||||||
|
GDVIRTUAL_CALL(_render_callback, p_effect_callback_type, p_render_data);
|
||||||
|
}
|
||||||
|
|
||||||
void CompositorEffect::set_enabled(bool p_enabled) {
|
void CompositorEffect::set_enabled(bool p_enabled) {
|
||||||
enabled = p_enabled;
|
enabled = p_enabled;
|
||||||
if (rid.is_valid()) {
|
if (rid.is_valid()) {
|
||||||
@@ -105,7 +109,7 @@ void CompositorEffect::set_effect_callback_type(EffectCallbackType p_callback_ty
|
|||||||
if (rid.is_valid()) {
|
if (rid.is_valid()) {
|
||||||
RenderingServer *rs = RenderingServer::get_singleton();
|
RenderingServer *rs = RenderingServer::get_singleton();
|
||||||
ERR_FAIL_NULL(rs);
|
ERR_FAIL_NULL(rs);
|
||||||
rs->compositor_effect_set_callback(rid, RenderingServer::CompositorEffectCallbackType(effect_callback_type), Callable(this, "_render_callback"));
|
rs->compositor_effect_set_callback(rid, RenderingServer::CompositorEffectCallbackType(effect_callback_type), callable_mp(this, &CompositorEffect::_call_render_callback));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -65,6 +65,8 @@ protected:
|
|||||||
static void _bind_methods();
|
static void _bind_methods();
|
||||||
void _validate_property(PropertyInfo &p_property) const;
|
void _validate_property(PropertyInfo &p_property) const;
|
||||||
|
|
||||||
|
void _call_render_callback(int p_effect_callback_type, const RenderData *p_render_data);
|
||||||
|
|
||||||
GDVIRTUAL2(_render_callback, int, const RenderData *)
|
GDVIRTUAL2(_render_callback, int, const RenderData *)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|||||||
Reference in New Issue
Block a user