Ejemplo n.º 1
0
        //TODO: More types


        // TODO: Do we need this?

        /*
         * protected void BindFragDataLocation(int colourSlot, string outputName)
         * {
         *  GL.BindFragDataLocation(Handle, colourSlot, outputName);
         * }
         */

        public void BindVariable(string variableName, Action <int> bindAction)
        {
            int location;

            if (!VariableLocations.TryGetValue(variableName, out location))
            {
                throw new Exception($"ShaderProgram.BindVariable ({Name}): Variable {variableName} not defined.");
            }

            bindAction?.Invoke(location);
        }