Posted July 6, 20205 yr 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);
July 6, 20205 yr Hi Don't create a new dynamic texture each time. Use the same one and overwrite its contents. -TGG Edited July 6, 20205 yr by TheGreyGhost
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.