Hi

I have the following question on the multitexture specification.

Consider the following two code cases.

case 1:

      glActiveTextureARB(GL_TEXTURE0_ARB); 
      glBindTexture(GL_TEXTURE_2D, 0);
      glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, W, H, 0, GL_RGBA, GL_INT, Img0);
      glEnable(GL_TEXTURE_2D);

      glActiveTextureARB(GL_TEXTURE1ARB);
      glBindTexture(GL_TEXTURE_2D, 0);
      glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, W, H, 0, GL_RGBA, GL_INT, Img1);
      glEnable(GL_TEXTURE_2D);

case 2:

      glActiveTextureARB(GL_TEXTURE0_ARB);
      glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, W, H, 0, GL_RGBA, GL_INT, Img0);
      glEnable(GL_TEXTURE_2D);

      glActiveTextureARB(GL_TEXTURE1ARB);
      glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, W, H, 0, GL_RGBA, GL_INT, Img1);
      glEnable(GL_TEXTURE_2D);
        

My question is, are these two cases equivalent?
In case 1, the units 0 and 1 are explicitly bound to default texture object 0.
Is this binding implied in case 2, even though glBindTexture is not used.

Since all texture units are bound to default texture object(which is 0)
during initialization (according to the spec), I think, both units, in both 
cases only see Img1 and NONE of them will see Img0. 
Is this the correct interpretation of the spec?
Is case 2 any different from case 1?

-Thanks for any info...
-Srinivas

**********************************************************
                Srinivas Dasari
                Sun Microsystems
            Phone: 650-786-6603 (Off)
**********************************************************

Reply via email to