diff options
author | Niriel <daneel_libre@yahoo.fr> | 2013-10-18 19:08:11 +0200 |
---|---|---|
committer | Niriel <daneel_libre@yahoo.fr> | 2013-10-18 19:08:11 +0200 |
commit | 149b0c0b5e101ae01217e2018754bacfbea4e42f (patch) | |
tree | 050f186612f180ca8eca35c1bc0bf186db4e92ac | |
parent | b09fa4f235d954f60e71e0fb21869ca80e719d53 (diff) | |
download | gl-149b0c0b5e101ae01217e2018754bacfbea4e42f.tar.gz |
Added GetUniformBlockIndex and UniformBlockBinding.
-rw-r--r-- | program.go | 12 | ||||
-rw-r--r-- | uniformblockindex.go | 7 |
2 files changed, 19 insertions, 0 deletions
@@ -128,6 +128,18 @@ func (program Program) GetUniformLocation(name string) UniformLocation { return UniformLocation(C.glGetUniformLocation(C.GLuint(program), cname)) } +func (program Program) GetUniformBlockIndex(name string) UniformBlockIndex { + + cname := glString(name) + defer freeString(cname) + + return UniformBlockIndex(C.glGetUniformBlockIndex(C.GLuint(program), cname)) +} + +func (program Program) UniformBlockBinding(index UniformBlockIndex, binding uint) { + C.glUniformBlockBinding(C.GLuint(program), C.GLuint(index), C.GLuint(binding)) +} + func (program Program) GetAttribLocation(name string) AttribLocation { cname := glString(name) diff --git a/uniformblockindex.go b/uniformblockindex.go new file mode 100644 index 0000000..7855b3f --- /dev/null +++ b/uniformblockindex.go @@ -0,0 +1,7 @@ +// Copyright 2012 The go-gl Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package gl + +type UniformBlockIndex uint |