PDA

View Full Version : VertexArray and VertexAttribArray, what's different?



reader1
03-25-2015, 07:26 PM
is it when get together, it is VertexAtribArray, and when discrete will be VertexArray?

Alfonse Reinheart
03-25-2015, 09:18 PM
Are you asking about the difference between glVertexPointer and glVertexAttribPointer? Or something else?

What do the terms "VertexArray" and "VertexAttribArray" mean to you, and where did you get them from?

reader1
03-26-2015, 06:16 AM
Are you asking about the difference between glVertexPointer and glVertexAttribPointer? Or something else?

What do the terms "VertexArray" and "VertexAttribArray" mean to you, and where did you get them from?
include them. just abridge of gl*. I read some docs that name them as glVertex* or glVertexArray, glVertexPointer glBind* etc. they say now that we discuss opengl, everyone wil know what we talk about. They will not mix this api with other languages.

reader1
03-26-2015, 06:24 AM
well, let's talk about glVertexArray vs glVertexAttribArray, glVertexPointer vs. glVertexAttribPointer....
there is a word "Attrib" added amid them.

GClements
03-26-2015, 12:34 PM
well, let's talk about glVertexArray vs glVertexAttribArray,
OpenGL doesn't have any functions with those names.



glVertexPointer vs. glVertexAttribPointer....

glVertexPointer() is a legacy/compatibility function which specifies the data for the vertex position (accessible in a vertex shader via the compatibility attribute gl_Vertex).

It is roughly equivalent to calling glVertexAttribPointer() with index equal to zero and normalized equal to GL_FALSE, in the sense that the fixed-function pipeline has a fixed association between attribute index zero and the vertex position.

More generally, legacy OpenGL tends to use "vertex" to refer specifically to a vertex' position, while modern OpenGL uses it to refer to the vertex as an entity having many associated attributes.

reader1
03-26-2015, 07:34 PM
OpenGL doesn't have any functions with those names.


glVertexPointer() is a legacy/compatibility function which specifies the data for the vertex position (accessible in a vertex shader via the compatibility attribute gl_Vertex).

fixed association between attribute index zero and the vertex position.

More generally, legacy OpenGL tends to use "vertex" to refer specifically to a vertex' position, while modern OpenGL uses it to refer to the vertex as an entity having many associated attributes.
Embarracement. I copy, but copy a wrong term from a decent doc.without check, carelessness, in fact.
then glGenVertexArray vs glGenVertexAttribArray.... instead.


It is roughly equivalent to calling glVertexAttribPointer() with index equal to zero and normalized equal to GL_FALSE, in the sense that the fixed-function pipeline has a

More generally, legacy OpenGL tends to use "vertex" to refer specifically to a vertex' position, while modern OpenGL uses it to refer to the vertex as an entity having many associated attributes.
Does that mean the gl*VertexAttribArray will disappear and only gl*Vertex* left?

Alfonse Reinheart
03-26-2015, 07:53 PM
then glGenVertexArray vs glGenVertexAttribArray.... instead.

There is no glGenVertexAttribArray either. A fact you could easily have discovered before posting simply by searching the OpenGL man pages (https://www.opengl.org/sdk/docs/man/).

Please take some time before posting to do basic fact-checking. You're asking us for help; don't force us to waste our time with basic errors like that.

reader1
03-27-2015, 12:38 AM
There is no glGenVertexAttribArray either. A fact you could easily have discovered before posting simply by searching the OpenGL man pages (https://www.opengl.org/sdk/docs/man/).

Please take some time before posting to do basic fact-checking. You're asking us for help; don't force us to waste our time with basic errors like that.
Im clear now. I think they all are alike before.