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
    Member 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
    Join Date
    Oct 2004
    Posts
    4,654
    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
    Newbie OpenGL Pro
    Join Date
    Jan 2007
    Posts
    1,789
    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
    Senior Member Regular Contributor
    Join Date
    May 2013
    Posts
    149
    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]

Similar Threads

  1. arrays of arrays as vertex output/fragment input
    By tsojtsoj in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 05-17-2018, 08:02 PM
  2. Vertex Arrays, interleaved arrays, mouseMove func
    By Nibirue in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 02-13-2012, 11:17 AM
  3. Big problem show arrays with vertex arrays
    By Rondey in forum OpenGL: Basic Coding
    Replies: 13
    Last Post: 03-15-2009, 10:09 AM
  4. Vertex Arrays: Interleaved or seperated arrays?
    By Jan in forum OpenGL: Advanced Coding
    Replies: 16
    Last Post: 06-21-2005, 05:25 AM
  5. Vertex arrays and ... texture arrays
    By cix>foo in forum OpenGL: Advanced Coding
    Replies: 21
    Last Post: 06-25-2000, 08:15 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