System Expression "renderer" Doesn't Detect WebGL2

Bugs will be moved here once resolved.

Post » Thu Jan 26, 2017 9:07 pm

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
ImageImageImage
B
63
S
23
G
78
Posts: 661
Reputation: 44,935

Post » Fri Jan 27, 2017 11:37 am

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.
Scirra Founder
B
398
S
236
G
88
Posts: 24,433
Reputation: 194,635

Post » Fri Jan 27, 2017 3:19 pm

Ashley wrote: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.
ImageImageImage
B
63
S
23
G
78
Posts: 661
Reputation: 44,935


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 5 guests