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 5 of 5

Thread: Vertex Arrays still useful?

  1. #1
    Newbie Newbie
    Join Date
    Dec 2013
    Posts
    1

    Vertex Arrays still useful?

    Hi all
    I've just learned OpenGL for nearly two months on my own and my guidebook is <OpenGL Programming Guide seventh edition>(based on OpenGL 3.0&3.1). where Vertex Arrays are mentioned. But in some other newly published textbooks there is not a single word about Vertex Arrays?! How come? Is Vertex Arrays not useful any more? Or OpenGL4 has abandoned Vertex Arrays?

    THX!

  2. #2
    Intern Newbie
    Join Date
    Dec 2013
    Posts
    45
    By no means have they been abandoned. In fact, they are REQUIRED in core profiles in OpenGL 3.2+. That's odd that they aren't mentioned, perhaps they just never really put a name to it in the book.

    More info about them here

  3. #3
    Senior Member OpenGL Guru Dark Photon's Avatar
    Join Date
    Oct 2004
    Location
    Druidia
    Posts
    3,188
    Right. Vertex arrays are core to the OpenGL implementation. Tutorial books aside, the key thing is what the GL Spec says, and it clearly describes vertex arrays. They contain arrays of data values used to populate vertex attributes on the GPU.

    Vertex arrays can be stored in:

    1. server-side memory (i.e. GL driver-side memory) in vertex buffer objects (VBOs), or
    2. client-side memory (i.e. your application's memory) in what's termed client arrays.

    The former is the more modern approach, while the latter is "the way it used to be done" (which is obsoleted in OpenGL "core" profiles, but still available in OpenGL "compatibility profiles).

    So I suspect for any modern GL book that doesn't explicitly mention vertex arrays, it clearly talks about vertex buffer objects. Just keep in mind these are just server-side containers for vertex arrays and the element (index) arrays.

  4. #4
    Senior Member OpenGL Pro
    Join Date
    Jan 2007
    Posts
    1,180
    Quote Originally Posted by Dark Photon View Post
    So I suspect for any modern GL book that doesn't explicitly mention vertex arrays, it clearly talks about vertex buffer objects. Just keep in mind these are just server-side containers for vertex arrays and the element (index) arrays.
    I'd add to this is that another reason why is because there is no other way of drawing.

    With old OpenGL there were multiple ways of drawing: immediate mode, display lists, vertex arrays, vertex arrays with VBOs, and a few weird mixed cases (such as immediate-mode-indexing via glBegin/glArrayElement/glEnd), so it made sense to call out vertex arrays explicitly.

    With modern OpenGL there is only one way of drawing - vertex arrays with VBOs - so it no longer makes the same kind of sense. But when you read material on modern OpenGL you should always understand that it's using vertex arrays with VBOs, even when it doesn't explicitly say so.

  5. #5
    Intern Contributor
    Join Date
    May 2013
    Posts
    60
    vertex arrays are basically like vertex buffer objects used with GL_STREAM_DRAW_ARB as usage hint.

    [EDIT]not vertex array objects but vertex buffer objects, hope I didn't confuse anyone[/edit]
    Last edited by Osbios; 12-24-2013 at 06:40 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
  •