This project is read-only.

How to use GetActiveUniform?

May 28, 2014 at 5:56 PM
Edited May 28, 2014 at 6: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.
May 31, 2014 at 11: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
May 31, 2014 at 11:39 AM
Jan 24, 2015 at 5:12 PM
Marked as answer by dwmkerr on 1/24/2015 at 9:12 AM