Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


[java] What is the fastest way to draw a single pixel?

This topic is 6075 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am making a particle enine now and I need a fast way to draw pixels. I am currently using g.drawLine(x, y, x+1, y+1) right now. Is there a better way?

Share this post

Link to post
Share on other sites
I think fillRect(x, y, 1, 1) might be a very small amount faster, but not much.

If you're using an offscreen buffer then it might be fast to get the raster data from your buffer and set the color values yourself, but I'm not sure because I haven't played around with that for quite a while.

"So crucify the ego, before it's far too late. To leave behind this place so negative and blind and cynical, and you will come to find that we are all one mind. Capable of all that's imagined and all conceivable."
- Tool

Edited by - wayfarerx on October 30, 2001 1:05:30 PM

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!