Hello, does anyone know what's the best way to draw an image on the screen that needs to change every 50 ms? creating a new dynamic texture and deleting the old one each time didn't work, I ran out of memoty after 10 mins.
//creating the image of the map:
public BufferedImage MAP = new BufferedImage(width(), height(), BufferedImage.TYPE_INT_RGB);
DynamicTexture TEXTURE = new DynamicTexture(MAP);
//rendering the map:
mc.getTextureManager().bindTexture(mc.getTextureManager().getDynamicTextureLocation("minimap", TEXTURE));
RenderUtils.drawTexture(x, y, 0, 0, width, height, width, height);
//updating the image every 100 ms with:
TEXTURE = new DynamicTexture(MAP);