private void texData(BufferedImage img) {
		if(glTexId == -1 || img == null) {
			return;
		}
		
		int[] pixels = new int[textureWidth*textureHeight];
		img.getRGB(0, 0, textureWidth, textureHeight, pixels, 0, textureWidth);
		
		Out.dbg("TexData!");
		ByteBuffer buf = BufferUtils.createByteBuffer(textureWidth*textureHeight*(hasAlpha ? 4 : 3));
		
		for(int y=0;y<textureHeight;y++) {
			for(int x=0;x<textureWidth;x++) {
				int pixel = pixels[y*textureWidth+x];
				buf.put((byte)((pixel >> 16) & 0xFF));
				buf.put((byte)((pixel >> 8) & 0xFF));
				buf.put((byte)((pixel) & 0xFF));
				buf.put((byte)((pixel >> 24) & 0xFF));
				Out.out("alpha: " + ((pixel >> 24) & 0xFF));
				Out.out("red: " + ((pixel >> 16) & 0xFF));
				Out.out("green: " + ((pixel >> 6) & 0xFF));
				Out.out("blue: " + ((pixel >> 0) & 0xFF));
//				buf.put((byte)0);
//				buf.put((byte)0);
//				buf.put((byte)0);
//				buf.put((byte)0);
			}
		}
		buf.flip();
		GL11.glBindTexture(GL11.GL_TEXTURE_2D, glTexId);
		GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MAG_FILTER, GL11.GL_NEAREST);
		GL11.glTexImage2D(GL11.GL_TEXTURE_2D, 0, GL11.GL_RGBA8, textureWidth, textureHeight, 0, GL11.GL_RGBA, GL11.GL_UNSIGNED_BYTE, buf);
		GL11.glBindTexture(GL11.GL_TEXTURE_2D, 0);
	}