[Interest] Qt3D not deleting buffers
Juan Jose Casafranca
jjcasmar at gmail.com
Mon Oct 3 17:26:12 CEST 2016
Hi Sean,
thanks for your fast reply.
I dont know what is a JIRA. Anyway, I have prepared a very simple example
where I can reproduce one of the problems I was explaining in my previous
message.
I go through the code:
The main creates the QApplication, a SceneManager and a timer to call
periodycally a scenemanager slot.
The SceneManager, during ctor, creates a Qt3DWindow, a root entity and
calls the changeScene slot.
The changeScene slot destroys the rootEntity (destroying that way all the
children) and recreates it. Then it create a new geometry (which basically
for this example consist on a red plane) and configures the camera.
Right now the window show a red plane... great, no problem.
When the timer timeouts and the changeScene is called again, the process is
reapeated, but now, no red plane is shown. This is exactly the same problem
I'm having in the complete code. I dont know why I'm having this behavior.
With this example, the buffers are correctly deleted, so I imagine I have
another problem in the complete code.
Could you provide me some feedback?
Thanks!
2016-10-03 13:57 GMT+02:00 Sean Harmer <sh at theharmers.co.uk>:
> Hi,
>
> could you file a JIRA please ideally along with a small test case that
> reproduces the issue.
>
> Many thanks!
>
> Sean
>
> On Monday 03 October 2016 13:40:36 Juan José Casafranca wrote:
> > Hello!
> >
> > I'm posting to act some questions about Qt3D.
> >
> > I'm trying to show some information for my program. This information
> consist
> > on a regular grid (I'm painting the lines that define the voxels), a
> > distance map (in each voxel vertex I store a distance value) and the
> > sources for the distance (zones where distance is 0)
> >
> > The software supports resizing the grid or changing the sources so the
> views
> > must be updated accordingly. To achieve that, I emit a signal when a
> change
> > in the distance or the grid is done and connect that signal to a slot
> that
> > performs the scene preparation. It isn't the best solution but for now is
> > enough.
> >
> > The scene preparation slots cleans the previously allocated scene
> > (m_rootEntity->deleteLater()) and reconstructs the scene.
> >
> > The reconstruction generates the geometry data for the different things I
> > want to view, creates the renderer and the materials and adds this
> > components to different entities. Finally, this entities are added to the
> > root entity.
> >
> > To reduce code paths, the first view also performs this steps (removes
> the
> > previously scene, which is null) and creates the new one. This works
> well.
> >
> > My problem is when trying to delete an existing scene. I have been
> debugging
> > with gDEBugger and I have seen that buffers are not deleted (I imagine
> that
> > VAO are also kept) though the buffers are constructed with the geometry
> as
> > parent, and the geometry es an entity children (the entity is delete
> when I
> > delete m_rootEntity).
> >
> > After 2 or 3 remeshing steps, the screen goes black and I cant see any
> > information.
> >
> > I'm using the Qt3D version shipped with Qt 5.7.
> >
> > Any idea what I'm doing wrong? I can provide some code if you ask for it,
> > but as the software I'm developing is big, I prefer to show the code when
> > you ask for it, so I don't fill this question with a lot of code that
> > wouldn't be necessary.
> >
> > Thanks!
> > _______________________________________________
> > Interest mailing list
> > Interest at qt-project.org
> > http://lists.qt-project.org/mailman/listinfo/interest
>
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20161003/8a9122da/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Qt3DBuffer.tar.gz
Type: application/x-gzip
Size: 1978 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20161003/8a9122da/attachment.bin>
More information about the Interest
mailing list