summaryrefslogtreecommitdiffstats
path: root/src/render/renderers/opengl/graphicshelpers
Commit message (Collapse)AuthorAgeFilesLines
* Complete ES 3.1 and 3.2 helpersPaul Lemire2018-09-215-3/+206
| | | | | | | | | | | Which didn't handle indirect drawing, compute and tessellation Since ES 3.1/3.2 don't provide API for glShaderStorageBlockBinding, code was adjusted to use the default binding points and not require that API. Change-Id: Ie4dcd05f0a1d72e4a25f49b5fae138dc605ba5e3 Task-number: QTBUG-70660 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Fix: remove compile warning in graphicscontext.cppPaul Lemire2018-08-211-1/+1
| | | | | Change-Id: I3f1b5cca75973abf8970b3f1929a3a0ea385d8f1 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Avoid initializing GraphicsContext on every frameLaszlo Agocs2018-08-142-4/+1
| | | | | | | | | m_initialized is inherited from GraphicsContext, having another m_initialized in SubmissionContext is wrong. Change-Id: I431ba67c671b8854fafce769c8bfd90ba71e7441 Reviewed-by: Andy Nichols <andy.nichols@qt.io> Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Properly update properties from Backend to Frontend texturesPaul Lemire2018-08-081-1/+1
| | | | | | | | | | | | | | | | | | | Taking into account we have texture sharing in the backend, we can only update frontend texture properties once we have created the shared backend texture. Code was adjusted to retrieve these properties when creating the GLTexture. Such changes are stored and sent on the next run loop from a job where they are distributed to all referenced frontend Texture. The status property handling has also been updated to send status changes to all shared textures instead of just the texture whose data generator is used to gather the data. A manual test checking texture property updates, sharing and remote url sharing has also been added. Change-Id: I8ed2449fe57c9d7337580b0f7561f974cbd5006d Task-number: QTBUG-65775 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Don't abort rendering when env light textures are not setPaul Lemire2018-06-271-2/+10
| | | | | | | | | | | | | | | | | | The MetalRoughMaterial provides parameters for the env light textures even though they are optional but are needed to avoid issues with unbound textures on some drivers. In practice, when an env light is present, the values would be overridden. However if no env light is present, when setting the texture values on the shader, they would actually reference invalid textures and Qt3D would not render. We want to keep the behavior for the general case but make an exception for MetalRoughMaterial, therefore we are checking if the missing textures are the ones for env light or not before aborting. Ideally, we should shortly be able to remove the QParameters altogether with the Shader Builder. Change-Id: Id54436ff9e328c390eacceb3e63809c757b28b2a Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
* Add a GLES 3.1 graphics helperLaszlo Agocs2018-05-297-2/+314
| | | | | | | | | | | | | ...to enable sampler2DMS uniforms. Also fixes the ES3 helper when it comes to uniformByteSize. [ChangeLog] 2D samplers for multisample textures are now supported on OpenGL ES 3.1 and newer Task-number: QTBUG-68403 Change-Id: Iee1bd8baf097e19d89f651845938c681fb2a4df9 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Fix BlitFramebuffer on GLESLaszlo Agocs2018-05-293-2/+16
| | | | | | Task-number: QTBUG-68395 Change-Id: I216f32bd22d12c6fa6f2efd09765ad95754326b4 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Fix flashing and crashing of scene2dMäättä Antti2018-05-291-0/+42
| | | | | | | | | Prevent simultanious usage of the GLTexture being rendered to by scene2d. Task-number: QTBUG-68511 Task-number: QT3DS-1792 Change-Id: I88de12cba68ef7af2c7afb1f6e9d6143028efc86 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Merge remote-tracking branch 'origin/5.11.0' into 5.11Qt Forward Merge Bot2018-05-091-1/+2
|\ | | | | | | Change-Id: I666d4ca1ad39f81e41a9b47a8828d1689ff2b33e
| * Remove race in texture data uploadPaul Lemire2018-05-041-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | In the non locked submission phase of the renderer, the GLTextures must have had their content/properties already updated as this is too late to actually create or upload texture based on references which may be invalid or outdated. This wasn't properly handled. We now perfom the GLTexture creation and data upload when both the RenderThread and AspectThread are locked. Task-number: QTBUG-67989 Change-Id: I07ac23120e8d37a86e60d2b892d1437b8cb0b3dc Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Fix compile warningsMike Krus2018-04-201-0/+2
|/ | | | | Change-Id: I4aceeeb455aedc3c84e3a17983a894f1f84bdc09 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* ES2: Ignore mode when calling bindFrameBufferObjectAndy Nichols2018-04-123-21/+29
| | | | | | | | When using bindFrameBufferObject with ES2 the only available target is GL_FRAMEBUFFER. Change-Id: Ie8fd50a57deeae3e8e02885e954ff73d85712c14 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* ES2: Enable Renderbuffer usage with either Depth or StencilAndy Nichols2018-04-123-6/+24
| | | | | | | | | | Current we require a combined DepthStencil RenderBuffer, however this is an extension in ES2 so it's not a given that it will be available. It is still possible to setup separate Depth and Stencil buffers for those devices that only support that (similar to what Scenegraph does). Change-Id: Ia112b30e229bfc553cd0cdc0f8dd8b57290c7081 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Fix compilation with QT3D_RENDER_ASPECT_OPENGL_DEBUG defineAndy Nichols2018-04-121-1/+1
| | | | | Change-Id: If89cc9d4be85ad36dfd7549e58327d8a525210e9 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* SubmissionContext: improve specifyAttributePaul Lemire2018-03-201-8/+9
| | | | | | | By reusing existing VAOVertexAttribute instance Change-Id: I78554a5849f76a01e901371e4dcb363779906f86 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* RenderStates: rework to split node and rendering partPaul Lemire2018-03-192-1/+386
| | | | | | | | | | The apply method was removed from GenericState and its subclasses. This allows to keep the GenericStates in the aspect part and let the renderer perform the right calls based on the state class it is provided with. Change-Id: I9c3ac04b4eb489e7443e67615e35e850c0aba07f Task-number: QTBUG-61151 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Move Renderer specific classes into new folderPaul Lemire2018-03-1920-0/+9974
This is another step toward isolating the renderer from the render aspect Change-Id: I4031675b961d6645b65bbe05cf62d150993038b0 Task-number: QTBUG-61151 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>