Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 3 of 3

Thread: One Buffer Vs. Multiple Buffers...

  1. #1
    Intern Contributor
    Join Date
    Apr 2014
    Posts
    67

    One Buffer Vs. Multiple Buffers...

    Hello,

    Consider this a consultation of opinion question:

    Is it better to use one interleaved buffer for multiple buffers for vertex/normal/UV data?

    Was reading this question and response here: http://stackoverflow.com/questions/1...orm-better-tha

    Just seeing what is better; I have implemented both but my framerate was high enough in both cases where I didn't notice a big difference.

    Thank you for your time.

  2. #2
    Junior Member Regular Contributor
    Join Date
    Dec 2010
    Location
    Oakville, ON, CA
    Posts
    107
    Interleaving all in one buffer is always better because it causes sequential access to the memory which is good for caching.
    In most cases there might be no difference, or slight difference, but one thing is solid: interleaved arrays will never work slower than separated ones. So always use it this way and have your mind free.

  3. #3
    Intern Contributor
    Join Date
    Oct 2011
    Posts
    73
    Quote Originally Posted by Yandersen View Post
    Interleaving all in one buffer is always better because it causes sequential access to the memory which is good for caching.
    In most cases there might be no difference, or slight difference, but one thing is solid: interleaved arrays will never work slower than separated ones. So always use it this way and have your mind free.
    Non interleaved arrays can potentially save bandwith when rendering geometry with shaders that don't use the complete set of attributes (classic example is depth rendering).

    I'm afraid the answer is not as clear.

    Since you have implemented both, my only advice is to keep developing to the point where you need to start worrying about performance and then profile, profile and profile more. It might as well be that in your implementation one way beats the other or, if your bottleneck is somewhere else, you may not even notice a difference during profiling.

Posting Permissions

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