Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

i try to make a textured object then draw other without (only colored).

i had tried to play with glEnable/Disable(GL10.GL_TEXTURE_2D) , gl.glEnable/DisableClientState(GL10.GL_COLOR_ARRAY/GL10.GL_TEXTURE_COORD_ARRAY);

But i never get the result i expect.

(first colored + textured then others textured and colored too) (first colored and not textured then other colored and not textured)

i don't know if this is because i don't disable some things at the good place or if i missing something.

share|improve this question
up vote 3 down vote accepted

glBindTexture(GL_TEXTURE_2D, 0) switches to the default texture; unless you've changed the default, that should do what you want.

share|improve this answer
this is what i'm looking for thanks a lot – eephyne Dec 11 '10 at 13:14

glDisable(GL_TEXTURE_2D) should do it, unless you have other texture targets enabled (eg. GL_TEXTURE_1D, GL_TEXTURE_3D or GL_TEXTURE_CUBE_MAP)

As a debugging mechanism, try use glPushAttrib(GL_ALL_ATTRIB_BITS) before setting up any state for your textured rendering, then use glPopAttrib() afterwards. Move the push and pop down/up until you find out what state is causing your subsequent objects to be textured incorrectly, and then fix it and remove the push/pops.

Failing that, use gDEBugger, an OpenGL debugger to try narrow down your problem. This debugger was recently made free! (see:

share|improve this answer
when i use glDisable(GL_TEXTURE_2D) after drawing the object that need texture , all the scene is without texture . I don't have glPush/PopAttrib() (i'm using opengl es 1.0) – eephyne Dec 11 '10 at 8:22

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.