OSDN Git Service

[fixed] TextureData wasn't managed.
authorbadlogicgames <badlogicgames@6c4fd544-2939-11df-bb46-9574ba5d0bfa>
Sun, 6 Feb 2011 13:05:47 +0000 (13:05 +0000)
committerbadlogicgames <badlogicgames@6c4fd544-2939-11df-bb46-9574ba5d0bfa>
Sun, 6 Feb 2011 13:05:47 +0000 (13:05 +0000)
gdx/src/com/badlogic/gdx/graphics/Texture.java

index d8d299a..2c3e8bf 100644 (file)
@@ -196,7 +196,7 @@ public class Texture {
         * Creates a new texture from the given {@link TextureData}. The\r
         * texture is managed and the TextureData instance is invoked\r
         * in case of a context loss to recreate the texture. The texture wrap for u and v is set to GL_CLAMP_TO_EDGE by default.\r
-        * The texture is not managed and has to be reloaded manually on a context loss.\r
+        * The texture is managed.\r
         * @param data the TextureData\r
         */\r
        public Texture(TextureData data) {\r
@@ -209,6 +209,7 @@ public class Texture {
                setFilter(minFilter, magFilter);\r
                setWrap(uWrap, vWrap);\r
                textureData.load();     \r
+               managedTextures.add(this);\r
        }\r
        \r
        private void reload() {\r