aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPolyFloyd <floyd@polyfloyd.net>2014-04-30 16:26:50 +0200
committerPolyFloyd <floyd@polyfloyd.net>2014-04-30 16:26:50 +0200
commitbf02117a1e15dcefb8a0478b8f82b0eb4fd396d0 (patch)
treee55484f79839137d2de071224a6ea24cc7d55f49
parent35e82469106d2bc6391736ddcc18559c1cb81532 (diff)
downloadgl-bf02117a1e15dcefb8a0478b8f82b0eb4fd396d0.tar.gz
Added a scary warning message
-rw-r--r--buffer.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/buffer.go b/buffer.go
index 8d13e25..b9cffde 100644
--- a/buffer.go
+++ b/buffer.go
@@ -84,6 +84,9 @@ func MapBuffer(target GLenum, access GLenum) unsafe.Pointer {
// Maps the buffer with MapBuffer() and returns a pointer to the slice pointing
// to the mapped buffer. See also the MapBuffer<Type> convenience functions.
+// WARNING: This function makes use of reflect.SliceHeader which may reduce
+// portability of your application. See the reflect.SliceHeader documentation
+// for more information.
func MapBufferSlice(target GLenum, access GLenum, bytesPerElement int) unsafe.Pointer {
rawLength := int(GetBufferParameteriv(target, BUFFER_SIZE))
return unsafe.Pointer(&reflect.SliceHeader{