private void renderSubset(ModelSubset sub) {
		processSubsetFlag(sub.getFlags());
		Material mat = sub.getMaterial();
		setMaterial(mat);

		Texture tex = null;

		if (mat.getTextureID() == -1) {
			if (_currentTexID != -1) {
				_currentTex.disable();
				_currentTex.dispose();
				_currentTexID = -1;
				_currentTex = null;
			}
		} else if (_currentTexID != mat.getTextureID()) {

			if (_currentTexID != -1) {
				_currentTex.dispose();

			}

			tex = TextureIO.newTexture(mat.getTexData());
			tex.enable();
			tex.bind();
			tex.setTexParameteri(GL.GL_TEXTURE_MIN_FILTER, GL.GL_LINEAR);
			tex.setTexParameteri(GL.GL_TEXTURE_MIN_FILTER, GL.GL_LINEAR);
			_currentTexID = mat.getTextureID();
			_currentTex = tex;
		}

		sub.render(gl);
	}