Ejemplo n.º 1
0
        public static bool glGetProgramLinkedStatus(GFX.GfxProgram program)
        {
            var isLinked = 0;

            glGetProgramiv(program.Id, Def.ProgramParameter.LinkStatus, ref isLinked);
            return(isLinked == 1);
        }
Ejemplo n.º 2
0
        public static string glGetProgramLinkedInformation(GFX.GfxProgram program)
        {
            var len = 0;

            glGetProgramiv(program.Id, Def.ProgramParameter.InfoLogLength, ref len);
            if (len > 1)
            {
                var bs = new byte[len];
                glGetProgramInfoLog(program.Id, len, null, bs);
                return(System.Text.Encoding.ASCII.GetString(bs));
            }
            return(string.Empty);
        }
Ejemplo n.º 3
0
 public static uint glGetUniformLocation(GFX.GfxProgram program, string name)
 {
     return(glGetUniformLocation(program.Id, name) is var r && r >= 0 ? (uint)r : throw new OpenGLESException());
 }
Ejemplo n.º 4
0
 public static void glUseProgram(GFX.GfxProgram program) => glUseProgram(program.Id);