Appspotdemo.Mono.Droid.VideoStreamsView.addShaderTo C# (CSharp) Method

addShaderTo() private static method

private static addShaderTo ( int type, string source, int program ) : void
type int
source string
program int
return void
        private static void addShaderTo(int type, string source, int program)
        {
            int[] result = new int[] { GLES20.GlFalse };
            int shader = GLES20.GlCreateShader(type);
            GLES20.GlShaderSource(shader, source);
            GLES20.GlCompileShader(shader);
            GLES20.GlGetShaderiv(shader, GLES20.GlCompileStatus, result, 0);
            abortUnless(result[0] == GLES20.GlTrue, GLES20.GlGetShaderInfoLog(shader) + ", source: " + source);
            GLES20.GlAttachShader(program, shader);
            GLES20.GlDeleteShader(shader);
            checkNoGLES2Error();
        }