-Remove harcoded opengl extension testing from OS, ask rasterizer instead.

-Fixed a bug where etc textures were imported broken
This commit is contained in:
Juan Linietsky
2019-02-26 11:58:47 -03:00
parent 3299045988
commit 5eeb06ffd1
14 changed files with 41 additions and 18 deletions

View File

@ -88,8 +88,21 @@ Physics2DServer *_createGodotPhysics2DCallback() {
return Physics2DServerWrapMT::init_server<Physics2DServerSW>();
}
static bool has_server_feature_callback(const String &p_feature) {
if (VisualServer::get_singleton()) {
if (VisualServer::get_singleton()->has_os_feature(p_feature)) {
return true;
}
}
return false;
}
void register_server_types() {
OS::get_singleton()->set_has_server_feature_callback(has_server_feature_callback);
ClassDB::register_virtual_class<VisualServer>();
ClassDB::register_class<AudioServer>();
ClassDB::register_virtual_class<PhysicsServer>();