private void loadTextureFromAsset(String name, byte[] data) {
        int id = -1;
        try {
            boolean flag = false;
            ByteBuffer texture = null;
            if (data == null) {
                flag = true;
            } else {
                String extension = "";
                int i = name.lastIndexOf('.');
                if (i > 0 && i < name.length() - 1) {
                    extension = name.substring(i + 1).toLowerCase();
                }
                name = name.replace("." + extension, "");

                texture = mountTexture(extension, new ByteArrayInputStream(data));
            }
            if (flag || texture == null) {
                logger.warning("RENDER ENGINE : Unable to mount texture -> \"" + name + "\"");
                return;
            }
            glEnable(GL_TEXTURE_2D);
            id = glGenTextures();
            glBindTexture(GL_TEXTURE_2D, id);
            glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL12.GL_CLAMP_TO_EDGE);
            glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL12.GL_CLAMP_TO_EDGE);
            glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
            glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
            glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, currentTexWidth, currentTexHeight, 0, GL_RGBA, GL_UNSIGNED_BYTE, texture);
            glDisable(GL_TEXTURE_2D);
        } catch (IOException e) {
            try {
                throw new LWJGLException("RENDER_ENGINE_FATAL_ERROR : MOUNT_TEXTURE_FAILURE");
            } catch (LWJGLException e1) {
                exceptionHandler.handleException(new GameException(e1));
            }
        }
        textureMap.put(name, new Material(id, currentTexWidth, currentTexHeight, false));
    }