예제 #1
0
 private void fileSystemWatcher_Shaders_Changed(object sender, System.IO.FileSystemEventArgs e)
 {
     if (_filename_shader_dico.ContainsKey(e.FullPath))
     {
         DXShader shader = _filename_shader_dico[e.FullPath];
         shader.Dirty = true;
     }
 }
예제 #2
0
        public DXShader MakeShader(string shaderFilename)
        {
            string shaderFullFileName = MakeShaderFullPath(shaderFilename);

            if (shaderFullFileName != "")
            {
                if (_filename_shader_dico.ContainsKey(shaderFullFileName))
                {
                    return(_filename_shader_dico[shaderFullFileName]);
                }
                else
                {
                    DXShader shader = new DXShader(shaderFullFileName);
                    _filename_shader_dico.Add(shaderFullFileName, shader);
                    return(shader);
                }
            }
            else
            {
                string text = "Unable to find shader file: " + shaderFilename + "\n";
                MessageBox.Show(text, "Shader compiler error !", MessageBoxButtons.OK);
                return(null);
            }
        }
예제 #3
0
        public DXShader MakeShader(string shaderFilename)
        {
            string shaderFullFileName = MakeShaderFullPath(shaderFilename);

            if (shaderFullFileName != "")
            {
                if (_filename_shader_dico.ContainsKey(shaderFullFileName))
                {
                    return _filename_shader_dico[shaderFullFileName];
                }
                else
                {
                    DXShader shader = new DXShader(shaderFullFileName);
                    _filename_shader_dico.Add(shaderFullFileName, shader);
                    return shader;
                }
            }
            else
            {
                string text = "Unable to find shader file: " + shaderFilename + "\n";
                MessageBox.Show(text, "Shader compiler error !", MessageBoxButtons.OK);
                return null;
            }
        }