aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Bruyelle <thomas.bruyelle@gmail.com>2014-04-30 14:11:19 +0200
committerThomas Bruyelle <thomas.bruyelle@gmail.com>2014-04-30 14:11:19 +0200
commit75540552181fc09e0c6d95ff8a93b77a3218402d (patch)
tree4d3aea167b8262157a3ca2b62a0de15dffcba0d8
parentc06827a70e7bc851e492935456d35cec7ee27abd (diff)
downloadgl-75540552181fc09e0c6d95ff8a93b77a3218402d.tar.gz
Fix code design for the program type
As discussed in #143, it's better to attach the `Unuse()` function to the type, even if it doesn't use it, rather than a standalone function like before (`programUnuse()`)
-rw-r--r--program.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/program.go b/program.go
index 9dcef76..0bb67a0 100644
--- a/program.go
+++ b/program.go
@@ -60,6 +60,9 @@ func (program Program) Validate() { C.glValidateProgram(C.GLuint(program)) }
func (program Program) Use() { C.glUseProgram(C.GLuint(program)) }
+func (program Program) Unuse() { C.glUseProgram(C.GLuint(0)) }
+
+// Deprecated, please use program.Unuse()
func ProgramUnuse() { C.glUseProgram(C.GLuint(0)) }
func (program Program) GetInfoLog() string {