Skip to main content
Minor grammar fixes, code formatting
Source Link
liggiorgio
  • 5.5k
  • 6
  • 27
  • 38

It seems that you have a WebGL version 1 (OpenGL ES 2.0) and that's why it does not accept OpenGL ES 3.x features.

Review the code where you request the context for WebGL

var gl = canvas.getContext("webgl2"); // 2!

var gl = canvas.getContext("webgl2");   // 2!

If you are requesting webgl2WebGL2, check that there isare no spaces or lineswhitespaces before "#version 300 es"#version 300 es.

You can find additional guidance https://webgl2fundamentals.org/webgl/lessons/webgl-fundamentals.htmlhere.

It seems that you have a WebGL version 1 (OpenGL ES 2.0) and that's why it does not accept OpenGL ES 3.x features.

Review the code where you request the context for WebGL

var gl = canvas.getContext("webgl2"); // 2!

If you are requesting webgl2, check that there is no spaces or lines before "#version 300 es"

https://webgl2fundamentals.org/webgl/lessons/webgl-fundamentals.html

It seems that you have a WebGL version 1 (OpenGL ES 2.0) and that's why it does not accept OpenGL ES 3.x features.

Review the code where you request the context for WebGL

var gl = canvas.getContext("webgl2");   // 2!

If you are requesting WebGL2, check that there are no whitespaces before #version 300 es.

You can find additional guidance here.

Source Link
gotanod
  • 341
  • 2
  • 7

It seems that you have a WebGL version 1 (OpenGL ES 2.0) and that's why it does not accept OpenGL ES 3.x features.

Review the code where you request the context for WebGL

var gl = canvas.getContext("webgl2"); // 2!

If you are requesting webgl2, check that there is no spaces or lines before "#version 300 es"

https://webgl2fundamentals.org/webgl/lessons/webgl-fundamentals.html