示例#1
0
        public static GeometryShader GetGeometryShader(string name)
        {
            if (gl == null)
                throw new InvalidOperationException("ShaderManager not initialized");

            if (!geometryShaders.ContainsKey(name))
                geometryShaders[name] = new GeometryShader(gl, name, new StreamReader(Assembly.GetExecutingAssembly().GetManifestResourceStream(String.Format("VoxelLand.Shaders.Geometry.{0}.glsl", name))).ReadToEnd());

            return geometryShaders[name];
        }
示例#2
0
        public static GeometryShader GetGeometryShader(string name)
        {
            if (gl == null)
            {
                throw new InvalidOperationException("ShaderManager not initialized");
            }

            if (!geometryShaders.ContainsKey(name))
            {
                geometryShaders[name] = new GeometryShader(gl, name, new StreamReader(Assembly.GetExecutingAssembly().GetManifestResourceStream(String.Format("VoxelLand.Shaders.Geometry.{0}.glsl", name))).ReadToEnd());
            }

            return(geometryShaders[name]);
        }