I have an application which must load images into textures at runtime. I try to load/decode the images and load them to a texture early in order to speed up render times. However it seems that the texture is not fully loaded until the first time it is used (glDrawArrays), so the first draw takes a long time. Is there a way to avoid this and have the texture fully loaded when I do the glTexImage2D? Is the time caused by texture swizzling?
Thanks,
Brian
Hi Brian,
You are correct that texture loading is delayed until it is first used. You can force an early upload of the texture by rendering an offscreen triangle that uses the texture.