Thursday, December 13, 2012

Re: [android-developers] Re: HelloEffects confusion

On Thu, Dec 13, 2012 at 4:17 PM, bob <bob@coolfone.comze.com> wrote:

Thanks.  I'm still a little confused about why there is a glActiveTexture and a glBindTexture.  Seems like there ought to be one function for setting the current texture.


You need to differentiate between texture and texture unit (or sampler).  A texture unit is a piece of hardware within the GPU whose job is primarily to sample textures (I'm simplifying here, hopefully none of those who are familiar with this will flame me).

As pointed out by a1, a GPU will nowadays have multiple texture units.  You tell the currently active texture unit which texture bitmap to sample by calling glBindTexture().  You select which of the texture units will be the active one by calling glActiveTexture().

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment