Beispiel #1
0
        public uint GetAttributeLocation(string attributeName)
        {
            //  If we don't have the attribute name in the dictionary, get it's
            //  location and add it.
            if (attributeNamesToLocations.ContainsKey(attributeName) == false)
            {
                int location = GL.GetAttribLocation(ShaderProgramObject, attributeName);
                attributeNamesToLocations[attributeName] = (uint)location;
            }

            //  Return the attribute location.
            return(attributeNamesToLocations[attributeName]);
        }