View Full Version : TextureObject vs BufferObject

11-05-2010, 09:36 AM

When should I use a Texture Object and when should I store my Pixel Data in Buffer Objects? Where is the different? What is more efficient/faster?

Alfonse Reinheart
11-05-2010, 12:22 PM
Why would you put "Pixel Data" in a buffer object?

As to the difference, textures can be filtered and mipmapped; buffers cannot. You can access textures with normalized texture coordinates, so that the shader does not need to be aware of the texture's size. You can't do that with buffers. Textures come in various dimensions and special types (arrays, cubemaps, 3D, etc); buffers are always 1D.

And of course, textures generally can be larger than the average max uniform buffer object size. If you need bigger than that from a buffer object, you have to use a buffer texture.

This really isn't a difficult concept. The only use cases where there's an overlap are when you're looking at buffer textures vs. uniform buffer objects.