braiandeleon / beginning-android-games

Automatically exported from code.google.com/p/beginning-android-games
1 stars 0 forks source link

[Chapter 7] Texture unbinding in Texture.dispose() #28

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Always in the printed version of the book, chapter 7, page 314, listing 7-8, 
method dispose() doesn't unbind texture properly.

OpenGL ES method glBindTexture has to be called with the "special" texture ID 
0, to unbind the texture.

I think that correct code is:
gl.glBindTexture(GL10.GL_TEXTURE_2D, 0);

instead of:
gl.glBindTexture(GL10.GL_TEXTURE_2D, textureId);

The online code is affected too.

--- Alessandro Dal Bello ---

Original issue reported on code.google.com by alessand...@gmail.com on 3 Sep 2011 at 8:43

GoogleCodeExporter commented 8 years ago

Original comment by badlogicgames on 6 Sep 2011 at 1:44

GoogleCodeExporter commented 8 years ago
Fixed in second edition!

Original comment by badlogicgames on 6 Sep 2011 at 1:54