Skip to content

Instantly share code, notes, and snippets.

@lclarkmichalek
Created June 25, 2013 14:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lclarkmichalek/5859091 to your computer and use it in GitHub Desktop.
Save lclarkmichalek/5859091 to your computer and use it in GitHub Desktop.
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