Talking about VAO+VBO... (>GL3)

[QUOTE=Alfonse Reinheart;1265185]
Well, you’re supposed to work that one out for yourself. It’s an analogy. Each line in those two functions represents one of the steps in your post. And therefore, you can see why changing the order of operations doesn’t affect the result.[/QUOTE]
Are you kidding?

Do I need to remind you what is vao?

To understand that fragment of code, you need to understand:

  • What it means to generate a VAO name/handle/alias/reference/whatever-you-want-to-cal-lit
  • What it means to bind a VAO
  • What it means to generate a buffer object name/handle/alias/reference/whatever-you-want-to-cal-lit

as if you are confusing the concept of vao and fShader. and shader…

No; I’m completely serious. Each line in those functions maps to the corresponding operation in your list. It’s a direct, 1:1 mapping; it shouldn’t be hard to work it out.

If you are unable to follow a simple analogy, I’ll spell it out for you a bit more:


VertexArrayObject *boundVAO;
BufferObject *boundArrayBuffer;
 
void Standard()
{
  VertexArrayObject *newVAO = new VertexArrayObject;
  boundVAO = newVAO;
  BufferObject *newBO = new BufferObject;
  boundArrayBuffer = newBO;
}
 
void Modify()
{
  BufferObject *newBO = new BufferObject;
  boundArrayBuffer = newBO;
  VertexArrayObject *newVAO = new VertexArrayObject;
  boundVAO = newVAO;
}

Do you get it yet?

No, you don’t.

… what? I said nothing about shaders of any kind.