private void stopRenaming() { ProgramNameTextBox.Visibility = Visibility.Hidden; ProgramNameTextBlock.Visibility = Visibility.Visible; RenamingProgram = null; }
private void onRenamingProgramChanged(ProgramViewModel newValue) { if (newValue == DataContext) { startRenaming(); } else if (newValue == null) { stopRenaming(); } }
private void addProgramViewModel(ProgramViewModel programViewModel) { GlContextManager.ShaderCompiler.AddProgram(programViewModel.Program); Programs.Add(programViewModel); }
private void onActiveProgramChanged(ProgramViewModel newValue) { IsActiveProgram = newValue == DataContext; }
private static void attachShaderToProgram(ProgramViewModel program, ShaderViewModel shader) { var currentAttachedShader = program.GetShaderForStage(shader.Stage); if (currentAttachedShader.IsSome) { program.DetachShader(currentAttachedShader.Value); } program.AttachShader(shader); }