コード例 #1
0
        public int GetUniformLocation(int p, string name)
        {
            var tmp = forwarding.GetUniformLocation(p, name);

            CheckGLError();
            GLCALLS++;
            return(tmp);
        }
コード例 #2
0
        public void SetUniform(string name, int value)
        {
            int location;

            if (!uniformMap.TryGetValue(name, out location))
            {
                location = GraphicsContext.GetUniformLocation(this.Handle, name);
                if (location == -1)
                {
                    throw new ArgumentException();
                }
                else
                {
                    uniformMap.Add(name, location);
                }
            }

            GraphicsContext.Uniform1(location, value);
        }