Dynamically Updating a Texture

Started by
2 comments, last by Dave Eberly 16 years, 8 months ago
I am working on a project in which I need to be able to update texture data real-time. I have been using OpenGL, and doing the straightforward method of binding a texture and setting the data every frame. This really doesn't work, however, as the texture I am using is very large. I wanted to hear any thoughts you folks have about how to make this go more smoothly. I only have 1 textured object with a few thousand triangles, and 1 texture. I thought that perhaps somehow forcing OpenGL to keep the texture in system memory (where I could keep a pointer to the data) would work; I don't need hundreds of frames per second, just 30 or 60. At any rate, as of now I am using C# and the Tao.Opengl binding, but consider this choice orthogonal to the problem; I am willing to change libraries. Thanks.
Advertisement
Use glTexSubImage2D()
Thanks, that seems like what I was looking for, I will give it a try.
You could also implement your textures as "pixel buffer objects" and use glMapBuffer and glUnmapBuffer.

This topic is closed to new replies.

Advertisement