Merge pull request #65541 from clayjohn/renderer-setting
Split rendering driver project setting into renderer_name and rendering_driver
This commit is contained in:
@@ -89,12 +89,12 @@
|
||||
|
||||
// FIXME: Add Vulkan support via MoltenVK. Add fallback code back?
|
||||
|
||||
// Create GL ES 2 context
|
||||
if (GLOBAL_GET("rendering/driver/driver_name") == "opengl3") {
|
||||
context = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES2];
|
||||
NSLog(@"Setting up an OpenGL ES 2.0 context.");
|
||||
// Create GL ES 3 context
|
||||
if (GLOBAL_GET("rendering/renderer/rendering_method") == "gl_compatibility") {
|
||||
context = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES3];
|
||||
NSLog(@"Setting up an OpenGL ES 3.0 context.");
|
||||
if (!context) {
|
||||
NSLog(@"Failed to create OpenGL ES 2.0 context!");
|
||||
NSLog(@"Failed to create OpenGL ES 3.0 context!");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ DisplayServerIOS::DisplayServerIOS(const String &p_rendering_driver, WindowMode
|
||||
// Note that we should be checking "opengl3" as the driver, might never enable this seeing OpenGL is deprecated on iOS
|
||||
// We are hardcoding the rendering_driver to "vulkan" down below
|
||||
|
||||
if (rendering_driver == "opengl_es") {
|
||||
if (rendering_driver == "opengl3") {
|
||||
bool gl_initialization_error = false;
|
||||
|
||||
// FIXME: Add Vulkan support via MoltenVK. Add fallback code back?
|
||||
@@ -163,7 +163,7 @@ Vector<String> DisplayServerIOS::get_rendering_drivers_func() {
|
||||
drivers.push_back("vulkan");
|
||||
#endif
|
||||
#if defined(GLES3_ENABLED)
|
||||
drivers.push_back("opengl_es");
|
||||
drivers.push_back("opengl3");
|
||||
#endif
|
||||
|
||||
return drivers;
|
||||
|
||||
@@ -34,7 +34,6 @@
|
||||
#include "editor/editor_node.h"
|
||||
|
||||
void EditorExportPlatformIOS::get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) const {
|
||||
String driver = ProjectSettings::get_singleton()->get("rendering/driver/driver_name");
|
||||
// Vulkan and OpenGL ES 3.0 both mandate ETC2 support.
|
||||
r_features->push_back("etc2");
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@ static const float earth_gravity = 9.80665;
|
||||
|
||||
if ([driverName isEqualToString:@"vulkan"]) {
|
||||
layer = [GodotMetalLayer layer];
|
||||
} else if ([driverName isEqualToString:@"opengl_es"]) {
|
||||
} else if ([driverName isEqualToString:@"opengl3"]) {
|
||||
if (@available(iOS 13, *)) {
|
||||
NSLog(@"OpenGL ES is deprecated on iOS 13");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user