Window Resize Events effecting FBO drawing in second window... Bug?

Hi 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(4,1). 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? Thanks.

To see what I mean, compile the example and try resizing the main window to see the second window FBO draw weirdly.

Hey Joshua,

I just runned your example as it is and i don-t seem to reproduce any weirdness.
I’m under Windows 10
opengl info:
version=4.5.0 NVIDIA 376.33
vendor=NVIDIA Corporation
renderer=GeForce GTX 960/PCIe/SSE2

Could you describe the drawing issue?


Hi Jordi, hmm that’s strange. 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.

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.

Is seems like a bug since it does not reproduce in Windows.
But I have a question, why aren’t you using the multiWindowExample? it creates 2 apps one for each window. Then main has a shared pinter to gui app (second window). Isn-t that easier?

Thanks Jordi, i’ve continued ahead with the multiple app approach which seems to have fixed my problem for my current application. It would be nice to be able to do this both ways however in the future however. Thanks for your suggestions.