( string )
| 20824 | }; |
| 20825 | |
| 20826 | function addLineNumbers ( string ) { |
| 20827 | |
| 20828 | var chunks = string.split( "\n" ); |
| 20829 | |
| 20830 | for ( var i = 0, il = chunks.length; i < il; i ++ ) { |
| 20831 | |
| 20832 | // Chrome reports shader errors on lines |
| 20833 | // starting counting from 1 |
| 20834 | |
| 20835 | chunks[ i ] = ( i + 1 ) + ": " + chunks[ i ]; |
| 20836 | |
| 20837 | } |
| 20838 | |
| 20839 | return chunks.join( "\n" ); |
| 20840 | |
| 20841 | }; |
| 20842 | |
| 20843 | function getShader ( type, string ) { |
| 20844 |