public JSObject GetUniformLocation(string uniformName) { // If we don't have the uniform name in the dictionary, get it's // location and add it. if (uniformNamesToLocations.ContainsKey(uniformName) == false) { uniformNamesToLocations[uniformName] = GL.GetUniformLocation(ShaderProgramObject, uniformName); // TODO: if it's not found, we should probably throw an exception. } // Return the uniform location. return(uniformNamesToLocations[uniformName]); }