Michael I Gold
Tue, 29 May 2001 15:38:48 -0700
I believe they are equivalent, yes, assuming nowhere else in the code is a texture object other than 0 bound to either texture unit. > -----Original Message----- > From: Srinivas Dasari [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, May 23, 2001 9:39 AM > To: [EMAIL PROTECTED] > Subject: [oglbase-discuss] question on multitexture spec > > > 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) > ********************************************************** >