Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Qt with OpenGL. Drawing buildings on a canvas
Forum Updated to NodeBB v4.3 + New Features

Qt with OpenGL. Drawing buildings on a canvas

Scheduled Pinned Locked Moved Unsolved General and Desktop
1 Posts 1 Posters 298 Views
  • 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.
  • A Offline
    A Offline
    Ankit.Jain
    wrote on last edited by Ankit.Jain
    #1

    Hi,

    I have asked some round about questions here before, I think I'll ask the complete problem instead as I am getting stuck.

    So, we have a code base where the user could load some data from a file to draw buildings onto a canvas. The canvas in this case is made in a QOpenGLWidget. The canvas has its coods set using glOrtho (for this case lets take 1500x1500x1500).

    Now, I recently got a requirement for allowing the user to create / modify and remove these buildings on the fly. I made the changes by updating the data in the local object containing all coordinates for each vertex of each face of the building.

    The problem I came across having done the update was that all the buildings are deleted and re-created when any of the buildings is modified. This comes out as a performance issue.

    So, the task to fix it came up. We lack a resident openGL guy and I have near zero idea myself. I ended up asking / searching to find some methods for doing this. The one I picked was to draw all the buildings into separate buffers and blit / bind them onto the main canvas. This would effectively remove the requirement for re-drawing the buildings which have not been modified.

    From what I gathered, I originally started off taking FBOs as the method for completion. But, someone told me that I should use VBOs instead.
    Might I be suggested the best method?

    For using VBO, I'm following: http://www.trentreed.net/blog/qt5-opengl-part-2-3d-rendering/ for now

    Kindly note that the buildings in consideration must have very specific coods and each of 'em will have customized textures for each face.

    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