Archived

This topic is now archived and is closed to further replies.

leblebi

glTexSubImage2D and glCopyTexSubImage2D

Recommended Posts

I have this problem: I am working on a 2nd view thing. It shows another view rendered on a rectangle in the player's view(Like a rear view mirror but it is flexible and can look anywhere). This camera may malfunction sometimes. When it malfunctions, it shows animated noise (just like a TV channel out of tune) on that rectangle. Now, I am using glCopyTexSubImage2D to render the camera's view and copy it to the necessary portion of its texture. If the camera malfunctions it switches to prebuilt random textures and I use "glTexSubImage2D()" to copy appropriate texture to its place. The problem is, when the camera is working, it renders smoothly. When the camera malfunctions it still renders smoothly, but if the camera switches from working to malfunctioning mode, there is a pause (more than 30 milliseconds) between switching modes. If I comment out the glTexSubImage2D() function it switches just fine. Is there any initialization calls before glTexSubImage2D or glCopyTexSubImage2D? Or does anyone have any idea what's going on? Oztan Edited by - oztanharmanci on January 12, 2002 7:27:48 PM

Share this post


Link to post
Share on other sites