summaryrefslogtreecommitdiff
path: root/platform/iphone
diff options
context:
space:
mode:
Diffstat (limited to 'platform/iphone')
-rw-r--r--platform/iphone/export/export.cpp14
-rw-r--r--platform/iphone/gl_view.mm2
-rw-r--r--platform/iphone/ios.mm2
-rw-r--r--platform/iphone/os_iphone.cpp7
4 files changed, 20 insertions, 5 deletions
diff --git a/platform/iphone/export/export.cpp b/platform/iphone/export/export.cpp
index a5efae8678..6ae2a0692d 100644
--- a/platform/iphone/export/export.cpp
+++ b/platform/iphone/export/export.cpp
@@ -80,7 +80,15 @@ public:
void EditorExportPlatformIOS::get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) {
- // what does this need to do?
+ if (p_preset->get("texture_format/s3tc")) {
+ r_features->push_back("s3tc");
+ }
+ if (p_preset->get("texture_format/etc")) {
+ r_features->push_back("etc");
+ }
+ if (p_preset->get("texture_format/etc2")) {
+ r_features->push_back("etc2");
+ }
}
void EditorExportPlatformIOS::get_export_options(List<ExportOption> *r_options) {
@@ -98,6 +106,10 @@ void EditorExportPlatformIOS::get_export_options(List<ExportOption> *r_options)
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "application/copyright"), ""));
r_options->push_back(ExportOption(PropertyInfo(Variant::INT, "application/bits_mode", PROPERTY_HINT_ENUM, "Fat (32 & 64 bits),64 bits,32 bits"), 1));
+ r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "texture_format/s3tc"), false));
+ r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "texture_format/etc"), false));
+ r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "texture_format/etc2"), true));
+
/* probably need some more info */
}
diff --git a/platform/iphone/gl_view.mm b/platform/iphone/gl_view.mm
index 4b137b7ffa..f2778e8165 100644
--- a/platform/iphone/gl_view.mm
+++ b/platform/iphone/gl_view.mm
@@ -29,8 +29,8 @@
/*************************************************************************/
#import "gl_view.h"
-#include "core/project_settings.h"
#include "core/os/keyboard.h"
+#include "core/project_settings.h"
#include "os_iphone.h"
#include "servers/audio_server.h"
diff --git a/platform/iphone/ios.mm b/platform/iphone/ios.mm
index e9c164393b..6c95903241 100644
--- a/platform/iphone/ios.mm
+++ b/platform/iphone/ios.mm
@@ -36,7 +36,7 @@ void iOS::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_rate_url", "app_id"), &iOS::get_rate_url);
};
-void iOS::alert(const char* p_alert, const char* p_title) {
+void iOS::alert(const char *p_alert, const char *p_title) {
UIAlertView *alert = [[[UIAlertView alloc] initWithTitle:[NSString stringWithUTF8String:p_title] message:[NSString stringWithUTF8String:p_alert] delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil, nil] autorelease];
[alert show];
}
diff --git a/platform/iphone/os_iphone.cpp b/platform/iphone/os_iphone.cpp
index 1329c94198..cb5c022764 100644
--- a/platform/iphone/os_iphone.cpp
+++ b/platform/iphone/os_iphone.cpp
@@ -109,7 +109,6 @@ void OSIPhone::initialize(const VideoMode &p_desired, int p_video_driver, int p_
RasterizerGLES3::register_config();
RasterizerGLES3::make_current();
- RasterizerStorageGLES3::system_fbo = gl_view_base_fb;
visual_server = memnew(VisualServerRaster());
/*
@@ -122,6 +121,9 @@ void OSIPhone::initialize(const VideoMode &p_desired, int p_video_driver, int p_
visual_server->init();
visual_server->cursor_set_visible(false, 0);
+ // reset this to what it should be, it will have been set to 0 after visual_server->init() is called
+ RasterizerStorageGLES3::system_fbo = gl_view_base_fb;
+
audio_driver = memnew(AudioDriverIphone);
audio_driver->set_singleton();
audio_driver->init();
@@ -434,7 +436,8 @@ bool OSIPhone::can_draw() const {
int OSIPhone::set_base_framebuffer(int p_fb) {
- RasterizerStorageGLES3::system_fbo = gl_view_base_fb;
+ // gl_view_base_fb has not been updated yet
+ RasterizerStorageGLES3::system_fbo = p_fb;
return 0;
};