Closed raedatoui closed 7 years ago
You're not using the OpenGL call properly. Read its documentation:
http://docs.gl/gl2/glGetActiveUniform
Specifically:
You're currently passing it a bufSize value of 0, so of course emptry string is all it can give you.
Look at the example at the bottom of that documentation page. It uses a buffer of size 256. Try that. Something along these lines:
var buf [256]byte
gl.GetActiveUniform(..., len(buf), ..., &buf[0])
s := gl.GoStr(&buf[0])
oh doh! thank you!
I am trying to retrieve the info of attributes and uniforms of an already linked shader. The shader is working and the calls
gl.GetActiveAttrib
andgl.GetActiveUniform
are working as expected. I am just stuck on converting the uint8 type to a Go stringgl.GoStr(&n)
is returning an empty string. How can I properly convert n to a string? much appreciated!