aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArne Döring <arne.doering@rwth-aachen.de>2014-04-23 14:16:25 +0200
committerArne Döring <arne.doering@rwth-aachen.de>2014-04-23 14:16:25 +0200
commit5c2dd5b1d95c23a56e07ff16a6118c7621e9a0f9 (patch)
treeb94f716ca9d7bf7ff75b78457c44b0773790663f
parentf17808598b95cf7b86dbd09a9fcfd399c4805aa4 (diff)
downloadgl-5c2dd5b1d95c23a56e07ff16a6118c7621e9a0f9.tar.gz
conveniont version of GetIntegerv
-rw-r--r--gl.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/gl.go b/gl.go
index e337469..2692cb0 100644
--- a/gl.go
+++ b/gl.go
@@ -471,6 +471,16 @@ func GetIntegerv(pname GLenum, params []int32) {
C.glGetIntegerv(C.GLenum(pname), (*C.GLint)(&params[0]))
}
+// almost all cases where GetIntegerv is called, this function is more convenient
+func Get4Integer(pname GLenum) (v0, v1, v2, v3 int) {
+ var values [4]C.GLint
+ C.glGetIntegerv(C.GLenum(pname), &values[0])
+ v0 = int(values[0])
+ v1 = int(values[1])
+ v2 = int(values[2])
+ v3 = int(values[3])
+}
+
//void glGetLightfv (GLenum light, GLenum pname, float *params)
func GetLightfv(light GLenum, pname GLenum, params []float32) {
if len(params) == 0 {