openframeworks / openframeworks/openFrameworks

[idea] macOS - seamless retina window (high res or not)

Open
#8,365 9 comments 0 reactions 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

I finally found everything to make retina work with a seamless window.
Basically everything will work the same and only pixel density will change.

It is working great in the fork I'm using.
I'll explain what the changes are if anybody wants to port to OF.

GLFW window size and mouse will not be doubled in retina. everything is the same.
I've just removed pixelcoordscale, not relevant anymore.
we have to consider the framebuffer size and window size and have the appropriate GLFW callbacks.
ofMatrixStack::getRenderSurfaceSize() have to consider currentWindow->getFramebufferSize();

I'm using always high resolution on PLIST now, so the window decorations are not pixelated (title bar and colored buttons)
this can be switched in ofWindowSettings, so GLFW will handle the way framebuffer works.

// In this fork there is only ofWindowSettings, no inheritance for settings
	ofWindowSettings settings;
	settings.highResolutionCapable = true;

Some related commits:
https://github.com/dimitre/openFrameworks/commit/001cec06b36c66a64373ceb563cb5ca21f4bd0f5
https://github.com/dimitre/openFrameworks/commit/aa82c6b8188960a11db8bb8f44333e57275d9067
https://github.com/dimitre/openFrameworks/commit/ba9de37749a37b6030c483f25d90a7da6748c0d7

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 reviewing the referenced commits and the GLFW window, framebuffer, and mouse-size behavior described in the issue. Check ofMatrixStack::getRenderSurfaceSize() and ofWindowSettings, including the highResolutionCapable setting and relevant GLFW callbacks. Done means seamless macOS Retina rendering with unchanged window and mouse sizes, correct framebuffer sizing, and configurable high-resolution window decorations.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, macos
Domain
computer-graphics, 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.