How to use GetActiveUniform?

May 28, 2014 at 4:56 PM
Edited May 28, 2014 at 5:03 PM
Generally, question is in header.

I cannot understand how to use GetActiveUniform function.
    public void GetActiveUniform(uint program, 
                                 uint index, 
                                 int bufSize, 
                                 int[] length, 
                                 int[] size, 
                                 uint[] type, 
                                 string name);
My attempt looks like this (everything is compiled and linked):
            var uniformSize = new int[1];
            var unifromLength = new int[1];
            var uniformType = new uint[1];
            var uniformName = "";
            Gl.GetActiveUniform(Id, index, uniformNameMaxLength[0], unifromLength, uniformSize, uniformType, uniformName);
After call I get proper uniformSize, length and type, but not name.
Coordinator
May 31, 2014 at 10:38 AM
It's possible I've made a mistake in the marshalling code for getting the active uniform name, let me take a look into this and get back to you
Coordinator
May 31, 2014 at 10:39 AM
Coordinator
Jan 24, 2015 at 4:12 PM
Marked as answer by dwmkerr on 1/24/2015 at 9:12 AM