PDA

View Full Version : texture buffer manipulation?



metric
08-11-2006, 01:13 AM
Greetings,

I was wondering if there exists a mechanism
by which I can manipulate data stored in a texture
buffer analagous to how vertex arrays work?

I have a texture that changes dynamically and
I have to upload it every time it changes.
Obviously this is not good practice.

Im writing this for pretty old systems, so
shaders and such are out of the question.

Any suggestions appreciated.
Thanks,
Metric

Zengar
08-11-2006, 04:27 AM
Well, you could use pixel buffer object, but if you're on an old machine, there is nothing what would come to my mind. Try using TextureSubImage, it is a bit faster.

Overmind
08-11-2006, 09:25 AM
Obviously this is not good practice.Why?

Of course you should just upload the bounding rectangle of the reigon that changed instead of the whole texture. But you can't expect to change the texture without uploading anything ;)

metric
08-11-2006, 12:04 PM
Why?
You're right, I never thought about it that way. Its just that in my software, the texture is changing dynamically based on any type of transformation I apply, so a have to upload a new texture many times.

I was just thinking last night that for my situation it would be really convinient if GL would let me manipulate texture memory directly.
But it seems TexSubImage2D will be an improvement.

Thanks,
Metric