Jump to content

  • Log In with Google      Sign In   
  • Create Account

#ActualB_old

Posted 23 August 2013 - 07:20 AM

Phrases like "move the buffer around" and "switch buffers" and "proper usage" are vaguer than they seem, considering that vertex array objects are an entirely optional superstructure to organize buffers and other objects: you can put into a VAO the vertex drawing state that used to be global, with a few new VAO-aware functions.

Do you mean by optional, that I don't have to use VAOs at all?

 

If you want to define a vertex and vertex buffer layout once and use it with different buffer content, you it's very likely that since they have the same layout your data sets can live together in the same VBOs in, letting you use indexes to draw one or the other without binding or memory tricks.

I was thinking about a scenario where I calculate the lighting for a model and the shader expects normals, tangents etc.. Later I calculate the the shadow where only positions are expected. If the normals and tangents reside in a separate buffer there is no need to bind it in that case.

 

I was thinking along the lines of D3D's InputLayout.


#2B_old

Posted 23 August 2013 - 06:55 AM

Phrases like "move the buffer around" and "switch buffers" and "proper usage" are vaguer than they seem, considering that vertex array objects are an entirely optional superstructure to organize buffers and other objects: you can put into a VAO the vertex drawing state that used to be global, with a few new VAO-aware functions.

Do you mean by optional, that I don't have to use VAOs at all?

 

If you want to define a vertex and vertex buffer layout once and use it with different buffer content, you it's very likely that since they have the same layout your data sets can live together in the same VBOs in, letting you use indexes to draw one or the other without binding or memory tricks.

I was thinking about a scenario where I calculate the lighting for a model and the shader expects normals, tangents etc.. Later I calculate the the shadow where only positions are expected. If the normals and tangents reside in a separate buffer there is no need to bind it in that case.


#1B_old

Posted 23 August 2013 - 06:54 AM

Phrases like "move the buffer around" and "switch buffers" and "proper usage" are vaguer than they seem, considering that vertex array objects are an entirely optional superstructure to organize buffers and other objects: you can put into a VAO the vertex drawing state that used to be global, with a few new VAO-aware functions.

Do you mean by optional, that I don't have to use VAOs at all?

 

If you want to define a vertex and vertex buffer layout once and use it with different buffer content, you it's very likely that since they have the same layout your data sets can live together in the same VBOs in, letting you use indexes to draw one or the other without binding or memory tricks.

I was thinking about a scenario where I calculate the lighting for a model and the shader expects and normals, tangents etc. and later I calculate the the shadow where only positions are expected. If the normals and tangents reside in a separate buffer there is no need to bind it in that case.


PARTNERS