Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix shader compilation

  • Loading branch information...
commit 54afc5dc5caff71d4b4e066ff0da431327e36501 1 parent a713052
@notlion authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  src/core/Program.js
View
3  src/core/Program.js
@@ -26,7 +26,6 @@ define(function(){
function Program(gl, src_vert, src_frag){
this.gl = gl;
- this.handle = gl.createProgram();
}
Program.prototype = {
@@ -34,6 +33,8 @@ define(function(){
compile: function(src_vert, src_frag){
var gl = this.gl, vs, fs;
+ this.handle = gl.createProgram();
+
if(src_vert){
vs = gl.createShader(gl.VERTEX_SHADER);
gl.shaderSource(vs, kVertexShaderPrefix + src_vert);
Please sign in to comment.
Something went wrong with that request. Please try again.