Example #1
0
        public void GetLastErrors(ShadingLanguages targetLanguage, ref string outVertexError, ref string outFragmentError)
        {
            var compiler = compilers[(int)targetLanguage];

            outVertexError   = compiler.LastVertexError;
            outFragmentError = compiler.LastFragmentError;
        }
Example #2
0
        public MainWindow()
        {
            InitializeComponent();

            textEditor.TextArea.Caret.CaretBrush = new SolidColorBrush(Colors.Yellow);

            glControl        = new OpenTK.GLControl(new OpenTK.Graphics.GraphicsMode(32, 24, 8, 4));
            glControl.Load  += glControl_Load;
            glControl.Paint += glControl_Paint;

            glHost.Child = glControl;

            renderTimeMeasurer = Stopwatch.StartNew();

            sourceEditTimer = new SourceEditTimer(RecompilationDelayMillis);

            compilers = new EffectCompilers();

            targetLanguage = ShadingLanguages.GLSL;
        }
Example #3
0
 public bool HasErrors(ShadingLanguages targetLanguage)
 {
     return(compilers[(int)targetLanguage].HasErrors());
 }
Example #4
0
 public IEffect Compile(ShadingLanguages targetLanguage, string vertexSource, string fragmentSource)
 {
     return(compilers[(int)targetLanguage].Compile(vertexSource, fragmentSource));
 }