Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GLES 2 fallback not working on Desktop Safari #26899

Closed
robgraeber opened this issue Mar 11, 2019 · 15 comments
Closed

GLES 2 fallback not working on Desktop Safari #26899

robgraeber opened this issue Mar 11, 2019 · 15 comments

Comments

@robgraeber
Copy link

Godot version: 3.1 rc2
OS/device including version: Latest OS X

Issue description: When compiling dodge the creep for GLES3 and enabling the GLES2 fallback in project settings, the game fails to load in desktop Safari with the following error:

[Warning] exception thrown: TypeError: undefined is not an object (evaluating 'GLctx.getParameter'),_glGetString@file:///Users/bobby/Downloads/godot-demo-projects-master/2d/dodge_the_creeps/Dodge%20the%20Creeps.js:7:264749 (Dodge the Creeps.js, line 7)
wasm-stub@[wasm code]
<?>.wasm-function[__ZN15RasterizerGLES310initializeEv]@[wasm code]
<?>.wasm-function[__ZN18VisualServerRaster4initEv]@[wasm code]
<?>.wasm-function[__ZN13OS_JavaScript10initializeERKN2OS9VideoModeEii]@[wasm code]
<?>.wasm-function[__ZN4Main6setup2Ey]@[wasm code]
<?>.wasm-function[__ZN4Main5setupEPKciPPcb]@[wasm code]
<?>.wasm-function[_main]@[wasm code]
wasm-stub@[wasm code]
jj@[native code]
file:///Users/bobby/Downloads/godot-demo-projects-master/2d/dodge_the_creeps/Dodge%20the%20Creeps.js:7:316260
callMain@file:///Users/bobby/Downloads/godot-demo-projects-master/2d/dodge_the_creeps/Dodge%20the%20Creeps.js:7:319971
synchronousStart@file:///Users/bobby/Downloads/godot-demo-projects-master/2d/dodge_the_creeps/Dodge%20the%20Creeps.js:216:23
apply@[native code]
promiseReactionJob@[native code]
[Error] undefined is not an object (evaluating 'GLctx.getParameter')
	displayFailureNotice (Dodge the Creeps.html:241)
	promiseReactionJob
[Warning] **ERROR**: Condition ' !_start_success ' is true. returned: false (Dodge the Creeps.js, line 7)
[Warning]    At: main/main.cpp:1277:start() - Condition ' !_start_success ' is true. returned: false (Dodge the Creeps.js, line 7)

Steps to reproduce: Run dodge the creeps and enable the GLES2 fallback in project settings.

@akien-mga
Copy link
Member

Does it work if you export GLES2 directly instead of using GLES3 + fallback?

@robgraeber
Copy link
Author

Yeah GLES2 works if compiled directly, will post a lot tonight.

@akien-mga akien-mga assigned akien-mga and hpvb and unassigned akien-mga and reduz Mar 11, 2019
@akien-mga
Copy link
Member

Did it use to work in previous releases? Especially prior to beta 11 where I reworked the fallback system with #26523 (and then #26633 in RC 1).

If not, it might just be that the fallback system never worked for JS. CC @hpvb @eska014

@robgraeber
Copy link
Author

@akien-mga I tried compiling Dodge The Creeps with 3.1 beta 10 and it had the same issue

@akien-mga
Copy link
Member

Thanks, so I didn't break it :D
It might never have worked in the first place, @eska014 will have to review/fix @hpvb's fallback code for HTML5.

@akien-mga akien-mga modified the milestones: 3.1, 3.2 Apr 8, 2019
@clayjohn clayjohn removed this from the 3.2 milestone Jan 13, 2020
@clayjohn
Copy link
Member

Is this still reproducible in 3.2?

It seems important to fix, but likely won't make it in time for 3.2. Pushing back to 3.2.1.

@clayjohn clayjohn added the cherrypick:3.x Considered for cherry-picking into a future 3.x release label Jan 13, 2020
@kfo2010
Copy link

kfo2010 commented Feb 29, 2020

had same issue in 3.2

@Zappo-II
Copy link

Can confirm, same for me...

undefined is not an object (evaluating 'GLctx.getParameter')

$ godot --version
3.2.stable.official

Checked on:

  • MACOSX 10.15.3 / Safari 13.05
  • IOS 13.1 (17A844) / Safari

Interesting Details:

  • On IOS if Enabling Experimental Features (WEBGPU / WEBGL2) of IOS Safari my Project will "somehow" load and do something (play jittered sound, react to touch input), but won't show anything on screen...
  • Certainly my project IS working on common browsers on other OSs...
  • It's also working on MACOS in non Safari Browsers (Chromium, ...)

@thomcraver
Copy link

Can confirm for my son's 3D projects, as well. HTML5 version works on the Linux and Windows - all browsers. Macbooks have issues in Chrome, Safari and FireFox. Intro screen plays. Start button can be clicked, next scene loads music, but nothing else. Dark gray screen.

Same behavior with native MacOS.

GL3, GL2 fallback.

@Calinou
Copy link
Member

Calinou commented May 14, 2020

I don't think the GLES2 fallback was ever fully implemented for HTML5, or was it?

I'd suggest switching the project's renderer to use GLES2 directly.

@triptych
Copy link

triptych commented Jun 5, 2020

This is still happening
undefined is not an object (evaluating 'GLctx.getParameter')
Basic godot game https://musing-brattain-f39868.netlify.app/
Desktop Safari --> Version 13.1.1 (14609.2.9.1.3)
Model Name: MacBook Pro
Model Identifier: MacBookPro14,3
Processor Name: Intel Core i7
Processor Speed: 3.1 GHz
Number of Processors: 1
Total Number of Cores: 4
L2 Cache (per Core): 256 KB
L3 Cache: 8 MB
Hyper-Threading Technology: Enabled
Memory: 16 GB
Boot ROM Version: 207.0.0.0.0

@royalstream
Copy link

royalstream commented Jan 10, 2021

This was happening to me but I was mistakenly using GLES3 in the Project Settings.
As soon as I changed it to GLES2 it worked fine under Safari in both macOS and iOS.
YMMV

Version: Godot 3.2.4 beta

@alexzheng
Copy link

Still happening in Godot 3.2.4 beta6.

@akien-mga akien-mga removed the cherrypick:3.x Considered for cherry-picking into a future 3.x release label Mar 18, 2021
@akien-mga akien-mga assigned Faless and unassigned hpvb and leonkrause Mar 18, 2021
@mrimvo
Copy link

mrimvo commented Apr 5, 2021

Still happens in Godot 3.3 RC6 for my project, which got fallback_to_gles2 enabled.

@akien-mga
Copy link
Member

Fixed by #47659.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests