0 Favourites

System Expression "renderer" Doesn't Detect WebGL2

  • Problem Description

    The system expression "renderer" doesn't return "webgl2" even when it's supported by the browser.

    (This is a minor inconvenience and can be included in the next C2 release.)

    Attach a Capx

    Download the example

    Description of Capx

    Fetches the renderer at the start of the layout and displays it using the text object.

    Steps to Reproduce Bug

    • Run example inside a browser with WebGL2 support (e.g. NW.js v0.20.0)
    • Notice that it returns "webgl" instead of "webgl2"
    • Be concerned about your browser and question if it actually supports webgl2

    Observed Result

    Returns "webgl" instead of the expected "webgl2"

    Expected Result

    It should return "webgl2" if the browser supports it.

    Affected Browsers

    • All browsers with webgl2 support

    Operating System and Service Pack

    Windows 7 everything up to date.

    Construct 2 Version ID

    r242

  • I deliberately did not change this expression in WebGL 2 mode for two reasons:

    • what are you going to do differently if it's supported? Probably nothing - there isn't much different other than slightly improved visual quality in some specific circumstances. So it should not be important to the game logic if WebGL 2 is supported.
    • I assume there are lots of projects out there that do something like "if renderer = "webgl", do some cool effects, otherwise turn them off" (intending this to fall back to canvas2d). If there is a new "webgl2" mode, this will then fail that check, and possibly make the game disable effects when there's no need to. In other words it's a backwards-incompatible change. People hate it when they update C2 and something is broken.

    So there's not much to gain and a lot to lose.

  • Construct 3

    Buy Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Buy Now Construct 3 users don't see these ads
  • I deliberately did not change this expression in WebGL 2 mode for two reasons:

    - what are you going to do differently if it's supported? Probably nothing - there isn't much different other than slightly improved visual quality in some specific circumstances. So it should not be important to the game logic if WebGL 2 is supported.

    - I assume there are lots of projects out there that do something like "if renderer = "webgl", do some cool effects, otherwise turn them off" (intending this to fall back to canvas2d). If there is a new "webgl2" mode, this will then fail that check, and possibly make the game disable effects when there's no need to. In other words it's a backwards-incompatible change. People hate it when they update C2 and something is broken.

    So there's not much to gain and a lot to lose.

    Yeah sounds pretty bad, alrighty then let's keep it as is I guess.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)