public SimpleShader GetNewOrCachedShader( Device device, DeviceContext context, string filename, string vsEntryPoint, string psEntryPoint, InputElement[] inputElements) { SimpleShader shader; if (!shaders.TryGetValue(filename, out shader)) { shader = new SimpleShader(device, context, filename, vsEntryPoint, psEntryPoint, inputElements); shaders.Add(filename, shader); } return shader; }