[3.0] Game crashes if stretch mode is set to "viewport"
Tested on Godot 3.0 master af282b56feb8d84049f911dd1d91d82bd2211727 Windows 10 64 bits
When I set the display stretch mode to "viewport", the game crashes as soon as I start it. Setting the stretch mode to "2d" doesn't produce a crash but nothing is visible (2D or 3D), only the clear color. Only no stretch mode works.
here it crashes on both "viewport" and "2d" (linux)
Same, Viewport and 2D, Linux 64 too.
This is one of the errors I'm getting
GL ERROR: Source: OpenGL Type: Error ID: 39 Severity: High Message: GL_INVALID_VALUE in glViewport(0, 0, 1360, -2147483648)
it seems the height being used is a messed up negative number. Could be part of the problem?
well after trying to dig this a little bit more, I think the previous error is not the real cause of the problem. but this one
GL ERROR: Source: OpenGL Type: Error ID: 39 Severity: High Message: GL_INVALID_OPERATION in glReadBuffer(invalid buffer GL_COLOR_ATTACHMENT0)
unfortunately, I'm not knowledgeable enough with OpenGL to know what to do from here on... :/
I'm getting a error when trying to use the 2D stretch mode.
ERROR: _gl_debug_print: GL ERROR: Source: OpenGL Type: Error ID: 1281 Severity: High Message: GL_INVALID_VALUE error generated. Width and height must not be negative.
At: drivers/gles3/rasterizer_gles3.cpp:123
well now that reduz is out on vacations for a month I'm not sure who has the skills and will be able to take a look at this... perhaps @SaracenOne ? :)
sorry my english...
I found the desired_res give a (0,0) value (when i print vars values).
https://github.com/godotengine/godot/blob/master/scene/main/scene_main_loop.cpp#L1136
I'm sorry I do not know how to reference code lines to comments
this is fixed in PR #8410 @Shockblast awesome, I thought the fix would be harder than that ;) hopefully it gets merged soon!