As I’m now learning OpenGL more thoroughly and revising the documentation, especially the tutorials that are outdated, few things already came up. One is with render.enable_target() which was deprecated and actually the topic should have been followed up, thus I’m working on a PR to the tutorial and also the documentation - in some code examples there are still deprecated functions used
Second thing is that Grading tutorial stating in chapter “Drawing to an off-screen buffer”:
- All original drawing code in
update()
is left as is, apart from the viewport which is set to the render target’s resolution.
and the code responsible for this is:
render.set_viewport(0, 0, render.get_width(), render.get_height()) -- <2>
And my problem is that according to the API render.get_width()
and render.get_height()
are returning a width and height (respectively) from the game.project:
Returns the logical window width that is set in the “game.project” settings.
Is it correct or is there something wrong and a function render.get_render_target_width()
should be used?