-
Notifications
You must be signed in to change notification settings - Fork 27
ForwardRenderer: allow rendering into QRenderTarget #92
base: dev
Are you sure you want to change the base?
Conversation
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.
A sample manual test would be great
ae62ecf
to
c6eee16
Compare
will be used in the materials demo that I'm preparing to render ground reflections. |
c6eee16
to
40e463c
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.
well it builds and doesn't break the car scene or the forward renderer manual test, so gtg
40e463c
to
4353152
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.
We need the manual test forward_renderer to have a new tests that allows rendering into a render target, then back to the windows based on a checkbox being checked or something
@@ -189,6 +195,18 @@ using namespace Kuesa; | |||
Holds the size of the external render target. | |||
*/ | |||
|
|||
/*! |
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.
Was this indented with Ctrl+E,R in QtCreator ?
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.
I just copied the formatting of the other property docs
*/ | ||
void ForwardRenderer::setRenderTarget(Qt3DRender::QRenderTarget *renderTarget) | ||
{ | ||
m_renderTargetSelector->setTarget(renderTarget); |
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.
shouldn't we rebuild the FrameGraph if we had previously set a window ?
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.
m_renderTargetSelector::targetChanged is connected to reconfigureFrameGraph() and handleSurfaceChange()
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.
Could you also update tst_forwardRenderer to check that setRenderTarget sets and emits properly please?
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.
Looks OK from a documentation standpoint.
else | ||
qCWarning(kuesa) << Q_FUNC_INFO << "Unexpected surface type for surface " << surface; | ||
if (renderTarget) { | ||
Qt3DRender::QAbstractTexture *texture = findRenderTargetTexture(renderTarget, Qt3DRender::QRenderTargetOutput::Color0); |
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.
What happens if the render target doesn't have the Color0 attachment?
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.
Changed the patch so that in that case it falls back to rendering to a surface (if any is given)
c02f46d
to
1b9eca9
Compare
Added an auto test in addition the the manual test. This now tries to fall back to surface rendering and prints a warning. |
No description provided.