Created
June 25, 2013 14:52
-
-
Save lclarkmichalek/5859091 to your computer and use it in GitHub Desktop.
This file contains 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
diff --git a/shader.go b/shader.go | |
index 9be9c52..aec8742 100644 | |
--- a/shader.go | |
+++ b/shader.go | |
@@ -39,15 +39,15 @@ func (shader Shader) GetSource() string { | |
var length C.GLint | |
C.glGetShaderiv(C.GLuint(shader), C.GLenum(SHADER_SOURCE_LENGTH), &length) | |
- log := C.malloc(C.size_t(len + 1)) | |
- C.gogl_glGetShaderSource(C.GLuint(shader), C.GLsizei(len), nil, (*C.GLchar)(log)) | |
+ log := C.malloc(C.size_t(length + 1)) | |
+ C.gogl_glGetShaderSource(C.GLuint(shader), C.GLsizei(length), nil, (*C.GLchar)(log)) | |
defer C.free(log) | |
if length > 1 { | |
log := C.malloc(C.size_t(length + 1)) | |
defer C.free(log) | |
- C.glGetShaderSource(C.GLuint(shader), C.GLsizei(length), nil, (*C.GLchar)(log)) | |
+ C.gogl_glGetShaderSource(C.GLuint(shader), C.GLsizei(length), nil, (*C.GLchar)(log)) | |
return C.GoString((*C.char)(log)) | |
} | |
return "" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment