The Godot Q&A is currently undergoing maintenance!

Your ability to ask and answer questions is temporarily disabled. You can browse existing threads in read-only mode.

We are working on bringing this community platform back to its full functionality, stay tuned for updates.

godotengine.org | Twitter

+1 vote

Good day.

I'm running a test using a web server (Uniform Server). I cannot get the game to run on GLES3. GLES2 works fine but you get the GLES2 limiations with it using WebGL 1.0. I'd really like to use GLES3 with WebGL 2.0.

I get the:

Cannot read property 'getParameter' of undefined

What is the cause of this issue? I'm testing on Chrome, Firefox and Opera

in Engine by (15 points)

This is the console log error from the browser.

   index.js:7 The AudioContext was not allowed to start. It must be resumed (or created) after a user gesture on the page. https://goo.gl/7K7WLu
    RuntimeEnvironment.ASM_CONSTS @ index.js:7
    index.js:7 exception thrown: TypeError: Cannot read property 'getParameter' of undefined,TypeError: Cannot read property 'getParameter' of undefined
        at _glGetString (http://localhost/index.js:7:264742)
        at __ZN15RasterizerGLES310initializeEv (wasm-function[41579]:0x7edb20)
        at __ZN18VisualServerRaster4initEv (wasm-function[40145]:0x77b45f)
        at __ZN13OS_JavaScript10initializeERKN2OS9VideoModeEii (wasm-function[42562]:0x839430)
        at __ZN4Main6setup2Ey (wasm-function[36467]:0x65dc2a)
        at __ZN4Main5setupEPKciPPcb (wasm-function[36469]:0x662d53)
        at _main (wasm-function[19712]:0x40336e)
        at Object.RuntimeEnvironment.Module._main (http://localhost/index.js:7:316091)
        at Object.callMain (http://localhost/index.js:7:319807)
        at Engine.synchronousStart (http://localhost/index.js:216:15)
    callMain @ index.js:7
    (index):241 Cannot read property 'getParameter' of undefined
    displayFailureNotice @ (index):241
    index.js:7 **ERROR**: Condition ' !_start_success ' is true. returned: false
    put_char @ index.js:7
    index.js:7    At: main/main.cpp:1278:start() - Condition ' !_start_success ' is true. returned: false
    put_char @ index.js:7
    index.js:7 78
    index.js:7 78
    abort @ index.js:7
    index.js:7 Uncaught abort(78). Build with -s ASSERTIONS=1 for more info.
    index.js:7 101
    index.js:7 101
    abort @ index.js:7
    index.js:7 Uncaught abort(101). Build with -s ASSERTIONS=1 for more info.
    index.js:7 101
    index.js:7 101
    abort @ index.js:7
    index.js:7 Uncaught abort(101). Build with -s ASSERTIONS=1 for more info.
    index.js:7 101
    index.js:7 101
    abort @ index.js:7
    index.js:7 Uncaught abort(101). Build with -s ASSERTIONS=1 for more info.
    index.js:7 101
    index.js:7 101
    abort @ index.js:7
    index.js:7 Uncaught abort(101). Build with -s ASSERTIONS=1 for more info.

1 Answer

+1 vote

As you can read here:
https://docs.godotengine.org/en/stable/getting_started/workflow/export/exporting_for_web.html

.. GLES3 is mapped to WebGL2 and its use is not recommended. One reason is that Safari and Edge don't support it. Which browser did you use for testing?

So I propose that you stick with GLES2 -> WebGL1 when you want to target HTML.

by (3,370 points)

Thanks for replying.
As mentioned in my original post. Tested on Chrome, Opera and Firefox.

To be honest I actually don't really care about support for Safari and Edge for the time being. It still doesn't work in the above mentioned browsers.

I've read that question too, it's was confusing that WebGl2 is implemented into godot, however it does not work... anywhere... my question is what's the point of having it be implemented in the first place if it doesn't work? Or is it something that's just there for testing and benchmarks and it's going to be properly implemented somewhere down the roadmap?

Thanks.

Then it is only Opera that is incompatible (as it is based on Webkit like Safari).

I can just guess that it was implemented together with introducing GLES3 for Godot 3. But later given up because to many problems arose and WebGL2 will anyway be removed from Godot 4 because OpenGL3 will be replaced by Vulkan.

I propose that you create your project in OpenGL2/WebGL1 (if you decide to continue to use Godot) and then move up to the Vulkan based browser support when it gets available some time after Godot 4 is released.
https://en.wikipedia.org/wiki/WebGPU

Although there's no fixed date for Godot 4 release and especially not for some WebGPU Export template.

That aside, Godot is open source. If you don't want to miss WebGL2 then you could debug & update that Godot export template yourself and contribute it to the community.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.