Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Game Development
  4. Rendering with QGeometryData - optimisations
Forum Updated to NodeBB v4.3 + New Features

Rendering with QGeometryData - optimisations

Scheduled Pinned Locked Moved Game Development
1 Posts 1 Posters 816 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • X Offline
    X Offline
    x6herbius
    wrote on last edited by
    #1

    I have a couple of questions regarding the method I'm thinking of using to render 3D objects. I'm utilising the Qt3D library and have created an interface with which renderable objects "export" their geometry to a QGeometryData object, which is then used by the render system:

    @virtual QGeometryData toGeomData() const = 0;@

    I have some thoughts about this that I'd like to get clarified if possible: firstly, is a function returning a QGeometryData object a good idea? If the object creates its QGD on the stack, fills it and then returns it, copying the object as the function returns I feel might add up to a lot of overhead if lots of objects are being rendered.

    Secondly, if a new QGD object is returned from the function each time the object is rendered, would this interfere with the optimisations on QGD::upload()? If a new QGD is created each time to replace the previous object from the last frame, I'm assuming that would negate the functionality where in the documentation it is stated that the data is not re-uploaded to the GPU if it hasn't changed. Would it be advantageous instead to ensure that the renderable object itself does not replace its QGD unless its rendering parameters have changed?

    Lastly, if I've understood the documentation correctly, each QGD object has its own VBO/other buffers on the graphics card. Does it make sense to use one QGD for each renderable object (of which there could be thousands), or should they be grouped differently?

    Many thanks.

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved