OpenGL is a state machine,when you dont need the texture,try to disable it before draw other primitives.
Regards! Bo Yang -- Sent from my Android! 在 2012-3-8 上午12:07,"Rikki" <tteam...@gmail.com>写道: > Hi, > > Want to draw bars of different colors. The background(bitmap image) > for each bar is same but the foreground color needs to be different. > > And also the color is to be filled on top of the bar just like a > progress bar. Here is my code snippet. Progress object share same > vertex buffer but a little smaller in horizontal direction. This > leaves some part of the rectangle filled with the color and then also > fills the background image with that color with a translucent effect. > can some one suggest what I'm doing wrong here > > gl.glTranslatef(0.0f, 0.0f, -5.0f); > gl.glPushMatrix(); > bar1.draw(gl); // Draw the bar > gl.glPopMatrix(); > > gl.glPushMatrix(); > gl.glColor4f(0.7f, 0.7f, 0.0f, 1.0f); > progress1.draw(gl); //draw progress > gl.glPopMatrix(); > > gl.glTranslatef(0.0f, -0.80f, 0.0f); > gl.glPushMatrix(); > bar1.draw(gl); // Draw the bar > gl.glPopMatrix(); > > gl.glPushMatrix(); > gl.glColor4f(0.0f, 0.7f, 0.7f, 1.0f); > progress1.draw(gl); //draw progress > gl.glPopMatrix(); > > -Rikki > > -- > 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+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en -- 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en