Skip to content
Browse files

Fix shader compilation

  • Loading branch information...
1 parent a713052 commit 54afc5dc5caff71d4b4e066ff0da431327e36501 @notlion committed Feb 10, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/core/Program.js
View
3 src/core/Program.js
@@ -26,14 +26,15 @@ define(function(){
function Program(gl, src_vert, src_frag){
this.gl = gl;
- this.handle = gl.createProgram();
}
Program.prototype = {
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);

0 comments on commit 54afc5d

Please sign in to comment.
Something went wrong with that request. Please try again.