diff options
author | Thomas Bruyelle <thomas.bruyelle@gmail.com> | 2014-04-30 14:11:19 +0200 |
---|---|---|
committer | Thomas Bruyelle <thomas.bruyelle@gmail.com> | 2014-04-30 14:11:19 +0200 |
commit | 75540552181fc09e0c6d95ff8a93b77a3218402d (patch) | |
tree | 4d3aea167b8262157a3ca2b62a0de15dffcba0d8 | |
parent | c06827a70e7bc851e492935456d35cec7ee27abd (diff) | |
download | gl-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.go | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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 { |