Answer the question
In order to leave comments, you need to log in
Why is WebGL not connecting?
Hello.
I want to declare a WebGl context and I do it like this:
var names = ["webgl", "experimental-webgl", "webkit-3d", "moz-webgl"];
gl = null;
for (var ii = 0; ii < names.length; ++ii) {
try {
gl = canvas.getContext(names[ii]);
} catch(e) {}
if (gl) {
break;
}
}
initShaders ();
initBuffers ();
Answer the question
In order to leave comments, you need to log in
Maybe you just forgot to create the InitShaders function developer.mozilla.org/ru/docs/Web/WebGL/Adding_2D_...
Take a JavaScript course at some Codecademy, and only then return to WebGL.
You haven't defined the initShaders and initBuffers functions, how are you going to call them?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question