Results 1 to 6 of 6

Thread: VBO question

  1. #1
    Junior Member Newbie
    Join Date
    Aug 2003
    Posts
    9

    VBO question

    Hi all.

    VBO extension spec says it is possible to use separated bindings for individual vertex attribute, right? I'v tried this in my project but it didn't work.
    I do it like this:

    Bind buffer 1;
    glVertexArray (...);
    Bind buffer 2;
    glNormalArray (...);
    ... ...
    glEnableClientState(GL_VERTEX_ARRAY);
    glEnableClientState(GL_NORMAL_ARRAY);
    glDrawArrays (...)

    if I use one binding for all attribute, it works fine. where is the problem?

  2. #2
    Senior Member Regular Contributor
    Join Date
    Feb 2002
    Posts
    374

    Re: VBO question

    The arrays must be enabled before writing to them. Therefor you have to place your glEnableClientState calls before assigning the arrays.

    hih

    (edit: had to take a closer look at the question before posting)

    [This message has been edited by satan (edited 08-25-2003).]

  3. #3
    Junior Member Newbie
    Join Date
    Aug 2003
    Posts
    9

    Re: VBO question

    It works now! Thank'u and I'll never cross post anymore!

  4. #4
    Member Contributor
    Join Date
    Oct 2001
    Posts
    67

    Re: VBO question

    "The arrays must be enabled before writing to them. Therefor you have to place your glEnableClientState calls before assigning the arrays."

    Where does it say this in the VBO spec? This doesn't sound correct to me. In fact, it even runs contrary to the examples listed at the end of the vertex buffer object spec.

    If it solved your problem, great, but I'd suspect that something else was going on...

  5. #5
    Senior Member Regular Contributor
    Join Date
    Jun 2003
    Posts
    177

    Re: VBO question

    Looks like a driver bug to me. You didn't mention your hw/driver did you?

  6. #6
    Senior Member Regular Contributor
    Join Date
    Feb 2002
    Posts
    374

    Re: VBO question

    Originally posted by secnuop:
    "The arrays must be enabled before writing to them. Therefor you have to place your glEnableClientState calls before assigning the arrays."

    Where does it say this in the VBO spec? This doesn't sound correct to me. In fact, it even runs contrary to the examples listed at the end of the vertex buffer object spec.

    If it solved your problem, great, but I'd suspect that something else was going on...
    It does not say this in the VBO specs but if you take a look at the glEnableClientState reference you will find for example: GL_VERTEX_ARRAY
    If enabled, the vertex array is enabled for writing and used during rendering when glDrawArrays or glDrawElements is called. See glVertexPointer.

    Therefor I assumed that it is needed for VBO, too.

    As you said this contradicts with the examples shown in the VBO specs so I am not sure what the correct behaviour for an OpenGL implementation should be.

    You and the exmaples are right secnoup. I just tested it and it works flawlessly without enabling the clientstate before assigning the arrays. I did this on a Geforce2MX with the 4496 driver under Linux.

    [This message has been edited by satan (edited 08-26-2003).]

Similar Threads

  1. Replies: 5
    Last Post: 04-23-2018, 12:03 AM
  2. Texture question and sphere question...
    By detzel in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 06-19-2001, 12:02 PM
  3. Matrix question (Not really an OGL Question)
    By KurtCob in forum OpenGL: Basic Coding
    Replies: 22
    Last Post: 04-04-2001, 07:55 AM
  4. Quake3 bsp question (not really openGL question)
    By ribblem in forum OpenGL: Advanced Coding
    Replies: 1
    Last Post: 01-15-2001, 10:13 AM
  5. Replies: 2
    Last Post: 01-08-2001, 03:33 PM

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