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]; }
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]); }