mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +00:00
Discern between virtual and abstract class bindings
* Previous "virtual" classes (which can't be instantiated) are not corretly named "abstract". * Added a new "virtual" category for classes, they can't be instantiated from the editor, but can be inherited from script and extensions. * Converted a large amount of classes from "abstract" to "virtual" where it makes sense. Most classes that make sense have been converted. Missing: * Physics servers * VideoStream * Script* classes. which will go in a separate PR due to the complexity involved.
This commit is contained in:
parent
741bbb9d7c
commit
6f51eca1e3
90 changed files with 1075 additions and 272 deletions
|
@ -88,6 +88,37 @@ void Material::inspect_native_shader_code() {
|
|||
}
|
||||
}
|
||||
|
||||
RID Material::get_shader_rid() const {
|
||||
RID ret;
|
||||
if (GDVIRTUAL_REQUIRED_CALL(_get_shader_rid, ret)) {
|
||||
return ret;
|
||||
}
|
||||
return RID();
|
||||
}
|
||||
Shader::Mode Material::get_shader_mode() const {
|
||||
Shader::Mode ret;
|
||||
if (GDVIRTUAL_REQUIRED_CALL(_get_shader_mode, ret)) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
return Shader::MODE_MAX;
|
||||
}
|
||||
|
||||
bool Material::_can_do_next_pass() const {
|
||||
bool ret;
|
||||
if (GDVIRTUAL_CALL(_can_do_next_pass, ret)) {
|
||||
return ret;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
bool Material::_can_use_render_priority() const {
|
||||
bool ret;
|
||||
if (GDVIRTUAL_CALL(_can_use_render_priority, ret)) {
|
||||
return ret;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void Material::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("set_next_pass", "next_pass"), &Material::set_next_pass);
|
||||
ClassDB::bind_method(D_METHOD("get_next_pass"), &Material::get_next_pass);
|
||||
|
@ -103,6 +134,11 @@ void Material::_bind_methods() {
|
|||
|
||||
BIND_CONSTANT(RENDER_PRIORITY_MAX);
|
||||
BIND_CONSTANT(RENDER_PRIORITY_MIN);
|
||||
|
||||
GDVIRTUAL_BIND(_get_shader_rid)
|
||||
GDVIRTUAL_BIND(_get_shader_mode)
|
||||
GDVIRTUAL_BIND(_can_do_next_pass)
|
||||
GDVIRTUAL_BIND(_can_use_render_priority)
|
||||
}
|
||||
|
||||
Material::Material() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue