Results 1 to 6 of 6

Thread: Size of VBO

  1. #1
    Member Contributor
    Join Date
    Jul 2003
    Posts
    92

    Size of VBO

    Hi,

    i have a simple question:

    Is there a limit for the size of a vbo ?

    If i have to store 1000 vertices from several different meshes (1000 is just an example), is it possible to have enough space to store it in 4 differents VBO of 250 vertices, but not enough space to store it in 1 VBO of 1000 vertices ?

    Thanks.

  2. #2
    Senior Member OpenGL Pro Zengar's Avatar
    Join Date
    Sep 2001
    Location
    Germany
    Posts
    1,931

    Re: Size of VBO

    There is no "real" limit (the limit depends on your RAM and VRAM). Still, it may be possible that the driver fails to allocate the memory, then you will get an error when creating the VBO.
    IMHO, you can safely allocate VBOs under several megabytes.

  3. #3
    Senior Member OpenGL Pro k_szczech's Avatar
    Join Date
    Feb 2006
    Location
    Poland
    Posts
    1,107

    Re: Size of VBO

    is it possible to have enough space to store it in 4 differents VBO of 250 vertices, but not enough space to store it in 1 VBO of 1000 vertices ?
    Yes - due to memory fragmentation, but it's more likely that least recently used resource will be dropped to system memory and your VBO will be created.
    Although with just 1000 vertices you should be fine.

    If you're not developing an application with high security and reliability requirements you shouldn't bother.
    If you do develop such application then you shouldn't rely on what people say and assume every operation can fail anyway

  4. #4
    Member Contributor
    Join Date
    Jul 2003
    Posts
    92

    Re: Size of VBO

    Thanks.

    Acctually, i want to display a 3d scene fom Anim8or ( a free modeler).

    A scene has several instance of an object. And one object can have 1 or more meshes. But all meshes are static in the objects spaces (i just need position and orientation matrices for objects but not for meshes).

    I wonder if the best thing to do is to store the vertices of meshes in one vbo per object or one vbo per meshes (using index buffer to select the good chunk for each materials).

    Because i have read that it is slow to bind a ressource in OpenGL or D3D (texture, VBO, ...).

    If i have understood, if i use several VBO, the "bind" operation will slows down my application.
    But if i use just one VBO, and if there is not enought space in video memory, it will be store in system memory and it will also be slow.

  5. #5
    Senior Member OpenGL Pro k_szczech's Avatar
    Join Date
    Feb 2006
    Location
    Poland
    Posts
    1,107

    Re: Size of VBO

    But if i use just one VBO, and if there is not enought space in video memory
    And how large would that VBO have to be?
    A good approach is to use one VBO for multiple objects (let's say you application will store minimum 10k vertices per VBO) and when you run out of space in one VBO you create another and so on.

    That's for viewing. For modelling it's best to use one VBO per mesh since it's easier to manage.

  6. #6
    Member Contributor
    Join Date
    Jul 2003
    Posts
    92

    Re: Size of VBO

    Ok. Thanks.

Similar Threads

  1. Replies: 1
    Last Post: 02-17-2015, 11:38 AM
  2. Mapping from rednerbuffer size to texture size for glow effect
    By 2Wheels in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 05-11-2013, 04:16 PM
  3. OpenCL Ndrange Global Size/Local Size
    By BiS in forum OpenCL
    Replies: 4
    Last Post: 01-04-2013, 07:52 AM
  4. Replies: 10
    Last Post: 01-04-2007, 12:02 AM
  5. Texture Size and pict size
    By morzech in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 01-27-2002, 12:25 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean