Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Page 2 of 2 FirstFirst 12
Results 11 to 12 of 12

Thread: rotating large models

  1. #11
    Intern Newbie
    Join Date
    Jan 2014
    Posts
    40
    Quote Originally Posted by wmelgaard View Post
    My model() function is very efficient in terms of memory, but not speed. That was not a problem until I tried to rotate it. if I generate a Vertex Buffer Object as malexander suggests, that would probably cure my problem. I can even create the VBO in background. However, I have never created a VBO before, and the example in the Red Book is rather cryptic.
    The question is why do you generate stuff every frame if there are no animated deformations applied to geometry? As malexander already said - pre-generate it once at startup, store the data and then draw each frame using that data. You can draw from the same data via ram arrays or VBO arrays or even in immediate mode. If you continue to generate the data each frame, no VBOs will help you. In fact they'll make things worse as you'll need additional frame-time to upload the data to VRAM.

    VBO code is very similar to ram arrays code. So get ram arrays working first (glDrawElements() etc.). Switching to VBOs from there is rather trivial. Same data just needs to be uploaded to the gpu memory.

  2. #12
    Intern Contributor
    Join Date
    Jul 2013
    Posts
    63
    The limit could turn out to be the indices-buffer .. if you draw indexed.
    I swing 1.4 mill vertices flavlessly on a modest pc using a setup almost identical to this:

    http://www.mbsoftworks.sk/index.php?...s=1&tutorial=8

    On the other hand .. it's a plain height-field.
    I do have to use 4 draw-calls and reuse the indices with a new base-offset each time.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •