summaryrefslogtreecommitdiffstats
path: root/src/render/graphicshelpers
Commit message (Collapse)AuthorAgeFilesLines
* Add GraphicsContext::supportsDrawBuffersBlend()Wieland Hagen2016-01-144-2/+9
| | | | | | | | | To check for availability of ARB_draw_buffers_blend Task-number: QTBUG-50005 Change-Id: I8f4e11ff401a9e1e3751f61421572cb1fc323979 Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Added glEnablei, glDisablei, glBlendFuncSeparateiWieland Hagen2016-01-1413-1/+144
| | | | | | | | | | Added glEnablei, glDisablei, glBlendFuncSeparate to GraphicsHelpers and GraphicsContext Task-number: QTBUG-50005 Change-Id: I01c3a6e26fde9756d62694235ba0c1a0fe5155ae Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* GraphicsHelper: add dispatch compute functionPaul Lemire2016-01-1313-3/+53
| | | | | Change-Id: I3c2614f0fc484d6f492d9302a3ec9335e827f741 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* RenderView/GraphicsContext: support SSBO/UBO with buffer used as ParametersPaul Lemire2016-01-1313-63/+103
| | | | | Change-Id: I347aa5deea6521b43b9033e2200ab2f8b272f671 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Rename QUniformPack to ShaderParameterPackPaul Lemire2016-01-132-3/+3
| | | | | | | | This will make it more clear that it also contains other things like UBO/SSBO which are pure Uniform values. Change-Id: I641246798b8c868d7bfdfde381221d9a97ed2d35 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* GraphicsContext: use GLBuffer instead of QOpenGLBufferPaul Lemire2016-01-132-90/+107
| | | | | | | | This will be needed to simplify the process of binding SSBO/UBO buffers. Change-Id: Ice3bb97381328c5bddf1c9e46af30b4814ff2572 Note: ShaderData UBO handling temporarly disabled. Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* RenderView: sliglty modified to later accommodate compute callsPaul Lemire2016-01-131-3/+7
| | | | | Change-Id: Ic821747677c9d2f117494d2ecfd89f47f982fa3f Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* GLBuffer: modified to be used as a generic GL bufferPaul Lemire2016-01-131-2/+2
| | | | | Change-Id: I6e3b763864587ac4b12f6a458f84d3642f20b32c Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Rename UniformBuffer to GLBufferPaul Lemire2016-01-131-2/+2
| | | | | | | | This class could be reused for any kind of GLBuffer (not just uniform buffer) so rename it accordingly. Change-Id: I978696534f64fc3717ac135af94e9fe44aa23fba Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Shaders: retrieve SSBO blockPaul Lemire2016-01-1312-28/+148
| | | | | Change-Id: I62065d30b197367c8e5e03099c3af034892c4038 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Add glBlendFunci() to GraphicsContext + GraphicsHelperWieland Hagen2016-01-0713-0/+53
| | | | | | | | Only for OpenGL 4.0. Task-number: QTBUG-50005 Change-Id: I70984a2bff3afc04539efa7dea60196aa06e72d2 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Sort GraphicsContext + GraphicsHelper methodsWieland Hagen2016-01-077-210/+211
| | | | | | | They were a big mess, now they are a smaller mess. Change-Id: I4e21e340a24588370cf8b17b54ebb9e03fe07b4a Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Add glPointSize() helper functionsWieland Hagen2015-12-2713-0/+67
| | | | | | | | | | OpenGL ES 2.0 doesn't support glPointSize(), but OpenGL 2.0+ does, so we need to call it though a QGraphicsHelperInterface. When on OpenGL ES 2.0, just print a warning. Task-number: QTBUG-49562 Change-Id: Icbd5f602cae38f95925d99003ec3ee9aebb3719e Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Fix Rendering to Scene3D on Raspberry Pi (maybe other ES2 devices)Andy Nichols2015-12-091-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | When using an external FBO like in the case of Scene3D, we try to get the query the size of the FBO's color attachment so that we can call glViewport in the case that there are multiple viewports. For ES2 this is problematic because it is not possible to query the size of a GL_TEXTURE attachment (which the attachment will normally be if there is no multi-sampling). When the query is not possible we simply return without calling glViewport. On ES2 it is possible to query the size of a RenderBuffer and this has been implemented for this code path. As an oddity in the VideoCore OpenGL drivers for the Raspberry Pi, when we query the type of the color attachment for the FBO, it returns the type as RenderBuffer even though we created it as a GL_TEXTURE (likely because they are the same in the driver). This creates an issue though because when we query the size of the RenderBuffer it returns a height and width of 0, which we then use to call glViewport, leading to nothing being rendered into the FBO. This commit checks the validity of the size before making the call to glViewport. Change-Id: I0c3235afd7bcc7fe70ca0dda0379b1ceb2cdab38 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Warn if uint index type is not supported on ES2Laszlo Agocs2015-12-071-0/+10
| | | | | | | | | Instead of crypic "GL error after drawing mesh: 500" errors recognize the situation and show a warning (once) to let the user know what is wrong. Unfortunately this is still common on devices like the RPi. Change-Id: Id7ef38cebdb84c4d89ea6d48ede80f253fd60371 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* GraphicsContext: remove buffer releasePaul Lemire2015-11-241-6/+4
| | | | | | | | | | | | | Fixes crashes when buffers are updated. Bind VAO Bind Buffer Update Buffer Unbing Buffer -> this was causing a crash Task-number: QTBUG-49614 Change-Id: I968588e4fdf6bdeeeb493847dbe97d50bb707183 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* GraphicsHelper: fix switchPaul Lemire2015-11-201-5/+5
| | | | | Change-Id: I9bc47d84407d1ed6fc5efd7d2acfff094855939c Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
* Renderer: use NodeManagersPaul Lemire2015-11-161-20/+25
| | | | | Change-Id: I8d505034b24c3ec00b93ace02e5a4fe450939478 Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
* Rename QOpenGLFilter to QGraphicsApiFilterAndy Nichols2015-11-032-9/+9
| | | | | | | | | | | | | | | | | | | | | | This API change is part of an effort to remove anything specific to one graphics API (in this case OpenGL) from the public APIs. In addition to the name of the class being changed, the QGraphicsApiFilter::Api has been refactored to reference the Graphics API, rather than an OpenGL API. Now this list includes OpenGL, and OpenGLES, but could also include Vulkan, DirectX, or any other graphics rendering API we wish to support in the future. Right now the properties in this class are still reflective of the OpenGL APIs, and may need to be extended with other properties in the future for other rendering technologies. The QGraphicsApiFilter::Profile enum has also been changed to be more more clear. So for now there are enums NoProfile, CoreProfile, and CompatibilityProfile. Task-number:QTBUG-49078 Change-Id: Ib5f9c3b7adee5badec6bce8a12b23683eb43b4cb Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com> Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Rename Renderer -> Render throughoutSean Harmer2015-10-1912-34/+34
| | | | | | | | This is for consistency between the C++ namespaces and QML imports and with the other aspects. Change-Id: I73392f138b4e519b12888f52530123e3d0ba445e Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Uniform Buffers: try to minimize bind / unbindPaul Lemire2015-10-141-1/+10
| | | | | Change-Id: I52c7d3fd3ff50211f2869df7e81e70ca1475d245 Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
* GL3 helpers fix: use QByteArray left to avoid trash charactersPaul Lemire2015-10-143-6/+9
| | | | | | | When retrieving UBO block names Change-Id: I3b3c4622491d17f53f2a972623eead9c998925df Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
* Move Qt3DCore into Qt3DCore namespaceSean Harmer2015-10-132-2/+2
| | | | | | | Update other aspects, tests and examples accordingly. Change-Id: Ib1bcf0bdf4f5aec4422dc0c80bfc32b27fb1a317 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Add "We mean it" warnings to private headersSean Harmer2015-10-137-0/+77
| | | | | Change-Id: Ic4a69123255c33990765ea3601e01914c2d8cb70 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Move render state classes into own dir and tidy upSean Harmer2015-10-131-1/+1
| | | | | Change-Id: I0829c42283d6a25e9b3ec623f45739ea266718cf Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Remove Q prefix from graphics helpersSean Harmer2015-10-1314-353/+353
| | | | | Change-Id: I79066df0df1fbac4f49e47c91c552fca0d4093bf Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Move graphicshelpers into their own directorySean Harmer2015-10-1314-0/+5922
This is a move towards grouping files by function rather than frontend vs backend. Change-Id: I7d0536cb3875618a4b7acd841dde6eaaf65cddf1 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>