-
Notifications
You must be signed in to change notification settings - Fork 334
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
Unified Viewport #2648
Unified Viewport #2648
Conversation
64481de
to
75de908
Compare
a7e6a16
to
bf27aaf
Compare
795bf2e
to
3e77168
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent work! There are some regressions in the cameras that will need to be addressed before we can merge this.
@@ -80,6 +80,15 @@ namespace | |||
const ParamArray& params) | |||
: Camera(name, params) | |||
{ | |||
// Extract the film dimensions from the camera parameters. | |||
m_film_dimensions = extract_film_dimensions(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes in this file introduced functional regressions: it's no longer possible to change camera parameters during interactive rendering. They should be reverted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I believe it just needs to be in both places. This is also why the variable that @oktomus noticed was there: originally I was going to factor this code out into a dedicated function but didn't realize that the params could change between the creation and when on_render_begin is called. I'll just do that now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe in this specific case you might be able to execute this code in the constructor, but this isn't true in general as at this point, inputs aren't bound to the entity. Why exactly do you need to do this?
@@ -54,6 +54,18 @@ namespace renderer | |||
PerspectiveCamera::PerspectiveCamera(const char* name, const ParamArray& params) | |||
: Camera(name, params) | |||
{ | |||
// Extract the film dimensions from the camera parameters. | |||
m_film_dimensions = extract_film_dimensions(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same problem here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for this amazing work !
I reviewed half of your code and i will continue once you have addressed this first part :)
Most of the comments apply to the files I haven't read yet.
@@ -248,12 +248,14 @@ source_group ("mainwindow\\pythonconsole" FILES | |||
set (mainwindow_rendering_sources | |||
mainwindow/rendering/cameracontroller.cpp | |||
mainwindow/rendering/cameracontroller.h | |||
mainwindow/rendering/glscenelayer.h | |||
mainwindow/rendering/glscenelayer.cpp |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cpp file first :)
mainwindow/rendering/viewporttab.cpp | ||
mainwindow/rendering/viewporttab.h | ||
mainwindow/rendering/viewportwidget.h | ||
mainwindow/rendering/viewportwidget.cpp |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cpp first also here
@@ -1,7 +1,7 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> | |||
<settings> | |||
<parameter name="autosave" value="false" /> | |||
<parameter name="message_verbosity" value="info" /> | |||
<parameter name="message_verbosity" value="debug" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Revert this
, m_selected_light_path_index(-1) | ||
, m_gl_initialized(false) | ||
{ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove blank line
3e77168
to
448de5b
Compare
Closed in favor of #2661 |
Initial unified viewport PR. Also see #2651