How to use GetActiveUniform (in SharpGL)?

Posted by frankie on Game Development See other posts from Game Development or by frankie
Published on 2014-05-28T14:46:09Z Indexed on 2014/05/28 16:01 UTC
Read the original article Hit count: 227

Filed under:
|

Generally, guesting 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.

© Game Development or respective owner

Related posts about opengl

Related posts about c#