Skip to content

Conversation

Spaxe
Copy link

@Spaxe Spaxe commented Apr 12, 2017

Hello,

This is a set of changes to get WebGL 2.0 going in glsl-sandbox. You can see the result here: https://spaxe.github.io/glsl-sandbox/

Caveats:

  • Fragment Shader must be written with #version 300 es. This can be detected and change the vertex shader to fit. The program now detects WebGL version in browser. Could be smarter about shaders, though.
  • I haven't tested it with the Ruby setup.
  • Haven't looked at core/extensions.

Changes:

  • Backwards-compatible WebGL context detection.
gl  = canvas.getContext( 'webgl2', contextAttributes )
   || canvas.getContext( 'webgl', contextAttributes )
   || canvas.getContext( 'experimental-webgl', contextAttributes );
  • Updated example shaders in static index.html page to GLSL ES 300.
  • No change to server folder.
  • Updated default shader to GLSL ES 300.

@TheLucifurry
Copy link

That PR is still opened)

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

Successfully merging this pull request may close these issues.

2 participants