diff options
Diffstat (limited to 'src/plugins/renderers')
6 files changed, 15 insertions, 14 deletions
diff --git a/src/plugins/renderers/opengl/graphicshelpers/graphicscontext.cpp b/src/plugins/renderers/opengl/graphicshelpers/graphicscontext.cpp index 508b38755..30a8184b5 100644 --- a/src/plugins/renderers/opengl/graphicshelpers/graphicscontext.cpp +++ b/src/plugins/renderers/opengl/graphicshelpers/graphicscontext.cpp @@ -52,9 +52,7 @@ #include <Qt3DRender/private/buffermanager_p.h> #include <Qt3DRender/private/managers_p.h> #include <Qt3DRender/private/attachmentpack_p.h> -#include <Qt3DRender/private/qbuffer_p.h> #include <Qt3DRender/private/attachmentpack_p.h> -#include <Qt3DRender/private/qbuffer_p.h> #include <Qt3DRender/private/renderstateset_p.h> #include <QOpenGLShaderProgram> #include <glresourcemanagers_p.h> @@ -971,8 +969,10 @@ GLuint GraphicsContext::byteSizeFromType(GLint type) return 0; } -GLint GraphicsContext::glDataTypeFromAttributeDataType(QAttribute::VertexBaseType dataType) +GLint GraphicsContext::glDataTypeFromAttributeDataType(Qt3DCore::QAttribute::VertexBaseType dataType) { + using namespace Qt3DCore; + switch (dataType) { case QAttribute::Byte: return GL_BYTE; diff --git a/src/plugins/renderers/opengl/graphicshelpers/graphicscontext_p.h b/src/plugins/renderers/opengl/graphicshelpers/graphicscontext_p.h index 8da1a420c..ba474a89b 100644 --- a/src/plugins/renderers/opengl/graphicshelpers/graphicscontext_p.h +++ b/src/plugins/renderers/opengl/graphicshelpers/graphicscontext_p.h @@ -60,9 +60,9 @@ #include <QMatrix4x4> #include <QBitArray> #include <QImage> +#include <Qt3DCore/qattribute.h> #include <Qt3DRender/qclearbuffers.h> #include <Qt3DRender/private/shader_p.h> -#include <Qt3DRender/qattribute.h> #include <Qt3DRender/qmemorybarrier.h> #include <Qt3DRender/private/handle_types_p.h> #include <Qt3DRender/private/qgraphicsapifilter_p.h> @@ -184,7 +184,7 @@ public: static GLint elementType(GLint type); static GLint tupleSizeFromType(GLint type); static GLuint byteSizeFromType(GLint type); - static GLint glDataTypeFromAttributeDataType(QAttribute::VertexBaseType dataType); + static GLint glDataTypeFromAttributeDataType(Qt3DCore::QAttribute::VertexBaseType dataType); bool supportsDrawBuffersBlend() const; bool supportsVAO() const { return m_supportsVAO; } diff --git a/src/plugins/renderers/opengl/graphicshelpers/submissioncontext.cpp b/src/plugins/renderers/opengl/graphicshelpers/submissioncontext.cpp index b22477435..519f2ae98 100644 --- a/src/plugins/renderers/opengl/graphicshelpers/submissioncontext.cpp +++ b/src/plugins/renderers/opengl/graphicshelpers/submissioncontext.cpp @@ -39,6 +39,7 @@ #include "submissioncontext_p.h" +#include <Qt3DCore/private/qbuffer_p.h> #include <Qt3DRender/qgraphicsapifilter.h> #include <Qt3DRender/qparameter.h> #include <Qt3DRender/qcullface.h> @@ -54,7 +55,6 @@ #include <Qt3DRender/private/buffermanager_p.h> #include <Qt3DRender/private/managers_p.h> #include <Qt3DRender/private/attachmentpack_p.h> -#include <Qt3DRender/private/qbuffer_p.h> #include <Qt3DRender/private/stringtoint_p.h> #include <gltexture_p.h> #include <rendercommand_p.h> @@ -97,6 +97,8 @@ QT_BEGIN_NAMESPACE #define GL_DRAW_FRAMEBUFFER 0x8CA9 #endif +using namespace Qt3DCore; + namespace Qt3DRender { namespace Render { namespace OpenGL { @@ -1461,7 +1463,7 @@ void SubmissionContext::uploadDataToGLBuffer(Buffer *buffer, GLBuffer *b, bool r // * partial buffer updates where received // TO DO: Handle usage pattern - QVector<Qt3DRender::QBufferUpdate> updates = std::move(buffer->pendingBufferUpdates()); + QVector<Qt3DCore::QBufferUpdate> updates = std::move(buffer->pendingBufferUpdates()); for (auto it = updates.begin(); it != updates.end(); ++it) { auto update = it; // We have a partial update diff --git a/src/plugins/renderers/opengl/graphicshelpers/submissioncontext_p.h b/src/plugins/renderers/opengl/graphicshelpers/submissioncontext_p.h index d43cae4f8..59b2b78f3 100644 --- a/src/plugins/renderers/opengl/graphicshelpers/submissioncontext_p.h +++ b/src/plugins/renderers/opengl/graphicshelpers/submissioncontext_p.h @@ -59,7 +59,6 @@ #include <texturesubmissioncontext_p.h> #include <imagesubmissioncontext_p.h> #include <Qt3DRender/qclearbuffers.h> -#include <Qt3DRender/qattribute.h> #include <Qt3DRender/private/handle_types_p.h> #include <Qt3DRender/private/attachmentpack_p.h> diff --git a/src/plugins/renderers/opengl/renderer/renderer.cpp b/src/plugins/renderers/opengl/renderer/renderer.cpp index 2dafa15c5..deb77ee4b 100644 --- a/src/plugins/renderers/opengl/renderer/renderer.cpp +++ b/src/plugins/renderers/opengl/renderer/renderer.cpp @@ -1116,7 +1116,7 @@ void Renderer::lookForDownloadableBuffers() const QVector<HBuffer> activeBufferHandles = m_nodesManager->bufferManager()->activeHandles(); for (const HBuffer &handle : activeBufferHandles) { Buffer *buffer = m_nodesManager->bufferManager()->data(handle); - if (buffer->access() & QBuffer::Read) + if (buffer->access() & Qt3DCore::QBuffer::Read) m_downloadableBuffers.push_back(buffer->peerId()); } } diff --git a/src/plugins/renderers/opengl/renderer/renderview.cpp b/src/plugins/renderers/opengl/renderer/renderview.cpp index 47f4beffd..326a8a91b 100644 --- a/src/plugins/renderers/opengl/renderer/renderview.cpp +++ b/src/plugins/renderers/opengl/renderer/renderview.cpp @@ -381,8 +381,8 @@ struct SubRangeSorter { static void sortSubRange(CommandIt begin, const CommandIt end) { - Q_UNUSED(begin); - Q_UNUSED(end); + Q_UNUSED(begin) + Q_UNUSED(end) Q_UNREACHABLE(); } }; @@ -705,13 +705,13 @@ EntityRenderCommandData RenderView::buildDrawRenderCommands(const QVector<Entity for (Qt3DCore::QNodeId attributeId : attributeIds) { Attribute *attribute = m_manager->attributeManager()->lookupResource(attributeId); switch (attribute->attributeType()) { - case QAttribute::IndexAttribute: + case Qt3DCore::QAttribute::IndexAttribute: indexAttribute = attribute; break; - case QAttribute::DrawIndirectAttribute: + case Qt3DCore::QAttribute::DrawIndirectAttribute: indirectAttribute = attribute; break; - case QAttribute::VertexAttribute: + case Qt3DCore::QAttribute::VertexAttribute: estimatedCount = std::max(int(attribute->count()), estimatedCount); break; default: |