I am trying to get a feel for how to structure WebGL/OpenGL apps and have been looking through sources for the types of buffers they use. I've found these:

  1. uvs
  2. occlusion
  3. noise
  4. bitangents
  5. tangents
  6. normals
  7. vertices
  8. indices
  9. position
  10. color

I'm wondering if there are typically just these when building a robust WebGL/OpenGL app, or if there are more or fewer usually. This will help in figuring out why things are done certain ways. Also wondering what these ones above are typically used for. I am only really interested in 2D stuff at the moment. I'm not really sure yet what the indices one is for or the tangents, I can figure out the others.

  • 1
    \$\begingroup\$ Our Q&A site here is much better at answering questions of the form "I'm trying to accomplish X in my game, but I'm stuck on aspect Y - how can I solve that?" than it is at "List all examples of Ys that games might use, and what Xs they're good for." Can you try editing this question to focus it on what you're trying to accomplish right now, and what kind of buffer-creation help you need to solve that problem? It's OK to ask another question later if you want to learn about another buffer type - it doesn't all have to be crammed into a single question post. \$\endgroup\$ – DMGregory Mar 12 '19 at 23:12

If you set up an project with your idea, - what you want to archive as a final result. You also need to question yourself, how to structure different data. With the question you asked, everything can be a buffer. Just because their is no limit of what you can do, and what you what to be done as a project. A Buffer for Keyboard input or for previous mouse position is also a buffer. It always depends on what you try to archive. Generally speaking complicated user interaction with a 3D scene comes with a lot of buffers, yes.

For example a Mesh -Buffer would be used if you read an *.obj data format (or whatever) with normals (for light calculation), vertices(position in 3D space) , indices(triangle rasterization). Means your 3d modeling program you were using exported your Mesh and saved all these data. Now you need to unpack it create a Buffer for all provided data in WebGL/OpenGL and send in for processing to the graphics pipeline.

If you want to make a 3D Shooter, like Crysis remake, a rough sketch of the data/buffers yout need would be:

MESH ( buffer )

  • normals
  • vertices
  • indices


  • noise (for effects like clouds, vertex displacement)
  • uvs (for correct texturing)
  • color (red brick wall texture)
    • LIGHT calculation
    • occlusion (map)


  • bitangents
  • tangents

The point here is: When you project become more advanced, you also would need to provide more buffers.

  • 1
    \$\begingroup\$ I don't know why you got downvoted it seems to point the OP in the right direction in my opinion. \$\endgroup\$ – Felipe Gutierrez Mar 13 '19 at 18:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.