diff options
Diffstat (limited to 'platform')
24 files changed, 157 insertions, 152 deletions
diff --git a/platform/android/detect.py b/platform/android/detect.py index a3ada5cf51..bc67f6e6dc 100644 --- a/platform/android/detect.py +++ b/platform/android/detect.py @@ -205,7 +205,7 @@ def configure(env): env.Append(CPPFLAGS=["-isystem", lib_sysroot + "/usr/include"]) env.Append(CPPFLAGS='-fpic -ffunction-sections -funwind-tables -fstack-protector-strong -fvisibility=hidden -fno-strict-aliasing'.split()) - env.Append(CPPFLAGS='-DNO_STATVFS -DGLES2_ENABLED'.split()) + env.Append(CPPFLAGS='-DNO_STATVFS -DGLES_ENABLED'.split()) env['neon_enabled'] = False if env['android_arch'] == 'x86': diff --git a/platform/android/export/export.cpp b/platform/android/export/export.cpp index 79be1501a7..9945dc599b 100644 --- a/platform/android/export/export.cpp +++ b/platform/android/export/export.cpp @@ -945,16 +945,17 @@ public: public: virtual void get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) { - int api = p_preset->get("graphics/api"); + // Reenable when a GLES 2.0 backend is readded + /*int api = p_preset->get("graphics/api"); if (api == 0) r_features->push_back("etc"); - else - r_features->push_back("etc2"); + else*/ + r_features->push_back("etc2"); } virtual void get_export_options(List<ExportOption> *r_options) { - r_options->push_back(ExportOption(PropertyInfo(Variant::INT, "graphics/api", PROPERTY_HINT_ENUM, "OpenGL ES 2.0,OpenGL ES 3.0"), 1)); + /*r_options->push_back(ExportOption(PropertyInfo(Variant::INT, "graphics/api", PROPERTY_HINT_ENUM, "OpenGL ES 2.0,OpenGL ES 3.0"), 1));*/ r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "graphics/32_bits_framebuffer"), true)); r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "one_click_deploy/clear_previous_install"), true)); r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "custom_package/debug", PROPERTY_HINT_GLOBAL_FILE, "apk"), "")); diff --git a/platform/android/globals/global_defaults.cpp b/platform/android/globals/global_defaults.cpp index c73b578154..0e1c17e9c8 100644 --- a/platform/android/globals/global_defaults.cpp +++ b/platform/android/globals/global_defaults.cpp @@ -31,12 +31,4 @@ #include "project_settings.h" void register_android_global_defaults() { - - /* GLOBAL_DEF("rasterizer.Android/use_fragment_lighting",false); - GLOBAL_DEF("rasterizer.Android/fp16_framebuffer",false); - GLOBAL_DEF("display.Android/driver","GLES2"); - //GLOBAL_DEF("rasterizer.Android/trilinear_mipmap_filter",false); - - ProjectSettings::get_singleton()->set_custom_property_info("display.Android/driver",PropertyInfo(Variant::STRING,"display.Android/driver",PROPERTY_HINT_ENUM,"GLES2")); - */ } diff --git a/platform/android/godot_android.cpp b/platform/android/godot_android.cpp index 9d056bca7c..f9bcbadc24 100644 --- a/platform/android/godot_android.cpp +++ b/platform/android/godot_android.cpp @@ -29,24 +29,23 @@ /*************************************************************************/ #ifdef ANDROID_NATIVE_ACTIVITY -#include <errno.h> -#include <jni.h> - -#include <EGL/egl.h> -#include <GLES2/gl2.h> - #include "engine.h" #include "file_access_android.h" #include "main/main.h" #include "os_android.h" #include "project_settings.h" + +#include <EGL/egl.h> #include <android/log.h> #include <android/sensor.h> #include <android/window.h> #include <android_native_app_glue.h> +#include <errno.h> +#include <jni.h> #include <stdlib.h> #include <string.h> #include <unistd.h> + #define LOGI(...) ((void)__android_log_print(ANDROID_LOG_INFO, "godot", __VA_ARGS__)) #define LOGW(...) ((void)__android_log_print(ANDROID_LOG_WARN, "godot", __VA_ARGS__)) diff --git a/platform/haiku/detect.py b/platform/haiku/detect.py index 50f9783dd2..7c62654ef6 100644 --- a/platform/haiku/detect.py +++ b/platform/haiku/detect.py @@ -67,7 +67,7 @@ def configure(env): ## Flags env.Append(CPPPATH=['#platform/haiku']) - env.Append(CPPFLAGS=['-DUNIX_ENABLED', '-DOPENGL_ENABLED', '-DGLES2_ENABLED', '-DGLES_OVER_GL']) + env.Append(CPPFLAGS=['-DUNIX_ENABLED', '-DOPENGL_ENABLED', '-DGLES_ENABLED', '-DGLES_OVER_GL']) env.Append(CPPFLAGS=['-DMEDIA_KIT_ENABLED']) # env.Append(CCFLAGS=['-DFREETYPE_ENABLED']) env.Append(CPPFLAGS=['-DPTHREAD_NO_RENAME']) # TODO: enable when we have pthread_setname_np diff --git a/platform/haiku/os_haiku.cpp b/platform/haiku/os_haiku.cpp index 0c34e39655..3af111faf3 100644 --- a/platform/haiku/os_haiku.cpp +++ b/platform/haiku/os_haiku.cpp @@ -76,7 +76,7 @@ int OS_Haiku::get_video_driver_count() const { } const char *OS_Haiku::get_video_driver_name(int p_driver) const { - return "GLES2"; + return "GLES3"; } void OS_Haiku::initialize(const VideoMode &p_desired, int p_video_driver, int p_audio_driver) { @@ -106,7 +106,9 @@ void OS_Haiku::initialize(const VideoMode &p_desired, int p_video_driver, int p_ context_gl->initialize(); context_gl->make_current(); - rasterizer = memnew(RasterizerGLES2); + /* Port to GLES 3 rasterizer */ + //rasterizer = memnew(RasterizerGLES2); + #endif visual_server = memnew(VisualServerRaster(rasterizer)); diff --git a/platform/iphone/detect.py b/platform/iphone/detect.py index d426b478bf..4ea358f871 100644 --- a/platform/iphone/detect.py +++ b/platform/iphone/detect.py @@ -163,7 +163,7 @@ def configure(env): env['ENV']['CODESIGN_ALLOCATE'] = '/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate' env.Append(CPPPATH=['#platform/iphone']) - env.Append(CPPFLAGS=['-DIPHONE_ENABLED', '-DUNIX_ENABLED', '-DGLES2_ENABLED', '-DMPC_FIXED_POINT', '-DCOREAUDIO_ENABLED']) + env.Append(CPPFLAGS=['-DIPHONE_ENABLED', '-DUNIX_ENABLED', '-DGLES_ENABLED', '-DMPC_FIXED_POINT', '-DCOREAUDIO_ENABLED']) # TODO: Move that to opus module's config if 'module_opus_enabled' in env and env['module_opus_enabled']: diff --git a/platform/iphone/globals/global_defaults.cpp b/platform/iphone/globals/global_defaults.cpp index 4bdc716d6e..b81e6def3b 100644 --- a/platform/iphone/globals/global_defaults.cpp +++ b/platform/iphone/globals/global_defaults.cpp @@ -31,11 +31,4 @@ #include "project_settings.h" void register_iphone_global_defaults() { - - /*GLOBAL_DEF("rasterizer.iOS/use_fragment_lighting",false); - GLOBAL_DEF("rasterizer.iOS/fp16_framebuffer",false); - GLOBAL_DEF("display.iOS/driver","GLES2"); - ProjectSettings::get_singleton()->set_custom_property_info("display.iOS/driver",PropertyInfo(Variant::STRING,"display.iOS/driver",PROPERTY_HINT_ENUM,"GLES1,GLES2")); - GLOBAL_DEF("display.iOS/use_cadisplaylink",true); - */ } diff --git a/platform/iphone/in_app_store.mm b/platform/iphone/in_app_store.mm index 9efd4b9891..25f4e1e166 100644 --- a/platform/iphone/in_app_store.mm +++ b/platform/iphone/in_app_store.mm @@ -92,6 +92,7 @@ void InAppStore::_bind_methods() { PoolRealArray prices; PoolStringArray ids; PoolStringArray localized_prices; + PoolStringArray currency_codes; for (int i = 0; i < [products count]; i++) { @@ -105,12 +106,14 @@ void InAppStore::_bind_methods() { prices.push_back([product.price doubleValue]); ids.push_back(String::utf8([product.productIdentifier UTF8String])); localized_prices.push_back(String::utf8([product.localizedPrice UTF8String])); + currency_codes.push_back(String::utf8([[[product priceLocale] objectForKey:NSLocaleCurrencyCode] UTF8String])); }; ret["titles"] = titles; ret["descriptions"] = descriptions; ret["prices"] = prices; ret["ids"] = ids; ret["localized_prices"] = localized_prices; + ret["currency_codes"] = currency_codes; PoolStringArray invalid_ids; diff --git a/platform/iphone/os_iphone.cpp b/platform/iphone/os_iphone.cpp index d0865a35b9..62b7d93968 100644 --- a/platform/iphone/os_iphone.cpp +++ b/platform/iphone/os_iphone.cpp @@ -54,7 +54,7 @@ int OSIPhone::get_video_driver_count() const { const char *OSIPhone::get_video_driver_name(int p_driver) const { - return "GLES2"; + return "GLES3"; }; OSIPhone *OSIPhone::get_singleton() { diff --git a/platform/iphone/platform_config.h b/platform/iphone/platform_config.h index 54de66082e..7ff6e7a9a9 100644 --- a/platform/iphone/platform_config.h +++ b/platform/iphone/platform_config.h @@ -28,7 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ #include <alloca.h> -// #define GLES2_INCLUDE_H <ES2/gl.h> + #define GLES3_INCLUDE_H <ES3/gl.h> #define PLATFORM_REFCOUNT diff --git a/platform/javascript/detect.py b/platform/javascript/detect.py index ba0b63a375..8472c3ccab 100644 --- a/platform/javascript/detect.py +++ b/platform/javascript/detect.py @@ -102,14 +102,13 @@ def configure(env): ## Link flags - env.Append(LINKFLAGS=['-s', 'EXTRA_EXPORTED_RUNTIME_METHODS="[\'FS\']"']) - env.Append(LINKFLAGS=['-s', 'USE_WEBGL2=1']) - env.Append(LINKFLAGS=['-s', 'BINARYEN=1']) - # In contrast to asm.js, enabling memory growth on WebAssembly has no - # major performance impact, and causes only a negligible increase in - # memory size. env.Append(LINKFLAGS=['-s', 'ALLOW_MEMORY_GROWTH=1']) + env.Append(LINKFLAGS=['-s', 'USE_WEBGL2=1']) + env.Append(LINKFLAGS=['-s', 'EXTRA_EXPORTED_RUNTIME_METHODS="[\'FS\']"']) + + env.Append(LINKFLAGS=['-s', 'INVOKE_RUN=0']) + env.Append(LINKFLAGS=['-s', 'NO_EXIT_RUNTIME=1']) # TODO: Move that to opus module's config if 'module_opus_enabled' in env and env['module_opus_enabled']: diff --git a/platform/javascript/engine.js b/platform/javascript/engine.js index f3a7c49a95..dc4bdc7efb 100644 --- a/platform/javascript/engine.js +++ b/platform/javascript/engine.js @@ -31,82 +31,101 @@ this.rtenv = null; - var gameInitPromise = null; + var initPromise = null; var unloadAfterInit = true; + var preloadedFiles = []; + + var resizeCanvasOnStart = true; var progressFunc = null; - var pckProgressTracker = {}; + var preloadProgressTracker = {}; var lastProgress = { loaded: 0, total: 0 }; var canvas = null; + var executableName = null; + var locale = null; var stdout = null; var stderr = null; - this.initGame = function(mainPack) { - - if (!gameInitPromise) { - - if (mainPack === undefined) { - if (basePath !== null) { - mainPack = basePath + '.pck'; - } else { - return Promise.reject(new Error("No main pack to load specified")); - } - } - if (basePath === null) - basePath = getBasePath(mainPack); + this.init = function(newBasePath) { - gameInitPromise = Engine.initEngine().then( + if (!initPromise) { + initPromise = Engine.load(newBasePath).then( instantiate.bind(this) ); - var gameLoadPromise = loadPromise(mainPack, pckProgressTracker).then(function(xhr) { return xhr.response; }); - gameInitPromise = Promise.all([gameLoadPromise, gameInitPromise]).then(function(values) { - // resolve with pck - return new Uint8Array(values[0]); - }); - if (unloadAfterInit) - gameInitPromise.then(Engine.unloadEngine); requestAnimationFrame(animateProgress); + if (unloadAfterInit) + initPromise.then(Engine.unloadEngine); } - return gameInitPromise; + return initPromise; }; - function instantiate(initializer) { + function instantiate(wasmBuf) { - var rtenvOpts = { - noInitialRun: true, - thisProgram: getBaseName(basePath), + var rtenvProps = { engine: this, + ENV: {}, }; if (typeof stdout === 'function') - rtenvOpts.print = stdout; + rtenvProps.print = stdout; if (typeof stderr === 'function') - rtenvOpts.printErr = stderr; - if (typeof WebAssembly === 'object' && initializer instanceof ArrayBuffer) { - rtenvOpts.instantiateWasm = function(imports, onSuccess) { - WebAssembly.instantiate(initializer, imports).then(function(result) { - onSuccess(result.instance); - }); - return {}; - }; - } else { - throw new Error("Invalid initializer"); - } + rtenvProps.printErr = stderr; + rtenvProps.instantiateWasm = function(imports, onSuccess) { + WebAssembly.instantiate(wasmBuf, imports).then(function(result) { + onSuccess(result.instance); + }); + return {}; + }; return new Promise(function(resolve, reject) { - rtenvOpts.onRuntimeInitialized = resolve; - rtenvOpts.onAbort = reject; - rtenvOpts.engine.rtenv = Engine.RuntimeEnvironment(rtenvOpts); + rtenvProps.onRuntimeInitialized = resolve; + rtenvProps.onAbort = reject; + rtenvProps.engine.rtenv = Engine.RuntimeEnvironment(rtenvProps); }); } - this.start = function(mainPack) { + this.preloadFile = function(pathOrBuffer, bufferFilename) { + + if (pathOrBuffer instanceof ArrayBuffer) { + pathOrBuffer = new Uint8Array(pathOrBuffer); + } else if (ArrayBuffer.isView(pathOrBuffer)) { + pathOrBuffer = new Uint8Array(pathOrBuffer.buffer); + } + if (pathOrBuffer instanceof Uint8Array) { + preloadedFiles.push({ + name: bufferFilename, + buffer: pathOrBuffer + }); + return Promise.resolve(); + } else if (typeof pathOrBuffer === 'string') { + return loadPromise(pathOrBuffer, preloadProgressTracker).then(function(xhr) { + preloadedFiles.push({ + name: pathOrBuffer, + buffer: xhr.response + }); + }); + } else { + throw Promise.reject("Invalid object for preloading"); + } + }; + + this.start = function() { + + return this.init().then( + Function.prototype.apply.bind(synchronousStart, this, arguments) + ); + }; + + this.startGame = function(mainPack) { - return this.initGame(mainPack).then(synchronousStart.bind(this)); + executableName = getBaseName(mainPack); + return Promise.all([this.init(getBasePath(mainPack)), this.preloadFile(mainPack)]).then( + Function.prototype.apply.bind(synchronousStart, this, []) + ); }; - function synchronousStart(pckView) { - // TODO don't expect canvas when runninng as cli tool + function synchronousStart() { + if (canvas instanceof HTMLCanvasElement) { this.rtenv.canvas = canvas; } else { @@ -141,15 +160,33 @@ ev.preventDefault(); }, false); - this.rtenv.FS.createDataFile('/', this.rtenv.thisProgram + '.pck', pckView, true, true, true); - gameInitPromise = null; - this.rtenv.callMain(); + if (locale) { + this.rtenv.locale = locale; + } else { + this.rtenv.locale = navigator.languages ? navigator.languages[0] : navigator.language; + } + this.rtenv.locale = this.rtenv.locale.split('.')[0]; + this.rtenv.resizeCanvasOnStart = resizeCanvasOnStart; + + this.rtenv.thisProgram = executableName || getBaseName(basePath); + + preloadedFiles.forEach(function(file) { + this.rtenv.FS.createDataFile('/', file.name, new Uint8Array(file.buffer), true, true, true); + }, this); + + preloadedFiles = null; + initPromise = null; + this.rtenv.callMain(arguments); } this.setProgressFunc = function(func) { progressFunc = func; }; + this.setResizeCanvasOnStart = function(enabled) { + resizeCanvasOnStart = enabled; + }; + function animateProgress() { var loaded = 0; @@ -157,7 +194,7 @@ var totalIsValid = true; var progressIsFinal = true; - [loadingFiles, pckProgressTracker].forEach(function(tracker) { + [loadingFiles, preloadProgressTracker].forEach(function(tracker) { Object.keys(tracker).forEach(function(file) { if (!tracker[file].final) progressIsFinal = false; @@ -184,10 +221,20 @@ canvas = elem; }; + this.setExecutableName = function(newName) { + + executableName = newName; + }; + + this.setLocale = function(newLocale) { + + locale = newLocale; + }; + this.setUnloadAfterInit = function(enabled) { - if (enabled && !unloadAfterInit && gameInitPromise) { - gameInitPromise.then(Engine.unloadEngine); + if (enabled && !unloadAfterInit && initPromise) { + initPromise.then(Engine.unloadEngine); } unloadAfterInit = enabled; }; @@ -222,7 +269,7 @@ Engine.RuntimeEnvironment = engine.RuntimeEnvironment; - Engine.initEngine = function(newBasePath) { + Engine.load = function(newBasePath) { if (newBasePath !== undefined) basePath = getBasePath(newBasePath); if (engineLoadPromise === null) { @@ -240,7 +287,7 @@ return engineLoadPromise; }; - Engine.unloadEngine = function() { + Engine.unload = function() { engineLoadPromise = null; }; @@ -259,7 +306,7 @@ if (!file.endsWith('.js')) { xhr.responseType = 'arraybuffer'; } - ['loadstart', 'progress', 'load', 'error', 'timeout', 'abort'].forEach(function(ev) { + ['loadstart', 'progress', 'load', 'error', 'abort'].forEach(function(ev) { xhr.addEventListener(ev, onXHREvent.bind(xhr, resolve, reject, file, tracker)); }); xhr.send(); @@ -274,7 +321,7 @@ this.abort(); return; } else { - loadXHR(resolve, reject, file); + setTimeout(loadXHR.bind(null, resolve, reject, file, tracker), 1000); } } @@ -301,12 +348,11 @@ break; case 'error': - case 'timeout': if (++tracker[file].attempts >= DOWNLOAD_ATTEMPTS_MAX) { tracker[file].final = true; reject(new Error("Failed loading file '" + file + "'")); } else { - loadXHR(resolve, reject, file); + setTimeout(loadXHR.bind(null, resolve, reject, file, tracker), 1000); } break; diff --git a/platform/javascript/javascript_main.cpp b/platform/javascript/javascript_main.cpp index ed4f416cfd..5c5d608524 100644 --- a/platform/javascript/javascript_main.cpp +++ b/platform/javascript/javascript_main.cpp @@ -61,7 +61,6 @@ int main(int argc, char *argv[]) { // run the 'main_after_fs_sync' function /* clang-format off */ EM_ASM( - Module.noExitRuntime = true; FS.mkdir('/userfs'); FS.mount(IDBFS, {}, '/userfs'); FS.syncfs(true, function(err) { diff --git a/platform/javascript/os_javascript.cpp b/platform/javascript/os_javascript.cpp index c416baf0c9..54c0e81421 100644 --- a/platform/javascript/os_javascript.cpp +++ b/platform/javascript/os_javascript.cpp @@ -438,25 +438,23 @@ void OS_JavaScript::initialize(const VideoMode &p_desired, int p_video_driver, i video_mode = p_desired; // can't fulfil fullscreen request due to browser security video_mode.fullscreen = false; - set_window_size(Size2(p_desired.width, p_desired.height)); + /* clang-format off */ + bool resize_canvas_on_start = EM_ASM_INT_V( + return Module.resizeCanvasOnStart; + ); + /* clang-format on */ + if (resize_canvas_on_start) { + set_window_size(Size2(video_mode.width, video_mode.height)); + } else { + Size2 canvas_size = get_window_size(); + video_mode.width = canvas_size.width; + video_mode.height = canvas_size.height; + } - // find locale, emscripten only sets "C" char locale_ptr[16]; /* clang-format off */ - EM_ASM_({ - var locale = ""; - if (Module.locale) { - // best case: server-side script reads Accept-Language early and - // defines the locale to be read here - locale = Module.locale; - } else { - // no luck, use what the JS engine can tell us - // if this turns out not compatible enough, add tests for - // browserLanguage, systemLanguage and userLanguage - locale = navigator.languages ? navigator.languages[0] : navigator.language; - } - locale = locale.split('.')[0]; - stringToUTF8(locale, $0, 16); + EM_ASM_ARGS({ + stringToUTF8(Module.locale, $0, 16); }, locale_ptr); /* clang-format on */ setenv("LANG", locale_ptr, true); diff --git a/platform/osx/detect.py b/platform/osx/detect.py index c24bd98bf6..ff7cf2ad2f 100644 --- a/platform/osx/detect.py +++ b/platform/osx/detect.py @@ -110,7 +110,7 @@ def configure(env): ## Flags env.Append(CPPPATH=['#platform/osx']) - env.Append(CPPFLAGS=['-DOSX_ENABLED', '-DUNIX_ENABLED', '-DGLES2_ENABLED', '-DAPPLE_STYLE_KEYS', '-DCOREAUDIO_ENABLED']) + env.Append(CPPFLAGS=['-DOSX_ENABLED', '-DUNIX_ENABLED', '-DGLES_ENABLED', '-DAPPLE_STYLE_KEYS', '-DCOREAUDIO_ENABLED']) env.Append(LINKFLAGS=['-framework', 'Cocoa', '-framework', 'Carbon', '-framework', 'OpenGL', '-framework', 'AGL', '-framework', 'AudioUnit', '-framework', 'CoreAudio', '-lz', '-framework', 'IOKit', '-framework', 'ForceFeedback']) env.Append(LIBS=['pthread']) diff --git a/platform/osx/os_osx.mm b/platform/osx/os_osx.mm index 2e0e2620be..8703b8ff16 100644 --- a/platform/osx/os_osx.mm +++ b/platform/osx/os_osx.mm @@ -896,7 +896,7 @@ int OS_OSX::get_video_driver_count() const { const char *OS_OSX::get_video_driver_name(int p_driver) const { - return "GLES2"; + return "GLES3"; } void OS_OSX::initialize_core() { @@ -1066,8 +1066,6 @@ void OS_OSX::initialize(const VideoMode &p_desired, int p_video_driver, int p_au zoomed = true; /*** END OSX INITIALIZATION ***/ - /*** END OSX INITIALIZATION ***/ - /*** END OSX INITIALIZATION ***/ bool use_gl2 = p_video_driver != 1; @@ -1077,16 +1075,12 @@ void OS_OSX::initialize(const VideoMode &p_desired, int p_video_driver, int p_au RasterizerGLES3::register_config(); RasterizerGLES3::make_current(); - //rasterizer = instance_RasterizerGLES2(); - //visual_server = memnew( VisualServerRaster(rasterizer) ); - visual_server = memnew(VisualServerRaster); if (get_render_thread_mode() != RENDER_THREAD_UNSAFE) { visual_server = memnew(VisualServerWrapMT(visual_server, get_render_thread_mode() == RENDER_SEPARATE_THREAD)); } visual_server->init(); - // visual_server->cursor_set_visible(false, 0); AudioDriverManager::initialize(p_audio_driver); diff --git a/platform/uwp/app.h b/platform/uwp/app.h index e079fa9c9d..b812512a98 100644 --- a/platform/uwp/app.h +++ b/platform/uwp/app.h @@ -33,6 +33,7 @@ #include <wrl.h> +// ANGLE doesn't provide a specific lib for GLES3, so we keep using GLES2 #include "GLES2/gl2.h" #include "os_uwp.h" diff --git a/platform/uwp/detect.py b/platform/uwp/detect.py index 434c597449..7cc8afff06 100644 --- a/platform/uwp/detect.py +++ b/platform/uwp/detect.py @@ -136,7 +136,7 @@ def configure(env): env.Append(CPPPATH=['#platform/uwp', '#drivers/windows']) env.Append(CCFLAGS=['/DUWP_ENABLED', '/DWINDOWS_ENABLED', '/DTYPED_METHOD_BIND']) - env.Append(CCFLAGS=['/DGLES2_ENABLED', '/DGL_GLEXT_PROTOTYPES', '/DEGL_EGLEXT_PROTOTYPES', '/DANGLE_ENABLED']) + env.Append(CCFLAGS=['/DGLES_ENABLED', '/DGL_GLEXT_PROTOTYPES', '/DEGL_EGLEXT_PROTOTYPES', '/DANGLE_ENABLED']) winver = "0x0602" # Windows 8 is the minimum target for UWP build env.Append(CCFLAGS=['/DWINVER=%s' % winver, '/D_WIN32_WINNT=%s' % winver]) diff --git a/platform/uwp/os_uwp.cpp b/platform/uwp/os_uwp.cpp index acb0ba4bca..978a56f64f 100644 --- a/platform/uwp/os_uwp.cpp +++ b/platform/uwp/os_uwp.cpp @@ -69,7 +69,7 @@ int OSUWP::get_video_driver_count() const { } const char *OSUWP::get_video_driver_name(int p_driver) const { - return "GLES2"; + return "GLES3"; } Size2 OSUWP::get_window_size() const { diff --git a/platform/windows/context_gl_win.cpp b/platform/windows/context_gl_win.cpp index 8571f0dc65..81aa18dd23 100644 --- a/platform/windows/context_gl_win.cpp +++ b/platform/windows/context_gl_win.cpp @@ -27,25 +27,12 @@ /* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ -#if defined(OPENGL_ENABLED) || defined(GLES2_ENABLED) - -// -// C++ Implementation: context_gl_x11 -// -// Description: -// -// +#if defined(OPENGL_ENABLED) || defined(GLES_ENABLED) + // Author: Juan Linietsky <reduzio@gmail.com>, (C) 2008 -// -// Copyright: See COPYING file that comes with this distribution -// -// #include "context_gl_win.h" -//#include "drivers/opengl/glwrapper.h" -//#include "ctxgl_procaddr.h" - #define WGL_CONTEXT_MAJOR_VERSION_ARB 0x2091 #define WGL_CONTEXT_MINOR_VERSION_ARB 0x2092 #define WGL_CONTEXT_FLAGS_ARB 0x2094 diff --git a/platform/windows/context_gl_win.h b/platform/windows/context_gl_win.h index 0059cbc311..5a280b0d08 100644 --- a/platform/windows/context_gl_win.h +++ b/platform/windows/context_gl_win.h @@ -27,18 +27,9 @@ /* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ -#if defined(OPENGL_ENABLED) || defined(GLES2_ENABLED) -// -// C++ Interface: context_gl_x11 -// -// Description: -// -// +#if defined(OPENGL_ENABLED) || defined(GLES_ENABLED) + // Author: Juan Linietsky <reduzio@gmail.com>, (C) 2008 -// -// Copyright: See COPYING file that comes with this distribution -// -// #ifndef CONTEXT_GL_WIN_H #define CONTEXT_GL_WIN_H diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp index 0f62dbb9e8..97a3198d10 100644 --- a/platform/windows/os_windows.cpp +++ b/platform/windows/os_windows.cpp @@ -143,7 +143,7 @@ int OS_Windows::get_video_driver_count() const { } const char *OS_Windows::get_video_driver_name(int p_driver) const { - return "GLES2"; + return "GLES3"; } int OS_Windows::get_audio_driver_count() const { diff --git a/platform/x11/detect.py b/platform/x11/detect.py index 6bd0ac8317..3d07851c4f 100644 --- a/platform/x11/detect.py +++ b/platform/x11/detect.py @@ -236,7 +236,7 @@ def configure(env): env.ParseConfig('pkg-config zlib --cflags --libs') env.Append(CPPPATH=['#platform/x11']) - env.Append(CPPFLAGS=['-DX11_ENABLED', '-DUNIX_ENABLED', '-DOPENGL_ENABLED', '-DGLES2_ENABLED', '-DGLES_OVER_GL']) + env.Append(CPPFLAGS=['-DX11_ENABLED', '-DUNIX_ENABLED', '-DOPENGL_ENABLED', '-DGLES_ENABLED', '-DGLES_OVER_GL']) env.Append(LIBS=['GL', 'pthread']) if (platform.system() == "Linux"): |