View Full Version : glCopyTexImage2D unpleasentness.

05-23-2003, 07:42 PM

I'm trying to generate a dynamic texture and use it to draw my scene. I'm using the generated texture to draw a heap of polys. Generating the texture doesn't seem to slow things down too much, so all is well there.

What I don't understand is actually USING the texture slows things down. If I generate the texture but draw everything with a different texture it's ok, if I draw exactly the same stuff with the generated texture it's a lot slower.

Is there any reason for this? Is there a better way to do this stuff in general? It's nothing too fancy, I'm just drawing a basic scene to a texture, then drawing another basic scene with the mapped with the texture.


05-24-2003, 01:22 AM
If you're updating the texture dynamically, you should use glCopyTexSubImage instead. This will update an existing image with new data. Otherwise you're destroying the old one, and creating a new texture.Maybe the driver can be smart enough to notice that you only update it and skip at least the recreation part, but don't count on it.

Anyways, sounds strange, post some code.

05-24-2003, 09:50 AM
The texture doesn't have to traverse the AGP bus to get to the card until you actually use it. Thus, you're probably seeing a texture upload penalty on first use.