PDA

View Full Version : BindTexture vs TextureBufferObject vs PixelBObject



tobindax
09-26-2010, 02:13 AM
It's a bit confusing what should be used.

Say one wants to work only with modern OpenGL, no concern for backwards compatibility and wants to do the ideal.

When should old BindTexture be used, when should Vertex Buffer Objects should get also pixel colors and when should Texture Buffer Objects?

Is any of them ideal for all cases? Are there advantages of each for certain cases. Are 2 of the methods identical in advantages?

RefleX
09-26-2010, 09:32 AM
They do different things, not really comparable.

BindTexture - binds texture to the device so you can perform operations on it

VertexBufferObjects - are used to store vertex information in server / graphics card memory, used so you don't have to pass the vertex information to the card every time you need to draw the vertices, just bind the buffer

PixelBufferObjects - works similar to VBO except it's used to store pixels, used for certain effects

Alfonse Reinheart
09-26-2010, 12:22 PM
When should old BindTexture be used, when should Vertex Buffer Objects should get also pixel colors and when should Texture Buffer Objects?

You are really confused about things.

I'll assume by "BindTexture" you mean using texture objects. There is no reason to avoid using texture objects, as this is the only way to have, you know, textures.

PBOs are used to transfer pixel data to and from OpenGL. This means that they are used with functions like glTexImage, glTexSubImage, glReadPixels. Their purpose is to make transfer of pixel data asynchronous. They do not replace textures in any way.

Texture buffer objects are still textures. You still create a texture object with glGenTextures; you still bind it with glBindTexture, etc. Buffer textures are one-dimensional textures who texture storage comes from a buffer object. These are used to allow shaders to access very large quantities of data, larger than a regular texture could provide. The downside is that there is no filtering whatsoever. They are not used to store image data.

tobindax
09-27-2010, 05:06 AM
Are Texture Buffer Objects 'a sort of answer' to id's Megatexture technology?

Alfonse Reinheart
09-27-2010, 09:50 AM
Are Texture Buffer Objects 'a sort of answer' to id's Megatexture technology?

No. They're just a way for a shader to access a large buffer object array.