private void RenderContext(int layer) { if (renderContext != null) { if (layerVisibility[layer]) { renderContext.EnableLayer(layer); } else { renderContext.DisableLayer(layer); } } }
public void ToggleLayerVisibility(int layer) { layerVisibility[layer] = !layerVisibility[layer]; if (renderContext != null) { if (layerVisibility[layer]) { renderContext.EnableLayer(layer); } else { renderContext.DisableLayer(layer); } } }