openframeworks / openframeworks/openFrameworks

capture cursor (GLFW window, possibly more)

Open
#4,940 1 comment 1 reaction 0 assignees View on GitHub

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

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 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.