openframeworks / openframeworks/openFrameworks

ofFbo: Window Resize Events effecting FBO drawing in second window…

Open
#5,424 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Sorry just cross posting on the forums as well as here incase it's a bug that needs attention.

I'm having a problem with resize window events on the main window effecting the drawing of an FBO in a second window. This only seems to happen when I enable GLVersion(3,2) and higher. I've made a super striped back example the shows the problem.

Seems weird that events on the main window are spilling through to effect children windows. Is this a bug or am I not setting something up properly?

To see what I mean, compile the example and try resizing the main window to see the second window FBO draw weirdly. -> https://github.com/JoshuaBatty/MultiWindowBug

Im on OS X 10.10.5
opengl info:
version=4.2.0 NVIDIA
vendor=NVIDIA Corporation
renderer=GeForce GT 750m

When I run the app I get the following. Basically the second window should draw the ellipse in the middle of the screen.

screen shot 2017-01-23 at 10 09 52 pm

However, the second window FBO is stretching its drawing according to the resolution of the main window, even though I calling the draw as: second_window_fbo.draw(0,0,secondWindow->getWidth(),secondWindow->getHeight());

When I cout the window sizes it prints the correct values:
Main winodow width = 920 -- Main window height = 480 -- Second window widht = 480 -- Second window height = 640

Interestingly, if I resize the main window to the same size as my second window then everything draws as originally anticipated.

screen shot 2017-01-23 at 10 10 04 pm

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 compiling the stripped-down example at https://github.com/JoshuaBatty/MultiWindowBug on OS X with GLVersion(3,2) or higher, then resize the main window while observing the second window's FBO. Compare the reported window sizes and the second-window draw call; done means the second window keeps drawing its ellipse at its own dimensions instead of stretching with the main window.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, macos
Domain
computer-graphics, desktop-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.