New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Regression in 5.4.x related to off-screen render targets #233
Comments
Please take a look at the following lines: https://github.com/cprogrammer1994/ModernGL/blob/5.4.1/src/Context.cpp#L1392 https://github.com/cprogrammer1994/ModernGL/blob/5.4.1/src/Framebuffer.cpp#L379 We were changing these in the last releases. This need investigation. I know that it was not properly implemented earlier and the I will have time later to investigate it too. |
Could be a good idea to add test(s) for this. When I looked at the issue I saw the the default framebuffer (0) returning https://www.khronos.org/opengl/wiki/Default_Framebuffer might also be useful. |
I tried adding my test case (see above) to the unit test suite, but the bug is only affecting mixed onscreen-offscreen rendering, and that's not supported in the test suite. In fact there are no onscreen test cases as far as I understand. |
The output of your test code on OS X (nvidia 650M, Early 2013 macbook pro):
|
Desktop Win10 nvidia 1070
|
OK, I made a bad choice of multiplier because 255 * 0.5 equals 127.5, which can be rounded either way depending on the driver. Let's pick 0.4 instead, that'll give an exact result (102). |
I will have time around the week end. We will fix it for sure. Sorry for the late response. |
Description
There is a regression related to off-screen render targets in 5.4.x. After using a 2-channel off-screen framebuffer, the main framebuffer starts acting like a 2-channel framebuffer as well. From then on, only the first two channels are affected by any operation, including
clear()
.Proof of Code
Result on 5.3.0:
Result on 5.4.2:
Version info
The text was updated successfully, but these errors were encountered: