@katnor wrote:
Hi - can anyone assist me on where I should be looking to fix this?
I'm using OF9 (OS X) multi windows (two windows, one app), and ofxPd and ofxMidi. mainWindow opens on the local machine. secondWindow also does unless an external display is connected. ofxMidi is to hook up just one device (a KORG nano controller) to adjust audio levels on the fly (midi going to controls in mainWindow). The piece is mostly audio (not MIDI) -animated text, displayed in secondWindow.
Problem started after I added ofxMidi:
If I run with no external display connected and both windows on the local computer it’s all fine. But with an external display connected, any ofMesh rendered text in secondWindow is no longer rendered correctly (black squares or sometimes partial rendering). Midi works fine for both.If I remove ofxMidi from the equation, the text renders perfectly in secondWindow on an external display. For now I’ve done that, but any suggestions would be most welcome.
Including my main.mm in case that’s the culprit.
Many thanks.Katharine
#include "ofMain.h" #include "ofApp.h" #include "ofAppGLFWWindow.h" int main(){ CGDisplayCount displayCount; CGDirectDisplayID displays[32]; // Grab the active displays CGGetActiveDisplayList(32, displays, &displayCount); int numDisplays = displayCount; int displayHeight1 = CGDisplayPixelsHigh (displays[0]); int displayWidth1 = CGDisplayPixelsWide (displays[0]); CGRect displayBounds1= CGDisplayBounds (displays[0]); int displayHeight2 = CGDisplayPixelsHigh (displays[numDisplays-1]); int displayWidth2 = CGDisplayPixelsWide (displays[numDisplays-1]); CGRect displayBounds2= CGDisplayBounds (displays[numDisplays-1]); ofGLWindowSettings settings; settings.setPosition({0.f,0.f}); settings.width = 650; settings.height = 700; settings.windowMode = OF_WINDOW; shared_ptr<ofAppBaseWindow> mainWindow = ofCreateWindow(settings); if(numDisplays < 2) { settings.width = 1100; settings.height = 800; settings.setPosition({350,0.0f}); settings.windowMode = OF_WINDOW; } else { settings.width = displayWidth2; settings.height = displayHeight2; settings.setPosition({(float)displayWidth1,0.0f}); //to the 'right' of display1 settings.windowMode = OF_FULLSCREEN; } shared_ptr<ofAppBaseWindow> secondWindow = ofCreateWindow(settings); shared_ptr<ofApp> mainApp(new ofApp); mainApp->setupSecondWindow(); ofAddListener(secondWindow->events().draw, mainApp.get(), &ofApp::drawSecondWindow); ofAddListener(secondWindow->events().update, mainApp.get(), &ofApp::updateSecondWindow); ofRunApp(mainWindow, mainApp); ofRunMainLoop(); }
Posts: 1
Participants: 1