}
public static void glTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, int type, ByteBuffer pixels, TextureFX textureFX) {
GL11.glTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels);
if (textureFX.tileImage == 0) {
ByteOrder saveOrder = pixels.order();
pixels.order(ByteOrder.BIG_ENDIAN);
update("/terrain.png", xoffset, yoffset, width, height, pixels);
pixels.order(saveOrder);
}
}