diff --git a/src/gl/gl3shader.cpp b/src/gl/gl3shader.cpp index 5cce9d8..4e94dfc 100644 --- a/src/gl/gl3shader.cpp +++ b/src/gl/gl3shader.cpp @@ -143,10 +143,10 @@ linkprogram(GLint vs, GLint fs, GLuint *program, bool is_2d) char *log; prog = glCreateProgram(); - + glAttachShader(prog, vs); glAttachShader(prog, fs); - + int stride = 0; int pos_size = is_2d ? 4 : 3; stride += vglBindPackedAttribLocation(prog, "in_pos" , pos_size, GL_FLOAT, stride, stride + sizeof(float) * pos_size) * (sizeof(float) * pos_size); @@ -155,7 +155,7 @@ linkprogram(GLint vs, GLint fs, GLuint *program, bool is_2d) stride += vglBindPackedAttribLocation(prog, "in_tex0" , 2, GL_FLOAT, stride, stride + sizeof(float) * 2) * (sizeof(float) * 2); stride += vglBindPackedAttribLocation(prog, "in_weights", 4, GL_FLOAT, stride, stride + sizeof(float) * 4) * (sizeof(float) * 4); vglBindPackedAttribLocation(prog, "in_indices", 4, GL_UNSIGNED_BYTE, stride, stride + 4); - + glLinkProgram(prog); *program = prog; @@ -235,10 +235,10 @@ Shader::create(const char **vsrc, const char **fsrc, bool is_2d) void Shader::use(void) { - if(currentShader != this){ + //if(currentShader != this){ glUseProgram(this->program); currentShader = this; - } + //} } void