How to display a textured quad without the texture loaded yet(Android,opengles 2.0)

63 Views Asked by At

Currently in my app using opengl es, I have to display a bunch of quads with Different Textures. I want to asynchronously load textures with the quads displaying "blank" until the texture is loaded and start displaying the texture as the texture finishes loading.... what is the most desired way to achieve this?

1

There are 1 best solutions below

2
On BEST ANSWER

You have several options here, the most desirable depends on your situation. Some possibilities:

  1. Write a shader, which doesn't sample the texture, and use that until your texture is streamed in and ready.
  2. Create a 'blank' texture, and bind it to the appropriate slot until you create the real texture. Then, switch the bindings.
  3. Same as #2, except you can update the blank texture instead, and switching bindings is not necessary.