Hi All,

When learning android OpenGL, I came to 2D texture. At first I drew a
rectangle on the screen, then I tried to bind a texture to it. But it
didn't work. I've checked the steps binding texture on the internet:
    1, generating texture id's;
    2, binding the texture id to GL_TEXTURE_2D, and set texture
parameters;
    3, get a bitmap from drawable resource and draw it onto
GL_TEXTURE_2D;
    These 3 steps are done in the onSurfaceCreated() function, and of
course I added
        gl.glEnable(GL10.GL_TEXTURE_2D);
        gl.glEnableClientState(GL10.GL_TEXTURE_COORD_ARRAY);
     But only the rectangle was displayed and it's black, no texture
on it. I don't know why.

     I'm a newbie to OpenGL, inexperienced. Does anyone know the
reason? Any suggestion will be appreciated! Thank you!

     Here is the code and the screenshot: 
http://freedomray.iteye.com/blog/1197863

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

Reply via email to