@jamet wrote:
hi all,
i discovered a strange latency in my app when connecting an hdmi monitor to my laptop.
after a bit of research, it turns out to be related with ofGetScreenWidth and ofGetScreenHeight, when i comment the call to this two function, the problem disapear.
if i make a test app who only calls this two methods and ofGetFrameRate, the problem is still appearing, at the moment i connect the hdmi monitor, framerate drops from 60 FPS (fixed) to 1-6 FPS.
i made those test with a clone from github master on the 1st of june.main.cpp :
#include "ofMain.h" #include "ofApp.h" #include "GuiApp.h" #include "ofAppGLFWWindow.h" int main( ){ ofAppGLFWWindow window; window.setMultiDisplayFullscreen(true); ofSetupOpenGL(&window,1024,768,OF_WINDOW); // <-------- setup the GL context ofRunApp(new ofApp()); }ofApp.cpp :
#include "ofApp.h" #include "ofVideoGrabber.h" void ofApp::setup(){ ofSetFrameRate(60); } void ofApp::draw(){ ofDrawBitmapString("FPS: " + ofToString(int(ofGetFrameRate())),20,ofGetHeight()-40); float screenFactorX = (ofGetWidth()/(float)ofGetScreenWidth()); float screenFactorY = (ofGetHeight()/(float)ofGetScreenHeight()); }strange isn'it?
stranger is that ofGetScreenWidth() and ofGetScreenHeight() always return the same value even if my hdmi display is connected (should be 2* 1980*1080).
does anyone have an idea of how i can get this to work?
Posts: 1
Participants: 1