diff options
Diffstat (limited to 'src/runtime/dragon')
4 files changed, 16 insertions, 16 deletions
diff --git a/src/runtime/dragon/geometry/dragonbuffervisitor_p.h b/src/runtime/dragon/geometry/dragonbuffervisitor_p.h index 8526e38..70be1f1 100644 --- a/src/runtime/dragon/geometry/dragonbuffervisitor_p.h +++ b/src/runtime/dragon/geometry/dragonbuffervisitor_p.h @@ -95,7 +95,7 @@ public: } bool apply(const Attribute &attribute, - const Buffer &attributeBuffer, + const LoadedBuffer &attributeBuffer, int drawVertexCount) { if (attribute.vertexBaseType() != VertexBaseType) @@ -103,7 +103,7 @@ public: if (attribute.vertexSize() < dataSize) return false; - auto data = attributeBuffer.m_data; + auto data = attributeBuffer.data; auto buffer = BufferTypeInfo::castToType<VertexBaseType>(data, attribute.byteOffset()); switch (dataSize) { @@ -118,9 +118,9 @@ public: } bool apply(const Attribute &attribute, - const Buffer &attributeBuffer, + const LoadedBuffer &attributeBuffer, const Attribute &indexAttribute, - const Buffer &indexBuffer, + const LoadedBuffer &indexBuffer, int drawVertexCount, bool primitiveRestartEnabled, int primitiveRestartIndex) @@ -130,10 +130,10 @@ public: if (attribute.vertexSize() < dataSize) return false; - auto data = attributeBuffer.m_data; + auto data = attributeBuffer.data; auto buffer = BufferTypeInfo::castToType<VertexBaseType>(data, attribute.byteOffset()); - auto indexData = indexBuffer.m_data; + auto indexData = indexBuffer.data; if (indexAttribute.vertexBaseType() == QAttribute::UnsignedShort) { auto indexBuffer = BufferTypeInfo::castToType<QAttribute::UnsignedShort>(indexData, indexAttribute.byteOffset()); switch (dataSize) { diff --git a/src/runtime/dragon/jobs/dragonboundingvolumejobs.cpp b/src/runtime/dragon/jobs/dragonboundingvolumejobs.cpp index e996c7d..2b96f3b 100644 --- a/src/runtime/dragon/jobs/dragonboundingvolumejobs.cpp +++ b/src/runtime/dragon/jobs/dragonboundingvolumejobs.cpp @@ -57,9 +57,9 @@ public: const Sphere &result() { return m_volume; } bool apply(const Attribute &positionAttribute, - const Buffer &attributeBuffer, + const LoadedBuffer &attributeBuffer, const Attribute &indexAttribute, - const Buffer &indexBuffer, + const LoadedBuffer &indexBuffer, int drawVertexCount, bool primitiveRestartEnabled, int primitiveRestartIndex) @@ -181,7 +181,7 @@ LocalBoundingVolumes calculateLocalBoundingVolumes(LocalBoundingVolumes localBou const ValueContainer<Attribute> &attributes, const ValueContainer<GeometryRenderer> &geometryRenderers, const ValueContainer<Geometry> &geometries, - const ValueContainer<Buffer> &buffers) + const ValueContainer<LoadedBuffer> &buffers) { localBoundingVolumes.reset(); diff --git a/src/runtime/dragon/jobs/dragonboundingvolumejobs_p.h b/src/runtime/dragon/jobs/dragonboundingvolumejobs_p.h index 7105dd5..55a0907 100644 --- a/src/runtime/dragon/jobs/dragonboundingvolumejobs_p.h +++ b/src/runtime/dragon/jobs/dragonboundingvolumejobs_p.h @@ -55,7 +55,7 @@ class Attribute; class Entity; class GeometryRenderer; class Geometry; -class Buffer; +struct LoadedBuffer; struct LocalBoundingVolumeResult { Sphere boundingVolume; @@ -69,9 +69,9 @@ struct LocalBoundingVolumeResult { Qt3DCore::QNodeId indexAttributeId; Immutable<Attribute> indexAttribute; Qt3DCore::QNodeId positionBufferId; - Immutable<Buffer> positionBuffer; + Immutable<LoadedBuffer> positionBuffer; Qt3DCore::QNodeId indexBufferId; - Immutable<Buffer> indexBuffer; + Immutable<LoadedBuffer> indexBuffer; }; using LocalBoundingVolumes = ValueContainer<LocalBoundingVolumeResult>; @@ -82,7 +82,7 @@ LocalBoundingVolumes calculateLocalBoundingVolumes(LocalBoundingVolumes localBou const ValueContainer<Attribute> &attributes, const ValueContainer<GeometryRenderer> &geometryRenderers, const ValueContainer<Geometry> &geometries, - const ValueContainer<Buffer> &buffers); + const ValueContainer<Qt3DRender::Dragon::LoadedBuffer> &buffers); WorldBoundingVolumes calculateWorldBoundingVolumes(WorldBoundingVolumes worldBoundingVolumes, const LocalBoundingVolumes &localBoundingVolumes, diff --git a/src/runtime/dragon/qdragonrenderaspect.cpp b/src/runtime/dragon/qdragonrenderaspect.cpp index e6d57c0..bad00f3 100644 --- a/src/runtime/dragon/qdragonrenderaspect.cpp +++ b/src/runtime/dragon/qdragonrenderaspect.cpp @@ -267,9 +267,11 @@ QDragonRenderAspect::QDragonRenderAspect(Renderer::RenderType renderType) m_calculateWorldTransforms = TaskPtr<ValueContainer<Matrix4x4>>::create( calculateWorldTransforms, Self, m_entities, m_transforms, m_rootEntitySource); + m_loadBuffers = TaskPtr<LoadedBuffers>::create(loadBuffers, Self, m_buffers); + m_calculateLocalBoundingVolumes = TaskPtr<LocalBoundingVolumes>::create( calculateLocalBoundingVolumes, Self, m_entities, m_attributes, - m_geometryRenderers, m_geometries, m_buffers); + m_geometryRenderers, m_geometries, m_loadBuffers); m_calculateWorldBoundingVolumes = TaskPtr<WorldBoundingVolumes>::create( calculateWorldBoundingVolumes, Self, m_calculateLocalBoundingVolumes, @@ -293,8 +295,6 @@ QDragonRenderAspect::QDragonRenderAspect(Renderer::RenderType renderType) m_renderTargetOutputs, m_shareContextSource); - // TODO might as well upload them as well... - m_loadBuffers = TaskPtr<LoadedBuffers>::create(loadBuffers, Self, m_buffers); // m_loadShaders = TaskPtr<ValueContainer<GLShader>>::create(uploadShaders, Self, m_shaders); |