void MainAppWindow::setRenderingEngine (int index) { showMessageBubble (getRenderingEngines()[index]); #if JUCE_OPENGL if (getRenderingEngines()[index] == openGLRendererName && contentComponent != nullptr && ! contentComponent->isShowingOpenGLDemo()) { openGLContext.attachTo (*getTopLevelComponent()); return; } openGLContext.detach(); #endif if (ComponentPeer* peer = getPeer()) peer->setCurrentRenderingEngine (index); }
int StandaloneFilterWindow::getActiveRenderingEngine() { #if JUCE_OPENGL if (openGLContext.isAttached()) return getRenderingEngines().indexOf (openGLRendererName); #endif if (ComponentPeer* peer = getPeer()) return peer->getCurrentRenderingEngine(); return 0; }
int CtrlrEditor::getActiveRenderingEngine() const { #if JUCE_OPENGL if (openGLContext.isAttached()) return getRenderingEngines().indexOf (openGLRendererName); #endif if (ComponentPeer* peer = getPeer()) return peer->getCurrentRenderingEngine(); return 0; }
void CtrlrEditor::setUsingOpenGL(const bool isUsingOpenGL) { if (isUsingOpenGL) { if (getRenderingEngines().contains(openGLRendererName)) { setOpenGLRenderingEngine(); } } else { setRenderingEngine (0); } }
void CtrlrEditor::setRenderingEngine (int index) { #if JUCE_OPENGL if (getRenderingEngines()[index] == openGLRendererName) { openGLContext.attachTo (*getTopLevelComponent()); return; } openGLContext.detach(); #endif if (ComponentPeer* peer = getPeer()) peer->setCurrentRenderingEngine (index); }
void StandaloneFilterWindow::setRenderingEngine (int index) { #if JUCE_OPENGL if (getRenderingEngines()[index] == openGLRendererName) { //cUtils::showMessage("Attaching to opengl"); openGLContext.attachTo (*this); return; } openGLContext.detach(); #endif if (ComponentPeer* peer = getPeer()) peer->setCurrentRenderingEngine (index); }
void MainComponent::setRenderingEngine (int index) { // showMessageBubble (getRenderingEngines()[index]); #if JUCE_OPENGL if (getRenderingEngines()[index] == openGLRendererName) { openGLContext.attachTo (*getTopLevelComponent()); return; } openGLContext.detach(); #endif if (ComponentPeer* peer = getPeer()) peer->setCurrentRenderingEngine (index); }
void StandaloneFilterWindow::setOpenGLRenderingEngine() { setRenderingEngine (getRenderingEngines().indexOf (openGLRendererName)); }
PopupMenu getMenuForIndex (int menuIndex, const String& /*menuName*/) { ApplicationCommandManager* commandManager = &(mainWindow.commandManager); PopupMenu menu; if (menuIndex == 0) { menu.addCommandItem (commandManager, showRendering); menu.addCommandItem (commandManager, showFontsAndText); menu.addCommandItem (commandManager, showWidgets); menu.addCommandItem (commandManager, showThreading); menu.addCommandItem (commandManager, showTreeView); menu.addCommandItem (commandManager, showTable); menu.addCommandItem (commandManager, showAudio); menu.addCommandItem (commandManager, showDragAndDrop); menu.addCommandItem (commandManager, showOpenGL); menu.addCommandItem (commandManager, showQuicktime); menu.addCommandItem (commandManager, showDirectShow); menu.addCommandItem (commandManager, showInterprocessComms); menu.addCommandItem (commandManager, showCamera); menu.addCommandItem (commandManager, showWebBrowser); menu.addCommandItem (commandManager, showCodeEditor); menu.addSeparator(); menu.addCommandItem (commandManager, StandardApplicationCommandIDs::quit); } else if (menuIndex == 1) { menu.addCommandItem (commandManager, setDefaultLookAndFeel); menu.addCommandItem (commandManager, setOldSchoolLookAndFeel); menu.addSeparator(); menu.addCommandItem (commandManager, useNativeTitleBar); #if JUCE_MAC menu.addCommandItem (commandManager, useNativeMenus); #endif #if ! JUCE_LINUX menu.addCommandItem (commandManager, goToKioskMode); #endif StringArray engines (getRenderingEngines()); if (engines.size() > 1) { menu.addSeparator(); int currentEngine = getPeer()->getCurrentRenderingEngine(); #if JUCE_OPENGL if (openGLContext.isAttached()) currentEngine = engines.size() - 1; #endif for (int i = 0; i < engines.size(); ++i) menu.addItem (5001 + i, "Use " + engines[i], true, i == currentEngine); } } return menu; }
void MainAppWindow::setOpenGLRenderingEngine() { setRenderingEngine (getRenderingEngines().indexOf (openGLRendererName)); }
void CtrlrEditor::setOpenGLRenderingEngine() { setRenderingEngine (getRenderingEngines().indexOf (openGLRendererName)); }
void MainComponent::setOpenGLRenderingEngine() { setRenderingEngine (getRenderingEngines().indexOf (openGLRendererName)); }