This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function initShaders( gl, vertexShaderId, fragmentShaderId ) | |
{ | |
var vertShdr; | |
var fragShdr; | |
var vertElem = document.getElementById( vertexShaderId ); | |
if ( !vertElem ) { | |
alert( "Unable to load vertex shader " + vertexShaderId ); | |
return -1; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Shader initialisation | |
function getShader(gl, id){ | |
var shaderScript = document.getElementById(id); | |
if (!shaderScript) { | |
return null; | |
} | |
var str = ""; |