summaryrefslogtreecommitdiffstats
path: root/src/render/backend/rendertexture.cpp
Commit message (Collapse)AuthorAgeFilesLines
* QBackendNodeFunctor: get and destroy now take a QNodeIdPaul Lemire2015-02-281-4/+4
| | | | | | | | This will help fixing the dynamic destruction in follow up patches. Change-Id: Id44fbeac388628c0e563d288e13d1f15d7ac0c24 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Copyright header change.Mika Salmela2015-02-091-19/+14
| | | | | | | | As for preparation for Qt5.5 release the copyright header is updated to correspond the current license requirements. Change-Id: I36632918b66f455539453b42c369689fb11298ec Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* RenderTexture: wrapping on R is only available on 3D texturesPaul Lemire2015-02-081-3/+1
| | | | | Change-Id: Id2312ad96f92326960283be6d2f1a0b0404fc1f9 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* RenderTexture/TextureImage: provide unique dna for sharingPaul Lemire2015-02-081-3/+34
| | | | | Change-Id: Id8bbbefaccff1915508ec90d5342cb4799f3f022 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Make textures functional with GLES2Laszlo Agocs2015-02-081-7/+27
| | | | | | | | | OpenGL ES 2.0, unlike 3.0 and later, does not support sized formats. Therefore RGBA8_UNorm and friends will all fail. Instead, we must map and pass RGBAFormat and similar. Change-Id: I37c3581fbddc8b58af7af66ba4392e57e9cb965a Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Texture API refactoringPaul Lemire2015-02-081-55/+154
| | | | | | | | | | * Added LoadTextureDataJob * QAbstractTextureProvider: maximum layers property * Automatic QAbstractTextureProvider::TextureFormat added * material-qml should work perfectly with that patch. Change-Id: I3f92f13b783155798772086304a30126a4fc687d Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* RenderTexture: update list of texture image id to texture image handlesPaul Lemire2015-02-081-6/+54
| | | | | | | | | | | | | That required a custom backend functor creator. QRenderAspect was updated to use the correct functor. This will provide faster lookups. Also introduced TextureDNA. The goal is to build a unique key based on the texture properties and each texture image (including layer position, mipmaplevel and cubemapface). Then when applying a texture it will just be a matter of comparing hashes. Change-Id: Ic07aea6bc1cbcb1059ec5bcdd458ccc51e1feda9 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* RenderTexture: contains list of TextureImage idPaul Lemire2015-02-081-13/+53
| | | | | | Change-Id: Ia3a49da501e7acded7d99150ad64ef1a91333073 Note: also updated the cleanup method Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QTexture renamed to QAbstractTextureProviderPaul Lemire2015-02-081-25/+25
| | | | | | | | | | This is done prior to the whole texture API refactoring. Doc was also added, might need improvement later on but a base is present at least. Change-Id: I75589f14dfbfba7bc4250b2e0960670e020ed38a Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Texture: introduce comparisons functions/modesGiuseppe D'Angelo2015-01-171-0/+16
| | | | | Change-Id: I3ce4f66f9ea5abdfa1a7864eb0dd1cbed2f38305 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Fix handling of the maximum anisotropyGiuseppe D'Angelo2015-01-151-1/+2
| | | | | | | | It was leaked when copying a QTexture, and used without checking if the texture supported anisotropic filtering. Change-Id: I881fd075c844a7aca9802f2a0d211d1877683ae9 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* RenderTexture: use Q_NULLPTR instead of NULLPaul Lemire2014-12-301-1/+1
| | | | | Change-Id: I87cbd1487de27ff04428eebeff4207fe4b958108 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QTexture refactoringPaul Lemire2014-10-301-7/+27
| | | | | | | | | | | | | | Target is now set in the ctor from C++. On the QML side, there's a QTexture subclass for each target. WrapMode on s, t, r for texture, accessible as a grouped property in QML. Note: I left out the static fromImage as I didn't really understand their purpose. Please let me know what I'm missing. Change-Id: I16f75283ae459cbd8ab2d1ec53584b3022bc965b Task-number: QTBUG-41537 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Rename RendererAspect -> QRenderAspectSean Harmer2014-10-261-1/+0
| | | | | Change-Id: Ib16fe125e160764571775f3667cff082db921f7d Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Moved most of the managers into a single header filePaul Lemire2014-10-171-1/+0
| | | | | | | | Makes the project smaller and easier to understand. Change-Id: I2ee5f8c88a61c70b2173c2d69d62a1cd9a646141 Reviewed-by: James Turner <james.turner@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* RenderTexture: QBackendNode subclassPaul Lemire2014-10-171-53/+30
| | | | | | | Using RenderNodeFunctor as creation functor Change-Id: I0e27569a2724aa29d7aef5c70b7ce9530858167c Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QAspectManager made privatePaul Lemire2014-10-171-1/+1
| | | | | | | | | Note: the export is maintained for the moment because the renderer aspect still needs to know about that class. When the QBackendNode will be introduced and QAbstractAspect refactored, this will be removed. Change-Id: I35144c964cd36972866cc2b80ed3ffb2709a45b9 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QChangeArbiter and Observers/Observables made privatePaul Lemire2014-10-171-1/+1
| | | | | | | | | Note: the Renderer aspect uses all those private headers, when we introduce the QBackendNode class that will be a wrapper around those, we will be able to remove those private includes. Change-Id: I6240f754e6da251da158cafcf76029ae59000e05 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Support anisotropic texture filteringSean Harmer2014-10-041-1/+7
| | | | | Change-Id: Ifb126b8516a0d4f3bac22fdf8d8e65cf1850ba97 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Set maximum number of mipmap levels if mipmaps requestedSean Harmer2014-10-041-3/+3
| | | | | | | | Later on we may want to provide some control over the number of mip map levels generated. Change-Id: I9ad3da3f19e1fb169dfd0f572297bee8239058d9 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* RenderTexture: fixes + reset flagPaul Lemire2014-10-031-33/+78
| | | | | | | | | | We were modifying the texture directly in the QAspectManager thread instead of the Render thread. Added a isTextureReset which will help us checking if a FBO attachments have changed. Change-Id: Ia4855cdd45dffdbdc2dece3916347afeab3744db Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Use QOpenGLFunctions where missingAndrew Knight2014-10-011-6/+12
| | | | | | | | This prevents linker errors with dynamic OpenGL builds. Change-Id: I966b6607ed031fa5e145510b023c8ecafc74bea3 Reviewed-by: Andrew Knight <andrew.knight@digia.com> Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Fix a crash when recreating a textureGiuseppe D'Angelo2014-09-291-1/+0
| | | | | | | | | | | m_gl is allowed to be NULL, so its usage should be guarded. But the call made at that point made no sense: destroying a QOpenGLTexture object also releases the underlying GL objects, so just remove it. Change-Id: I82bfaf16992f94420aa9128522d9bca065adc027 Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* RenderTexture properly copies frontend propertiesPaul Lemire2014-09-151-15/+120
| | | | | Change-Id: I4bd6cf5001394f85c92fc70ccd78a8a8ccd50d2c Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Added FragmentOutput type to ParameterMapperPaul Lemire2014-09-151-0/+1
| | | | | | Change-Id: Idbe11d632f123499bb4e12650c04d59d76d7cb8c Reviewed-by: Paul Lemire <paul.lemire@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QTexture fixes so that it is properly added as a childPaul Lemire2014-09-151-0/+6
| | | | | | | | | It will be built automatically by the RenderSceneBuilder in a following patch. Change-Id: I66c9790ffaf8c3d90d5fee5a3c54e0aea2c67217 Reviewed-by: Paul Lemire <paul.lemire@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Texture renamed to QTexturePaul Lemire2014-08-191-2/+2
| | | | | Change-Id: I6f5570ce042b8d3ef44aa76c1fd8ce3a1dde4d3c Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Mark backend render classes as private and fix compilationSean Harmer2014-08-171-1/+1
| | | | | Change-Id: I1afb8408e03d4b5405e8ee82d1a3b6b4364d3f5d Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Texture updatedPaul Lemire2014-06-271-5/+5
| | | | | | | | | | | Added Q_PROPERTY to be able to set all values from QML. Couldn't register QOpenGLTexture enums directly as QOpenGLTexture is not a QObject so enums values where copied to Texture. A static_cast allows to convert directly a Texture enum to a QOpenGLTexture enum. Corrected Quick3DTexture and registered it as an extended type. Change-Id: I1a99a2dd549722cd647cc53f60e720e0c4039df9 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Replaced QmlTexture by Quick3DTexturePaul Lemire2014-05-301-1/+1
| | | | | | | | | Separated Texture from TextureData. Quick3DTexture is a sublcass of Quick3DNode and Texture. This is part of a serie of patches aimed at specifying how Uniforms and Textures are going to be defined from QML. Change-Id: Ia1a9acfc4d9b07299a103bdbbffcc34aa4b79177 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* RenderClass have a default constructor.Paul Lemire2014-04-101-3/+8
| | | | | | | Allows RenderClass to be used by the ResourcesManager Change-Id: Icad9d26649858bc4a1c1dd61a233a4a46f5163ab Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Fix builds with namespaced QtSean Harmer2014-04-021-3/+5
| | | | | | Change-Id: I15a4a472f5283c56c8185b05699e33368c45ddb0 Reviewed-by: Paul Lemire <paul.lemire@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Relocate the render aspect outside of coreSean Harmer2014-03-291-0/+152
| | | | | Change-Id: I636442d2d71342fd248b90674176cede895feab2 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Import initial examples and export symbols from libSean Harmer2014-02-251-149/+0
| | | | | Change-Id: I6eb7c66cb96956e3cb3e1d319a82a08a0fd3c37a Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Initial import of Qt3DCore and Renderer aspectSean Harmer2014-02-101-0/+149
For now the renderer aspect is still compiled into the Qt3DCore library. This needs to be split out into a plugin so it can be loaded dynamically along with other future aspects. Change-Id: Iba8402b35c7ebc1c503d438c87aad77f5fef2261 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>