| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
Replaced by applyUniform and the various glUniform*v helpers
Change-Id: Ibfb2daa1268ac2eee299e774d9b5d4e2f5b6bc74
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|
|
|
|
| |
Change-Id: Ib4d6f178ec2f6bb19f26e09ad74ba77d2c752627
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|
|
|
|
| |
Change-Id: I0f4062639ed901ac1fe206b940d2fb32c2feed05
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|\
| |
| |
| |
| |
| |
| | |
Conflicts:
tests/manual/manual.pro
Change-Id: Ie1186d3465516d8d50b8261f72e64d8d454d377b
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The last bound fbo must be reset at the end of the rendering if the bound
fbo was changed due to render-to-texture. Otherwise offscreen rendering(in
scene3d case) might have wrong bound fbo. Also in threaded mode, if the
last renderview was rtt, the current fbo remains bound, and the next frame
doesn't render to the surface as expected.
Change-Id: I842040766aa6010740b008a36f7f9f2c935b0561
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
|\|
| |
| |
| | |
Change-Id: Id62e225062a030f4864fb7af2ed6f60d6be87460
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
GraphicsHelperES2 only allows one attachment,
but OpenGL ES 3.0 supports at least 4 attachments.
Support for this is added by testing for ES 3.0
and using the new GraphicsHelperES3.
It currently also reports reporting MRT support
and propertly calls glDrawBuffers.
Later more functions need to be implemented
and tested to extend ES 3.0 support.
Change-Id: I84f52b3de26a29b3327b99df2d1d1cf8217ab072
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The renderer resets to the default state after rendering a frame.
The GraphicsContext resetting the stateset to nullptr internally breaks the
assumption the renderer made that the state was reset to the default state. In
turn this would cause some states to not be properly reset when the first
RenderView of a frame defines a stateset as the delta wouldn't be between the
default stateset and the RV's stateset but between nullptr and the RV's stateset.
Change-Id: I46cdf8983278090b067d2a67ad8a93512718a317
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
| |
| |
| |
| |
| |
| |
| | |
Use height instead of width in the fbo size resolution.
Change-Id: I030a8094e7a23c23f64033f566a19c389dffc801
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Perform upadateData through queue of replacements specified by
QBufferUpdate: start position (offset) and QByteArray (replacing data)
Add example based on custom-mesh-cpp to show how updating data works.
Task-number: QTBUG-50720
Change-Id: I2eceb514af21209deb278d73c94773e39f300fb3
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Add function, which can be used to read the pixels of the current render
target to image. Use exported function for now, implement own later.
Change-Id: Ifb6a5ddf03f968050ba56d14b28c049a2d59e1b7
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|/
|
|
|
|
|
|
|
| |
Implement renderTargetSize function, which queries the size of the current
render target. Change setViewport to use it.
Change-Id: I3e3125c9451ef3b86f91d78ceaf881e927ba48f9
Reviewed-by: Janne Koskinen <janne.p.koskinen@theqtcompany.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|
|
|
|
|
|
|
|
|
| |
Attributes don't support a vertexSize larger than 4, but it can come in
handy to have bigger attributes when you want to push full matrices.
mat2 already fits, so adding special handling for vertexSize == 9 (mat3)
and vertexSize == 16 (mat4).
Change-Id: Ic5376b1c7a87fc4225afdf756d65c924fde54996
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|
|
|
|
| |
Change-Id: Ib569336dc20f91f4e023207b1b074461a227ea01
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead use the stored shaderDNA in the command. Make GraphicsContext able to
activate a shader based only on the DNA. This also forced to store the uniform
values slightly differently so that they can be applied without requiring a
backend Shader node at submission time.
Interestingly according to the Qt3DProfilter the load has shifted from the
second submission part to the first one because of this. The nice things is
that the load of the first part could be spread across multiple threads.
Change-Id: I7c543766d3c088ab3886ca1cd3b529f8deb18a93
Task-number: QTBUG-54423
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This will make it easier to perform the draw command submission concurrently
with the jobs preparing the next frame.
1) Update Buffers, Textures and load shaders
2) Update/Create VAO and store draw information in RenderCommand
(part of this will later be moved into the RenderCommand builder jobs)
3) Submit the draw commands
Later on it should be able to proceed to the next frame somewhere between 2
and 3. That does imply that everything is cached for the draw commands to be
performed without conflicting if the backend node changes.
Change-Id: Ic54ff85a01621579722035bd194783bc4e61e58d
Task-number: QTBUG-54423
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
|
|
|
|
|
|
|
| |
This should allow to simplify the current rendering code and will help
improve it later.
Change-Id: Id9405485cf73aca7115ab7b175478af8e5304930
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
This avoids doing not necessary lookups to retrieve the id and will later
allow to be sure that we are relying on data that is not going to change
if the submission and frame processing are made in parallel.
Also added small comment outlining the tasks to do in doRender
Change-Id: Id1511a11e99100896f3e91ddd05ccd4b0c12524d
Task-number: QTBUG-54423
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
|
|
|
|
| |
Change-Id: Iab9c75e25ed9ec09f39282aa48fe827a65fdb136
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Introduces a specialized ShaderCache class. This is populated with
shaders on demand from render command processing. Likewise for adding
references to shared QOpenGLShaderPrograms from other Shader backend
nodes.
When a Shader backend node is destroyed, it will remove its reference
from the ShaderCache. When a shared QOpenGLShaderProgram has no
remaining references the cache marks it as pending deletion. If it
still has no references the next time the OpenGL submission thread
calls the purge() function on the cache, it will be removed.
With this approach the actual QOpenGLShaderProgram objects are
managed purely by the OpenGL submission thread and are owned by the
cache once added to it.
Task-number: QTBUG-53669
Change-Id: Ia8459b0fdb775148c83202a801ac41cbdd447bcc
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
|
|
|
|
|
| |
Change-Id: I2289ada6e9d17590c8e0891fde8dadcdb4d3e021
Task-number: QTBUG-53174
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
... by replacing them with C++11 range-for loops. To
avoid detaches of these mutable Qt containers, wrap
the container in qAsConst(), where needed.
This is the batch with low-risk changes. They operate
on local containers or the loop body clearly does not
cause the container to change.
Saves ~3.8KiB in text size on optimized GCC 6.0 Linux
AMD64 builds.
Change-Id: I9c9669dd89f44d371d7a9cd4fc83a7930a06ce17
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|
|
|
|
|
|
|
| |
To support glDrawArraysInstancedBaseInstance
Task-number: QTBUG-51515
Change-Id: I0c95b351ff7a3668f17256d0d875c3c36537fd01
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|
|
|
|
|
| |
Task-number: QTBUG-52736
Change-Id: I58f9cbcdf018e7b672d33dd865067485412b79fe
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
|
|
|
|
|
|
| |
Instead of creating QGraphicsApiFilter objects...
Change-Id: Idc723bdea9b97fef547170bd7dca386e5ca4f519
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|
|
|
|
| |
Change-Id: I665c2bb6b4c68c3a7cc5d3f7f91799ce3f67ca9f
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
|
|
|
|
| |
Change-Id: Ia4a3d85737fc4540d97f4e1c58505326a98a9c87
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
|
|
|
|
|
|
|
|
|
| |
Remove bound check from uploadDataToGLBuffer since the buffer never
released anywhere. Instead add the bound check to the render context with
variable caching the last bound buffer.
Task-number: QTBUG-52443
Change-Id: I75d706331a8af78e1a1057fcb2cd0fd88a5519c3
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|
|
|
|
|
|
|
|
| |
QtQuick renderer resets OpenGL state every frame. Thus we need
to explicitly set the clearColor, too, every frame.
Task-number: QTBUG-52712
Change-Id: I872e2e57db6d436d5754a6f5fa14588fbcc6f544
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|
|
|
|
|
|
|
| |
Adding antialiasing that can be enabled in renderstates
Change-Id: I0728e69dba5896ca86e56b940682990fafd0a297
Task-number: QTBUG-52191
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|
|
|
|
|
|
| |
Stops assert firing when trying to use a recycled Shader
Change-Id: Ifa18143a145654fd3f9e381627406e907a9e2d48
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|
|
|
|
| |
Change-Id: I80d0f414252ccc3f96ac3312d8ac1f08ee49fab0
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|
|
|
|
|
|
|
| |
RenderTarget attachments to DrawBuffer mapping was done in different
places. For now, lets do it centrally within AttachmentPack.
Change-Id: I4f6aa78a9964cd420ab67a991cb4186c15b928ee
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|
|
|
|
|
|
|
|
|
| |
Move some caching functionality into GraphicsContext, as this
has nothing to do with Rendering logic, but only reduces
amount of OpenGL calls.
Change-Id: I5a3c858e893da1498cb4bace9a212fec6b1de93e
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|
|
|
|
|
|
| |
Task-number: QTBUG-50116
Change-Id: I78e06b0e2846897e2edaa5711b4e0d4a8057a3fc
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|
|
|
|
|
|
| |
is covered by OpenGL standard functions
Change-Id: Ia7f32ec27c1725247a2c1f2bce4fba4433857932
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Also improve the alpha to coverage handlign in the helpers by using
a single function rather than two.
This removes GL errors about bad glFace enum values (caused by bad
handlign of alpha to coverage in switch statement, which led to a
FrontFace state being created with bad data).
Change-Id: I832d92fcb07134525f421d3a3b4d12e9f5f6428c
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
|
|
|
|
|
|
| |
Also make some functions inline whilst we are touching them anyway.
Change-Id: If44398d56a82e42689f26f22f0e07dba229529c6
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
|
|
|
|
|
|
|
|
|
| |
- clearColor
- clearDepthValue
- clearStencilValue
Task-number: QTBUG-51460
Change-Id: Ib31efde0b6ab97ef1f57d4ce71fb2fbca218dc85
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|
|
|
|
|
| |
Task-number: QTBUG-51460
Change-Id: I3f522f5eaea7bf0f94dbcdc1e7463f2827c0fe3b
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|
|
|
|
|
| |
Change-Id: I49e21c19deae6ec97566e33b68afa7dbaa3fe6b5
Task-number: QTBUG-51501
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
|
|
|
|
|
|
| |
This is needed to avoid rendering on a surface that has been destroyed.
Change-Id: Iadc2a32e2e0113704ca4df48df6bcdd1a0d8256c
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
After a TextureImage update, the corresponding backend texture node
DNA is not updated until its OpenGL texture is reloaded. This may not
happen if the previous texture DNA is the same as the one associated
with a texture unit.
Force a OpenGL texture/DNA update after we have new data from the load
texture job.
Change-Id: Id79ac9c177bb763d986354bdcd0e2736835cb94a
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- storing values in backend
- new functions being added
renamed plane to planeIndex
added QVector3D normal property
added float distance property
As per API review
Task-number: QTBUG-51435
Change-Id: Ie52804716510981af1467e96003304324fadd4d8
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|
|
|
|
|
|
|
| |
Found by clazy.
Change-Id: I3260b06e56f49a5e18a1b0e7f60e5b1856923c18
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|
|
|
|
| |
Change-Id: I72471d0b22d16bbbee33610e30a06daadffedbd9
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
|
|
|
|
|
|
|
| |
As per API review
renamed FooAttachment to just Foo
Change-Id: Ifd977b2b8bdb6706a70dd10f2ea3ee6a381c26b8
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
|
|
|
|
|
|
| |
As per API review
Change-Id: Icaca9797c01100402e6d103be2a0425820a717ec
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
|
|
|
|
|
|
|
|
| |
As per API review
New name was better fitting to the actual description/usage
Renamed point to attachmentPoint
Change-Id: Id14a312acabdcc9bda49a4d30efe490342105660
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
|
|
|
|
|
| |
Task-number: QTBUG-51465
Change-Id: I86831122ed8aab9fcb0b00d3e850be58e74bd0de
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|