dynamic textures

Hello, i would like to use a dynamic texture for my API. I also want to use bump mapping.

I would like to change the texture in the memory and not in the frame buffer. Should i use glCopyTexSubImage2d or not?

If anyone has exemples of dynamic textures, it would be really nice to send it to me



I would like to change the texture in the memory
Video or system ??

Why are you using synamic textures ?? What for ??

I want to use a per pixel lighting bump mapping. The purpose of this is to simulate the collision between rain and a windscreen.

I don’t want to create at each frame a bump texture so i want to change it dynamically.

I would like to use the glCopyTexSubImage2D ogl function cause i have to change locally the texture at each frame.

Hey could i ask you another question on texturing?

So i would like to use the gl function described in the last message. But it says that this function copy an area of the framebuffer in the current texture. But my application uses many textures, so how can i do to say to this function to write in a selected texture???

Thanks in advance


Your current texture is your selected texture (glBindTexture!!!)

Hey jc,

I’m kinda doing the same type of thing only instead of normals I need half angle vectors for per pixel specular highlights. My changes seem to be more organized than yours will be but I still found it too random of changing to actually change via a systamatic method. I don’t understand how you plan to do something like that fast with glCopyTexSubImage2d but mybe you can. I was trying to use the color matrix for my method which would have been super fast but it just couldn’t work. Now I will just take a snap shot of the volume now cause it will take over 5 seconds to generate all these new half angle textures. Once the nv20 comes out though I should be set.

Do you want to replace a part of your texture with some texture data og some part of the frame buffer, because glCopyTexSubImage2D is damn slow, and if you want to change part of a texture with your own texturedata use glTexSubImage2D.


The using dynamic textures is heavily affects the fps rate. The program I wrote uses the following scheme: in every frame I upload a 128x128 texture (rgba) to render a projected shadow for an object. I every 30. frame I upload 2 256x256 textures to modify the outlook of an object. And you can see it. Even in a geforce class card. Little slowdowns.

My advice is: use glTexSubImage, and update the necessary region only.

I talked of this subject with a friend of mine and he said to me that there is an extension nvidia with which u can write directly in the texture memory.
Does anyone know this extension???


Hi i want to use the glTexSubImage2D function but the last param (pixels) means the texture to add to the texture or the texture ???

I mean, i have my base texture A (12864) where i want to replace at each frame a piece of it. The piece i add is a texture B (1616).

i do

glBindTexture(GL_TEXTURE_2D, A->getID());
glTexSubImage2d(GL_TEXTURE_2D, 0, 50, 50, 16, 16, My_Format, GL_UNSIGNED_BYTE, B);

But there is no result, my texture A don’t change

HELP !!!


Thank you all, it works now !!!


U know what? i’m happy

CU guys.