Skip to main content
gamedev.net
🔒 Locked

[java] Graphics Hardware Support

Started by leif_dragon 4 replies 750+ views
Original Post
leif_dragon
leif_dragon
I was just wondering if there is any way to utilize a computer's graphics hardware through java. I am currently making a java based game, and I think that everything is being run through the processor and nothing through the graphics card.
Antheus
Antheus
Java2D and related Swing classes use OpenGL for some rendering and other graphics operations.

For general purpose rendering, there's JOGL, which is plain-old OpenGL binding.

leif_dragon
leif_dragon
Thanks for the insight Antheus. I just caught a glimpse of the bufferStrategy, so I think I am going to look more into that.
elFarto
elFarto
A VolatileImage will give you hardware accelerated drawing.
leif_dragon
leif_dragon
My problem is that the rendering that I am doing requires me to use bufferedImages because I need to be able to manipulate individual pixels on the given images. The only method I am currently using, is the BufferedImage.setPixel(int x, int y, int ARGB), this is all I need to achieve the result I want. I realize however that such operations are not able to be performed on VolatileImages.

My question then is, is it possible to get graphics card acceleration/support on rendering operations that manipulate an image at the pixel level. In other words, is it possible to manipulate an images pixel data through the graphics card. If so, please let me know of such a method, example code would be helpful.

Thanks all the same.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.