openframeworks / openframeworks/openFrameworks
capture cursor (GLFW window, possibly more)
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 10.4k
- Forks
- 2.6k
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 9
Description
Hey there, I'm working on a first person game in 3D. While making my camera, I realized there was no functionality for capturing the cursor in open frameworks.
The code is rather simple for GLFW, which I'm using. Not sure how hard it would be to integrate into GLUT or the other windowing systems.
Here's the code I added to to my open frameworks:
void ofAppGLFWWindow::captureCursor(){
glfwSetInputMode(windowP,GLFW_CURSOR,GLFW_CURSOR_DISABLED);
};
Worked well with the input stuff so far, like mouse position and mouse click etc.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with ofAppGLFWWindow and the GLFW cursor input mode API shown in the issue. Check how existing mouse-position and click handling works, then identify the corresponding integration points for the other windowing systems mentioned. Done means cursor capture works for the supported windowing scope and its behavior is verified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- desktop
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100