ForwardRenderer: allow rendering into QRenderTarget#92
Conversation
mkrus
left a comment
There was a problem hiding this comment.
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
40e463c to
4353152
Compare
lemirep
left a comment
There was a problem hiding this comment.
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
| Holds the size of the external render target. | ||
| */ | ||
|
|
||
| /*! |
There was a problem hiding this comment.
Was this indented with Ctrl+E,R in QtCreator ?
There was a problem hiding this comment.
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.
shouldn't we rebuild the FrameGraph if we had previously set a window ?
There was a problem hiding this comment.
m_renderTargetSelector::targetChanged is connected to reconfigureFrameGraph() and handleSurfaceChange()
lemirep
left a comment
There was a problem hiding this comment.
Could you also update tst_forwardRenderer to check that setRenderTarget sets and emits properly please?
jalbamon
left a comment
There was a problem hiding this comment.
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.
What happens if the render target doesn't have the Color0 attachment?
There was a problem hiding this comment.
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.