PBOs and textures

Hi again

I have 2 questions regards Pixel Buffer Objects
1.In my terrain engine I use PBO to store a texture for currently loaded area. Now I would like to add terrain paging- when user navigates away then to load a new area. So after loading the new area I need to update the texture stored in PBO.
How to do that - by calling glTexSubImage2D(… ) or glBufferSubData(…)

Do I need to bind both the texture and the pbo before updating (with glBindTexture(…) or glBindBuffer(…)?

2.Please help me to understand this statement from the RedBook regards glTexSubImage2D(…) :

From RedBook 7th edition page 408:

"
…Also, there are no size restrictions for
glTexSubImage2D() that force the height or width to be a power of 2.
(This is helpful for processing video images, which generally do not have
sizes that are powers of 2. However, you must load the video images into
an initial, larger image that must have 2n texels for each dimension, and
adjust texture coordinates for the subimages.)

"

Thank you very much in advance

In my terrain engine I use PBO to store a texture for currently loaded area.

PBOs do not store texture data. Texture objects store texture data.

PBOs exist to help you transfer texture data from your application to OpenGL. Once OpenGL completes the glTexSubImage2D call, the contents of the PBO are irrelevant.

Please help me to understand this statement from the RedBook regards glTexSubImage2D(…)

Looks like some old information that wasn’t properly culled.

Thank you, it works now! I found nowhere better explanation of PBOs-texture relation then yours…

I put a more comprehensive writeup on PBOs on the wiki.

Alfonse, Hi

Since you aren’t accepting private messages then I’ll write it here
1.Thanks for PBO info on wiki
2.I started to read your amazing tutorial,it completes many holes and arranges all the newbie OpenGL chaos I have in my head…
And I wanted to inform you that I cant see many equation and figure images.

Since you aren’t accepting private messages

I’m not? I didn’t even know there was a setting to turn those off.

And I wanted to inform you that I cant see many equation and figure images.

You’re probably using Internet Explorer, which doesn’t support SVG. Upgrade to IE9, which does support SVG (though possibly not in <object> tags. I’m working on a solution for that).