Results 1 to 3 of 3

Thread: How to correctly resize VBO

  1. #1
    Senior Member Regular Contributor
    Join Date
    Sep 2013
    Posts
    186

    How to correctly resize VBO

    Hello,
    if I wanted to resize a VBO (to make it bigger) how would I do it best?

    What I currently do is:
    Code :
    glDeleteBuffers(vboId);
    vboId = glGenBuffers();
    glBindBuffer(GL15.GL_ARRAY_BUFFER, vboId);
    glBufferData(GL15.GL_ARRAY_BUFFER, ..., GL_DYNAMIC_DRAW);
    But could I do without the "glGenBuffers()"? Or even without the "glDeleteBuffers()"?
    I am just not 100% sure and thats why I'd like to ask.

    Thank you very much.

  2. #2
    Senior Member OpenGL Guru
    Join Date
    Jun 2013
    Posts
    3,103
    Quote Originally Posted by Cornix View Post
    But could I do without the "glGenBuffers()"? Or even without the "glDeleteBuffers()"?
    You can re-use the name and just re-create the data store with glBufferData().

  3. #3
    Senior Member Regular Contributor
    Join Date
    Sep 2013
    Posts
    186
    Thank you.
    I was just not sure if there might be any other data on the graphics card which needs to be reset.

Similar Threads

  1. how to resize FBO???
    By red112 in forum OpenGL ES
    Replies: 1
    Last Post: 02-01-2013, 08:59 AM
  2. Is this possible - Draw & resize BB to RT
    By Johnnie in forum OpenGL: Advanced Coding
    Replies: 3
    Last Post: 04-29-2010, 03:49 PM
  3. Resize Textures
    By in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 10-17-2005, 01:05 PM
  4. Resize Window\Resize Image
    By Cerv36 in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 02-16-2003, 04:42 AM
  5. resize restriction?
    By screwtape in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 04-12-2001, 08:05 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