diff options
author | Juan Linietsky <reduzio@gmail.com> | 2017-03-20 23:31:41 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2017-03-21 08:42:06 -0300 |
commit | b5a06cecffeda556438b33807d766f4823623fee (patch) | |
tree | f5171b0e772f8cc31ee0be546975ca3e8fd86765 /platform/android | |
parent | 33a2c5def0f55ef67196e35ac3309d3f9b70d967 (diff) |
Export template management dialog.
Missing download (need to discuss this!)
Diffstat (limited to 'platform/android')
-rw-r--r-- | platform/android/SCsub | 4 | ||||
-rw-r--r-- | platform/android/detect.py | 4 | ||||
-rw-r--r-- | platform/android/java_glue.cpp | 4 | ||||
-rw-r--r-- | platform/android/os_android.cpp | 34 | ||||
-rw-r--r-- | platform/android/os_android.h | 5 |
5 files changed, 23 insertions, 28 deletions
diff --git a/platform/android/SCsub b/platform/android/SCsub index e8536953a3..02a8c3bc42 100644 --- a/platform/android/SCsub +++ b/platform/android/SCsub @@ -19,8 +19,8 @@ android_files = [ 'android_native_app_glue.c', 'java_glue.cpp', 'cpu-features.c', - 'java_class_wrapper.cpp' - 'power_android.cpp' + 'java_class_wrapper.cpp', +# 'power_android.cpp' ] # env.Depends('#core/math/vector3.h', 'vector3_psp.h') diff --git a/platform/android/detect.py b/platform/android/detect.py index d1073e0c7b..d1b33fe649 100644 --- a/platform/android/detect.py +++ b/platform/android/detect.py @@ -26,7 +26,7 @@ def get_opts(): return [ ('ANDROID_NDK_ROOT', 'the path to Android NDK', os.environ.get("ANDROID_NDK_ROOT", 0)), - ('ndk_platform', 'compile for platform: (android-<api> , example: android-14)', "android-14"), + ('ndk_platform', 'compile for platform: (android-<api> , example: android-18)', "android-18"), ('android_arch', 'select compiler architecture: (armv7/armv6/x86)', "armv7"), ('android_neon', 'enable neon (armv7 only)', "yes"), ('android_stl', 'enable STL support in android port (for modules)', "no") @@ -198,7 +198,7 @@ def configure(env): env.Append(LIBS=['OpenSLES']) env.Append(LIBS=['EGL', 'OpenSLES', 'android']) - env.Append(LIBS=['log', 'GLESv1_CM', 'GLESv2', 'z']) + env.Append(LIBS=['log', 'GLESv1_CM', 'GLESv2', 'GLESv3','z']) if (sys.platform.startswith("darwin")): env['SHLIBSUFFIX'] = '.so' diff --git a/platform/android/java_glue.cpp b/platform/android/java_glue.cpp index 4016b44434..3229c4c993 100644 --- a/platform/android/java_glue.cpp +++ b/platform/android/java_glue.cpp @@ -350,7 +350,7 @@ Variant _jobject_to_variant(JNIEnv *env, jobject obj) { jobjectArray arr = (jobjectArray)obj; int objCount = env->GetArrayLength(arr); - Array varr(true); + Array varr; for (int i = 0; i < objCount; i++) { jobject jobj = env->GetObjectArrayElement(arr, i); @@ -364,7 +364,7 @@ Variant _jobject_to_variant(JNIEnv *env, jobject obj) { if (name == "java.util.HashMap" || name == "org.godotengine.godot.Dictionary") { - Dictionary ret(true); + Dictionary ret; jclass oclass = c; jmethodID get_keys = env->GetMethodID(oclass, "get_keys", "()[Ljava/lang/String;"); jobjectArray arr = (jobjectArray)env->CallObjectMethod(obj, get_keys); diff --git a/platform/android/os_android.cpp b/platform/android/os_android.cpp index 705f0df46e..1484ccfb8c 100644 --- a/platform/android/os_android.cpp +++ b/platform/android/os_android.cpp @@ -30,13 +30,13 @@ #include "core/global_config.h" #include "core/io/file_access_buffered_fa.h" -#include "drivers/gles2/rasterizer_gles2.h" +#include "drivers/gles3/rasterizer_gles3.h" #include "drivers/unix/dir_access_unix.h" #include "drivers/unix/file_access_unix.h" #include "file_access_android.h" #include "main/main.h" #include "servers/visual/visual_server_raster.h" -#include "servers/visual/visual_server_wrap_mt.h" +//#include "servers/visual/visual_server_wrap_mt.h" #ifdef ANDROID_NATIVE_ACTIVITY #include "dir_access_android.h" @@ -125,18 +125,14 @@ void OS_Android::initialize(const VideoMode &p_desired, int p_video_driver, int AudioDriverManager::add_driver(&audio_driver_android); - RasterizerGLES2 *rasterizer_gles22 = memnew(RasterizerGLES2(false, use_reload_hooks, false, use_reload_hooks)); - if (gl_extensions) - rasterizer_gles22->set_extensions(gl_extensions); - rasterizer = rasterizer_gles22; + RasterizerGLES3::register_config(); + RasterizerGLES3::make_current(); - rasterizer->set_force_16_bits_fbo(use_16bits_fbo); - - visual_server = memnew(VisualServerRaster(rasterizer)); - if (get_render_thread_mode() != RENDER_THREAD_UNSAFE) { + visual_server = memnew(VisualServerRaster); +/* if (get_render_thread_mode() != RENDER_THREAD_UNSAFE) { visual_server = memnew(VisualServerWrapMT(visual_server, false)); - }; + };*/ visual_server->init(); visual_server->cursor_set_visible(false, 0); @@ -156,7 +152,7 @@ void OS_Android::initialize(const VideoMode &p_desired, int p_video_driver, int input = memnew(InputDefault); input->set_fallback_mapping("Default Android Gamepad"); - power_manager = memnew(power_android); + //power_manager = memnew(power_android); } void OS_Android::set_main_loop(MainLoop *p_main_loop) { @@ -227,7 +223,7 @@ void OS_Android::print(const char *p_format, ...) { void OS_Android::alert(const String &p_alert, const String &p_title) { - print("ALERT: %s\n", p_alert.utf8().get_data()); + //print("ALERT: %s\n", p_alert.utf8().get_data()); if (alert_func) alert_func(p_alert, p_title); } @@ -631,8 +627,8 @@ void OS_Android::reload_gfx() { if (gfx_init_func) gfx_init_func(gfx_init_ud, use_gl2); - if (rasterizer) - rasterizer->reload_vram(); +// if (rasterizer) +// rasterizer->reload_vram(); } Error OS_Android::shell_open(String p_uri) { @@ -750,9 +746,9 @@ void OS_Android::native_video_stop() { void OS_Android::set_context_is_16_bits(bool p_is_16) { - use_16bits_fbo = p_is_16; - if (rasterizer) - rasterizer->set_force_16_bits_fbo(p_is_16); +// use_16bits_fbo = p_is_16; +// if (rasterizer) +// rasterizer->set_force_16_bits_fbo(p_is_16); } void OS_Android::joy_connection_changed(int p_device, bool p_connected, String p_name) { @@ -780,7 +776,7 @@ OS_Android::OS_Android(GFXInitFunc p_gfx_init_func, void *p_gfx_init_ud, OpenURI main_loop = NULL; last_id = 1; gl_extensions = NULL; - rasterizer = NULL; +// rasterizer = NULL; use_gl2 = false; open_uri_func = p_open_uri_func; diff --git a/platform/android/os_android.h b/platform/android/os_android.h index 2c0be8e3c1..ad438d8626 100644 --- a/platform/android/os_android.h +++ b/platform/android/os_android.h @@ -35,7 +35,7 @@ #include "main/input_default.h" #include "os/input.h" #include "os/main_loop.h" -#include "power_android.h" +//#include "power_android.h" #include "servers/audio_server.h" #include "servers/physics/physics_server_sw.h" #include "servers/physics_2d/physics_2d_server_sw.h" @@ -104,7 +104,6 @@ private: bool use_16bits_fbo; - Rasterizer *rasterizer; VisualServer *visual_server; PhysicsServer *physics_server; Physics2DServer *physics_2d_server; @@ -141,7 +140,7 @@ private: SetKeepScreenOnFunc set_keep_screen_on_func; AlertFunc alert_func; - power_android *power_manager; + //power_android *power_manager; public: // functions used by main to initialize/deintialize the OS |