openframeworks / openframeworks/openFrameworks

noticeable lag in ofGetMouseX()/ofGetMouseY()

Open
#3,214 40 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug core section-internals
Dominant language
C++
Stars
10.4k
Forks
2.6k
Avg merge
1d 21h
Merged PRs (30d)
9

Description

Does anyone notice an abnormal amount of mouse lag with the following code.

void ofApp::setup(){
    ofSetFrameRate(60.0);
}
//--------------------------------------------------------------
void ofApp::draw(){
    ofCircle(ofGetMouseX(),ofGetMouseY(), 50);
}

I ran the same code in Cinder and Cocos2d,and those frameworks had a lot less lag. I had vsync on and set frame rate to 60. There seems to be a noticeable difference between openframeworks and other frameworks. Can you guys try with other frameworks, do you see a difference? Thanks. I also noticed running the OF version at the same time as the others slows down the other versions to OF speed. So could you guys test running the apps at the at different times as well as simultaneous?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue with the provided ofApp::setup and draw example, testing with vsync and a 60 FPS limit. Compare mouse-to-circle responsiveness when openFrameworks runs alone and alongside Cinder or Cocos2d, then identify the relevant input or rendering path and document a repeatable fix or explanation.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
computer-graphics, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.