Jump to content

What's the best way to draw an image that needs to be changed continuosly?


Recommended Posts

Posted

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);

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.